Bump the aws group with 4 updates (#7552)
- Updates `github.com/aws/aws-sdk-go-v2` from 1.25.0 to 1.27.2 - Updates `github.com/aws/aws-sdk-go-v2/config` from 1.26.3 to 1.27.18 - Updates `github.com/aws/aws-sdk-go-v2/service/s3` from 1.50.2 to 1.55.1 - Updates `github.com/aws/smithy-go` from 1.20.0 to 1.20.2 Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
This commit is contained in:
parent
1ece848ae5
commit
daa5aefb43
36
go.mod
36
go.mod
|
|
@ -3,10 +3,10 @@ module github.com/letsencrypt/boulder
|
|||
go 1.22.0
|
||||
|
||||
require (
|
||||
github.com/aws/aws-sdk-go-v2 v1.25.0
|
||||
github.com/aws/aws-sdk-go-v2/config v1.26.3
|
||||
github.com/aws/aws-sdk-go-v2/service/s3 v1.50.2
|
||||
github.com/aws/smithy-go v1.20.0
|
||||
github.com/aws/aws-sdk-go-v2 v1.27.2
|
||||
github.com/aws/aws-sdk-go-v2/config v1.27.18
|
||||
github.com/aws/aws-sdk-go-v2/service/s3 v1.55.1
|
||||
github.com/aws/smithy-go v1.20.2
|
||||
github.com/eggsampler/acme/v3 v3.6.0
|
||||
github.com/go-jose/go-jose/v4 v4.0.1
|
||||
github.com/go-logr/stdr v1.2.2
|
||||
|
|
@ -47,20 +47,20 @@ require (
|
|||
)
|
||||
|
||||
require (
|
||||
github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.6.0 // indirect
|
||||
github.com/aws/aws-sdk-go-v2/credentials v1.16.14 // indirect
|
||||
github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.14.11 // indirect
|
||||
github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.0 // indirect
|
||||
github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.0 // indirect
|
||||
github.com/aws/aws-sdk-go-v2/internal/ini v1.7.2 // indirect
|
||||
github.com/aws/aws-sdk-go-v2/internal/v4a v1.3.0 // indirect
|
||||
github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.11.0 // indirect
|
||||
github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.3.0 // indirect
|
||||
github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.11.0 // indirect
|
||||
github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.17.0 // indirect
|
||||
github.com/aws/aws-sdk-go-v2/service/sso v1.18.6 // indirect
|
||||
github.com/aws/aws-sdk-go-v2/service/ssooidc v1.21.6 // indirect
|
||||
github.com/aws/aws-sdk-go-v2/service/sts v1.26.7 // indirect
|
||||
github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.6.2 // indirect
|
||||
github.com/aws/aws-sdk-go-v2/credentials v1.17.18 // indirect
|
||||
github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.16.5 // indirect
|
||||
github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.9 // indirect
|
||||
github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.9 // indirect
|
||||
github.com/aws/aws-sdk-go-v2/internal/ini v1.8.0 // indirect
|
||||
github.com/aws/aws-sdk-go-v2/internal/v4a v1.3.9 // indirect
|
||||
github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.11.2 // indirect
|
||||
github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.3.11 // indirect
|
||||
github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.11.11 // indirect
|
||||
github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.17.9 // indirect
|
||||
github.com/aws/aws-sdk-go-v2/service/sso v1.20.11 // indirect
|
||||
github.com/aws/aws-sdk-go-v2/service/ssooidc v1.24.5 // indirect
|
||||
github.com/aws/aws-sdk-go-v2/service/sts v1.28.12 // indirect
|
||||
github.com/beorn7/perks v1.0.1 // indirect
|
||||
github.com/cenkalti/backoff/v4 v4.3.0 // indirect
|
||||
github.com/cespare/xxhash/v2 v2.2.0 // indirect
|
||||
|
|
|
|||
72
go.sum
72
go.sum
|
|
@ -7,42 +7,42 @@ github.com/a8m/expect v1.0.0/go.mod h1:4IwSCMumY49ScypDnjNbYEjgVeqy1/U2cEs3Lat96
|
|||
github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc=
|
||||
github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0=
|
||||
github.com/armon/consul-api v0.0.0-20180202201655-eb2c6b5be1b6/go.mod h1:grANhF5doyWs3UAsr3K4I6qtAmlQcZDesFNEHPZAzj8=
|
||||
github.com/aws/aws-sdk-go-v2 v1.25.0 h1:sv7+1JVJxOu/dD/sz/csHX7jFqmP001TIY7aytBWDSQ=
|
||||
github.com/aws/aws-sdk-go-v2 v1.25.0/go.mod h1:G104G1Aho5WqF+SR3mDIobTABQzpYV0WxMsKxlMggOA=
|
||||
github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.6.0 h1:2UO6/nT1lCZq1LqM67Oa4tdgP1CvL1sLSxvuD+VrOeE=
|
||||
github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.6.0/go.mod h1:5zGj2eA85ClyedTDK+Whsu+w9yimnVIZvhvBKrDquM8=
|
||||
github.com/aws/aws-sdk-go-v2/config v1.26.3 h1:dKuc2jdp10y13dEEvPqWxqLoc0vF3Z9FC45MvuQSxOA=
|
||||
github.com/aws/aws-sdk-go-v2/config v1.26.3/go.mod h1:Bxgi+DeeswYofcYO0XyGClwlrq3DZEXli0kLf4hkGA0=
|
||||
github.com/aws/aws-sdk-go-v2/credentials v1.16.14 h1:mMDTwwYO9A0/JbOCOG7EOZHtYM+o7OfGWfu0toa23VE=
|
||||
github.com/aws/aws-sdk-go-v2/credentials v1.16.14/go.mod h1:cniAUh3ErQPHtCQGPT5ouvSAQ0od8caTO9OOuufZOAE=
|
||||
github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.14.11 h1:c5I5iH+DZcH3xOIMlz3/tCKJDaHFwYEmxvlh2fAcFo8=
|
||||
github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.14.11/go.mod h1:cRrYDYAMUohBJUtUnOhydaMHtiK/1NZ0Otc9lIb6O0Y=
|
||||
github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.0 h1:NPs/EqVO+ajwOoq56EfcGKa3L3ruWuazkIw1BqxwOPw=
|
||||
github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.0/go.mod h1:D+duLy2ylgatV+yTlQ8JTuLfDD0BnFvnQRc+o6tbZ4M=
|
||||
github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.0 h1:ks7KGMVUMoDzcxNWUlEdI+/lokMFD136EL6DWmUOV80=
|
||||
github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.0/go.mod h1:hL6BWM/d/qz113fVitZjbXR0E+RCTU1+x+1Idyn5NgE=
|
||||
github.com/aws/aws-sdk-go-v2/internal/ini v1.7.2 h1:GrSw8s0Gs/5zZ0SX+gX4zQjRnRsMJDJ2sLur1gRBhEM=
|
||||
github.com/aws/aws-sdk-go-v2/internal/ini v1.7.2/go.mod h1:6fQQgfuGmw8Al/3M2IgIllycxV7ZW7WCdVSqfBeUiCY=
|
||||
github.com/aws/aws-sdk-go-v2/internal/v4a v1.3.0 h1:TkbRExyKSVHELwG9gz2+gql37jjec2R5vus9faTomwE=
|
||||
github.com/aws/aws-sdk-go-v2/internal/v4a v1.3.0/go.mod h1:T3/9xMKudHhnj8it5EqIrhvv11tVZqWYkKcot+BFStc=
|
||||
github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.11.0 h1:a33HuFlO0KsveiP90IUJh8Xr/cx9US2PqkSroaLc+o8=
|
||||
github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.11.0/go.mod h1:SxIkWpByiGbhbHYTo9CMTUnx2G4p4ZQMrDPcRRy//1c=
|
||||
github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.3.0 h1:UiSyK6ent6OKpkMJN3+k5HZ4sk4UfchEaaW5wv7SblQ=
|
||||
github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.3.0/go.mod h1:l7kzl8n8DXoRyFz5cIMG70HnPauWa649TUhgw8Rq6lo=
|
||||
github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.11.0 h1:SHN/umDLTmFTmYfI+gkanz6da3vK8Kvj/5wkqnTHbuA=
|
||||
github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.11.0/go.mod h1:l8gPU5RYGOFHJqWEpPMoRTP0VoaWQSkJdKo+hwWnnDA=
|
||||
github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.17.0 h1:l5puwOHr7IxECuPMIuZG7UKOzAnF24v6t4l+Z5Moay4=
|
||||
github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.17.0/go.mod h1:Oov79flWa/n7Ni+lQC3z+VM7PoRM47omRqbJU9B5Y7E=
|
||||
github.com/aws/aws-sdk-go-v2/service/s3 v1.50.2 h1:UxJGNZ+/VhocG50aui1p7Ub2NjDzijCpg8Y3NuznijM=
|
||||
github.com/aws/aws-sdk-go-v2/service/s3 v1.50.2/go.mod h1:1o/W6JFUuREj2ExoQ21vHJgO7wakvjhol91M9eknFgs=
|
||||
github.com/aws/aws-sdk-go-v2/service/sso v1.18.6 h1:dGrs+Q/WzhsiUKh82SfTVN66QzyulXuMDTV/G8ZxOac=
|
||||
github.com/aws/aws-sdk-go-v2/service/sso v1.18.6/go.mod h1:+mJNDdF+qiUlNKNC3fxn74WWNN+sOiGOEImje+3ScPM=
|
||||
github.com/aws/aws-sdk-go-v2/service/ssooidc v1.21.6 h1:Yf2MIo9x+0tyv76GljxzqA3WtC5mw7NmazD2chwjxE4=
|
||||
github.com/aws/aws-sdk-go-v2/service/ssooidc v1.21.6/go.mod h1:ykf3COxYI0UJmxcfcxcVuz7b6uADi1FkiUz6Eb7AgM8=
|
||||
github.com/aws/aws-sdk-go-v2/service/sts v1.26.7 h1:NzO4Vrau795RkUdSHKEwiR01FaGzGOH1EETJ+5QHnm0=
|
||||
github.com/aws/aws-sdk-go-v2/service/sts v1.26.7/go.mod h1:6h2YuIoxaMSCFf5fi1EgZAwdfkGMgDY+DVfa61uLe4U=
|
||||
github.com/aws/smithy-go v1.20.0 h1:6+kZsCXZwKxZS9RfISnPc4EXlHoyAkm2hPuM8X2BrrQ=
|
||||
github.com/aws/smithy-go v1.20.0/go.mod h1:uo5RKksAl4PzhqaAbjd4rLgFoq5koTsQKYuGe7dklGc=
|
||||
github.com/aws/aws-sdk-go-v2 v1.27.2 h1:pLsTXqX93rimAOZG2FIYraDQstZaaGVVN4tNw65v0h8=
|
||||
github.com/aws/aws-sdk-go-v2 v1.27.2/go.mod h1:ffIFB97e2yNsv4aTSGkqtHnppsIJzw7G7BReUZ3jCXM=
|
||||
github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.6.2 h1:x6xsQXGSmW6frevwDA+vi/wqhp1ct18mVXYN08/93to=
|
||||
github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.6.2/go.mod h1:lPprDr1e6cJdyYeGXnRaJoP4Md+cDBvi2eOj00BlGmg=
|
||||
github.com/aws/aws-sdk-go-v2/config v1.27.18 h1:wFvAnwOKKe7QAyIxziwSKjmer9JBMH1vzIL6W+fYuKk=
|
||||
github.com/aws/aws-sdk-go-v2/config v1.27.18/go.mod h1:0xz6cgdX55+kmppvPm2IaKzIXOheGJhAufacPJaXZ7c=
|
||||
github.com/aws/aws-sdk-go-v2/credentials v1.17.18 h1:D/ALDWqK4JdY3OFgA2thcPO1c9aYTT5STS/CvnkqY1c=
|
||||
github.com/aws/aws-sdk-go-v2/credentials v1.17.18/go.mod h1:JuitCWq+F5QGUrmMPsk945rop6bB57jdscu+Glozdnc=
|
||||
github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.16.5 h1:dDgptDO9dxeFkXy+tEgVkzSClHZje/6JkPW5aZyEvrQ=
|
||||
github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.16.5/go.mod h1:gjvE2KBUgUQhcv89jqxrIxH9GaKs1JbZzWejj/DaHGA=
|
||||
github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.9 h1:cy8ahBJuhtM8GTTSyOkfy6WVPV1IE+SS5/wfXUYuulw=
|
||||
github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.9/go.mod h1:CZBXGLaJnEZI6EVNcPd7a6B5IC5cA/GkRWtu9fp3S6Y=
|
||||
github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.9 h1:A4SYk07ef04+vxZToz9LWvAXl9LW0NClpPpMsi31cz0=
|
||||
github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.9/go.mod h1:5jJcHuwDagxN+ErjQ3PU3ocf6Ylc/p9x+BLO/+X4iXw=
|
||||
github.com/aws/aws-sdk-go-v2/internal/ini v1.8.0 h1:hT8rVHwugYE2lEfdFE0QWVo81lF7jMrYJVDWI+f+VxU=
|
||||
github.com/aws/aws-sdk-go-v2/internal/ini v1.8.0/go.mod h1:8tu/lYfQfFe6IGnaOdrpVgEL2IrrDOf6/m9RQum4NkY=
|
||||
github.com/aws/aws-sdk-go-v2/internal/v4a v1.3.9 h1:vHyZxoLVOgrI8GqX7OMHLXp4YYoxeEsrjweXKpye+ds=
|
||||
github.com/aws/aws-sdk-go-v2/internal/v4a v1.3.9/go.mod h1:z9VXZsWA2BvZNH1dT0ToUYwMu/CR9Skkj/TBX+mceZw=
|
||||
github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.11.2 h1:Ji0DY1xUsUr3I8cHps0G+XM3WWU16lP6yG8qu1GAZAs=
|
||||
github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.11.2/go.mod h1:5CsjAbs3NlGQyZNFACh+zztPDI7fU6eW9QsxjfnuBKg=
|
||||
github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.3.11 h1:4vt9Sspk59EZyHCAEMaktHKiq0C09noRTQorXD/qV+s=
|
||||
github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.3.11/go.mod h1:5jHR79Tv+Ccq6rwYh+W7Nptmw++WiFafMfR42XhwNl8=
|
||||
github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.11.11 h1:o4T+fKxA3gTMcluBNZZXE9DNaMkJuUL1O3mffCUjoJo=
|
||||
github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.11.11/go.mod h1:84oZdJ+VjuJKs9v1UTC9NaodRZRseOXCTgku+vQJWR8=
|
||||
github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.17.9 h1:TE2i0A9ErH1YfRSvXfCr2SQwfnqsoJT9nPQ9kj0lkxM=
|
||||
github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.17.9/go.mod h1:9TzXX3MehQNGPwCZ3ka4CpwQsoAMWSF48/b+De9rfVM=
|
||||
github.com/aws/aws-sdk-go-v2/service/s3 v1.55.1 h1:UAxBuh0/8sFJk1qOkvOKewP5sWeWaTPDknbQz0ZkDm0=
|
||||
github.com/aws/aws-sdk-go-v2/service/s3 v1.55.1/go.mod h1:hWjsYGjVuqCgfoveVcVFPXIWgz0aByzwaxKlN1StKcM=
|
||||
github.com/aws/aws-sdk-go-v2/service/sso v1.20.11 h1:gEYM2GSpr4YNWc6hCd5nod4+d4kd9vWIAWrmGuLdlMw=
|
||||
github.com/aws/aws-sdk-go-v2/service/sso v1.20.11/go.mod h1:gVvwPdPNYehHSP9Rs7q27U1EU+3Or2ZpXvzAYJNh63w=
|
||||
github.com/aws/aws-sdk-go-v2/service/ssooidc v1.24.5 h1:iXjh3uaH3vsVcnyZX7MqCoCfcyxIrVE9iOQruRaWPrQ=
|
||||
github.com/aws/aws-sdk-go-v2/service/ssooidc v1.24.5/go.mod h1:5ZXesEuy/QcO0WUnt+4sDkxhdXRHTu2yG0uCSH8B6os=
|
||||
github.com/aws/aws-sdk-go-v2/service/sts v1.28.12 h1:M/1u4HBpwLuMtjlxuI2y6HoVLzF5e2mfxHCg7ZVMYmk=
|
||||
github.com/aws/aws-sdk-go-v2/service/sts v1.28.12/go.mod h1:kcfd+eTdEi/40FIbLq4Hif3XMXnl5b/+t/KTfLt9xIk=
|
||||
github.com/aws/smithy-go v1.20.2 h1:tbp628ireGtzcHDDmLT/6ADHidqnwgF57XOXZe6tp4Q=
|
||||
github.com/aws/smithy-go v1.20.2/go.mod h1:krry+ya/rV9RDcV/Q16kpu6ypI4K2czasz0NC3qS14E=
|
||||
github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q=
|
||||
github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8=
|
||||
github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM=
|
||||
|
|
|
|||
|
|
@ -70,6 +70,10 @@ func GetUseFIPSEndpoint(options ...interface{}) (value FIPSEndpointState, found
|
|||
// The SDK will automatically resolve these endpoints per API client using an
|
||||
// internal endpoint resolvers. If you'd like to provide custom endpoint
|
||||
// resolving behavior you can implement the EndpointResolver interface.
|
||||
//
|
||||
// Deprecated: This structure was used with the global [EndpointResolver]
|
||||
// interface, which has been deprecated in favor of service-specific endpoint
|
||||
// resolution. See the deprecation docs on that interface for more information.
|
||||
type Endpoint struct {
|
||||
// The base URL endpoint the SDK API clients will use to make API calls to.
|
||||
// The SDK will suffix URI path and query elements to this endpoint.
|
||||
|
|
@ -124,6 +128,8 @@ type Endpoint struct {
|
|||
}
|
||||
|
||||
// EndpointSource is the endpoint source type.
|
||||
//
|
||||
// Deprecated: The global [Endpoint] structure is deprecated.
|
||||
type EndpointSource int
|
||||
|
||||
const (
|
||||
|
|
@ -161,19 +167,25 @@ func (e *EndpointNotFoundError) Unwrap() error {
|
|||
// API clients will fallback to attempting to resolve the endpoint using its
|
||||
// internal default endpoint resolver.
|
||||
//
|
||||
// Deprecated: See EndpointResolverWithOptions
|
||||
// Deprecated: The global endpoint resolution interface is deprecated. The API
|
||||
// for endpoint resolution is now unique to each service and is set via the
|
||||
// EndpointResolverV2 field on service client options. Setting a value for
|
||||
// EndpointResolver on aws.Config or service client options will prevent you
|
||||
// from using any endpoint-related service features released after the
|
||||
// introduction of EndpointResolverV2. You may also encounter broken or
|
||||
// unexpected behavior when using the old global interface with services that
|
||||
// use many endpoint-related customizations such as S3.
|
||||
type EndpointResolver interface {
|
||||
ResolveEndpoint(service, region string) (Endpoint, error)
|
||||
}
|
||||
|
||||
// EndpointResolverFunc wraps a function to satisfy the EndpointResolver interface.
|
||||
//
|
||||
// Deprecated: See EndpointResolverWithOptionsFunc
|
||||
// Deprecated: The global endpoint resolution interface is deprecated. See
|
||||
// deprecation docs on [EndpointResolver].
|
||||
type EndpointResolverFunc func(service, region string) (Endpoint, error)
|
||||
|
||||
// ResolveEndpoint calls the wrapped function and returns the results.
|
||||
//
|
||||
// Deprecated: See EndpointResolverWithOptions.ResolveEndpoint
|
||||
func (e EndpointResolverFunc) ResolveEndpoint(service, region string) (Endpoint, error) {
|
||||
return e(service, region)
|
||||
}
|
||||
|
|
@ -184,11 +196,17 @@ func (e EndpointResolverFunc) ResolveEndpoint(service, region string) (Endpoint,
|
|||
// available. If the EndpointResolverWithOptions returns an EndpointNotFoundError error,
|
||||
// API clients will fallback to attempting to resolve the endpoint using its
|
||||
// internal default endpoint resolver.
|
||||
//
|
||||
// Deprecated: The global endpoint resolution interface is deprecated. See
|
||||
// deprecation docs on [EndpointResolver].
|
||||
type EndpointResolverWithOptions interface {
|
||||
ResolveEndpoint(service, region string, options ...interface{}) (Endpoint, error)
|
||||
}
|
||||
|
||||
// EndpointResolverWithOptionsFunc wraps a function to satisfy the EndpointResolverWithOptions interface.
|
||||
//
|
||||
// Deprecated: The global endpoint resolution interface is deprecated. See
|
||||
// deprecation docs on [EndpointResolver].
|
||||
type EndpointResolverWithOptionsFunc func(service, region string, options ...interface{}) (Endpoint, error)
|
||||
|
||||
// ResolveEndpoint calls the wrapped function and returns the results.
|
||||
|
|
|
|||
|
|
@ -3,4 +3,4 @@
|
|||
package aws
|
||||
|
||||
// goModuleVersion is the tagged release for this module
|
||||
const goModuleVersion = "1.25.0"
|
||||
const goModuleVersion = "1.27.2"
|
||||
|
|
|
|||
|
|
@ -139,16 +139,16 @@ func AddRecordResponseTiming(stack *middleware.Stack) error {
|
|||
// raw response within the response metadata.
|
||||
type rawResponseKey struct{}
|
||||
|
||||
// addRawResponse middleware adds raw response on to the metadata
|
||||
type addRawResponse struct{}
|
||||
// AddRawResponse middleware adds raw response on to the metadata
|
||||
type AddRawResponse struct{}
|
||||
|
||||
// ID the identifier for the ClientRequestID
|
||||
func (m *addRawResponse) ID() string {
|
||||
func (m *AddRawResponse) ID() string {
|
||||
return "AddRawResponseToMetadata"
|
||||
}
|
||||
|
||||
// HandleDeserialize adds raw response on the middleware metadata
|
||||
func (m addRawResponse) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
|
||||
func (m AddRawResponse) 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)
|
||||
|
|
@ -159,7 +159,7 @@ func (m addRawResponse) HandleDeserialize(ctx context.Context, in middleware.Des
|
|||
// AddRawResponseToMetadata adds middleware to the middleware stack that
|
||||
// store raw response on to the metadata.
|
||||
func AddRawResponseToMetadata(stack *middleware.Stack) error {
|
||||
return stack.Deserialize.Add(&addRawResponse{}, middleware.Before)
|
||||
return stack.Deserialize.Add(&AddRawResponse{}, middleware.Before)
|
||||
}
|
||||
|
||||
// GetRawResponse returns raw response set on metadata
|
||||
|
|
|
|||
|
|
@ -112,6 +112,8 @@ type MetricData struct {
|
|||
ResolveEndpointStartTime time.Time
|
||||
ResolveEndpointEndTime time.Time
|
||||
EndpointResolutionDuration time.Duration
|
||||
GetIdentityStartTime time.Time
|
||||
GetIdentityEndTime time.Time
|
||||
InThroughput float64
|
||||
OutThroughput float64
|
||||
RetryCount int
|
||||
|
|
@ -122,6 +124,7 @@ type MetricData struct {
|
|||
OperationName string
|
||||
PartitionID string
|
||||
Region string
|
||||
UserAgent string
|
||||
RequestContentLength int64
|
||||
Stream StreamMetrics
|
||||
Attempts []AttemptMetrics
|
||||
|
|
@ -144,8 +147,6 @@ type AttemptMetrics struct {
|
|||
ConnRequestedTime time.Time
|
||||
ConnObtainedTime time.Time
|
||||
ConcurrencyAcquireDuration time.Duration
|
||||
CredentialFetchStartTime time.Time
|
||||
CredentialFetchEndTime time.Time
|
||||
SignStartTime time.Time
|
||||
SignEndTime time.Time
|
||||
SigningDuration time.Duration
|
||||
|
|
|
|||
|
|
@ -11,18 +11,22 @@ import (
|
|||
func AddRequestIDRetrieverMiddleware(stack *middleware.Stack) error {
|
||||
// add error wrapper middleware before operation deserializers so that it can wrap the error response
|
||||
// returned by operation deserializers
|
||||
return stack.Deserialize.Insert(&requestIDRetriever{}, "OperationDeserializer", middleware.Before)
|
||||
return stack.Deserialize.Insert(&RequestIDRetriever{}, "OperationDeserializer", middleware.Before)
|
||||
}
|
||||
|
||||
type requestIDRetriever struct {
|
||||
// RequestIDRetriever middleware captures the AWS service request ID from the
|
||||
// raw response.
|
||||
type RequestIDRetriever struct {
|
||||
}
|
||||
|
||||
// ID returns the middleware identifier
|
||||
func (m *requestIDRetriever) ID() string {
|
||||
func (m *RequestIDRetriever) ID() string {
|
||||
return "RequestIDRetriever"
|
||||
}
|
||||
|
||||
func (m *requestIDRetriever) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
|
||||
// HandleDeserialize pulls the AWS request ID from the response, storing it in
|
||||
// operation metadata.
|
||||
func (m *RequestIDRetriever) 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)
|
||||
|
|
|
|||
|
|
@ -64,12 +64,12 @@ var validChars = map[rune]bool{
|
|||
'-': true, '.': true, '^': true, '_': true, '`': true, '|': true, '~': true,
|
||||
}
|
||||
|
||||
// requestUserAgent is a build middleware that set the User-Agent for the request.
|
||||
type requestUserAgent struct {
|
||||
// RequestUserAgent is a build middleware that set the User-Agent for the request.
|
||||
type RequestUserAgent struct {
|
||||
sdkAgent, userAgent *smithyhttp.UserAgentBuilder
|
||||
}
|
||||
|
||||
// newRequestUserAgent returns a new requestUserAgent which will set the User-Agent and X-Amz-User-Agent for the
|
||||
// NewRequestUserAgent returns a new requestUserAgent which will set the User-Agent and X-Amz-User-Agent for the
|
||||
// request.
|
||||
//
|
||||
// User-Agent example:
|
||||
|
|
@ -79,12 +79,12 @@ type requestUserAgent struct {
|
|||
// X-Amz-User-Agent example:
|
||||
//
|
||||
// aws-sdk-go-v2/1.2.3 md/GOOS/linux md/GOARCH/amd64 lang/go/1.15
|
||||
func newRequestUserAgent() *requestUserAgent {
|
||||
func NewRequestUserAgent() *RequestUserAgent {
|
||||
userAgent, sdkAgent := smithyhttp.NewUserAgentBuilder(), smithyhttp.NewUserAgentBuilder()
|
||||
addProductName(userAgent)
|
||||
addProductName(sdkAgent)
|
||||
|
||||
r := &requestUserAgent{
|
||||
r := &RequestUserAgent{
|
||||
sdkAgent: sdkAgent,
|
||||
userAgent: userAgent,
|
||||
}
|
||||
|
|
@ -94,7 +94,7 @@ func newRequestUserAgent() *requestUserAgent {
|
|||
return r
|
||||
}
|
||||
|
||||
func addSDKMetadata(r *requestUserAgent) {
|
||||
func addSDKMetadata(r *RequestUserAgent) {
|
||||
r.AddSDKAgentKey(OperatingSystemMetadata, getNormalizedOSName())
|
||||
r.AddSDKAgentKeyValue(LanguageMetadata, "go", languageVersion)
|
||||
r.AddSDKAgentKeyValue(AdditionalMetadata, "GOOS", runtime.GOOS)
|
||||
|
|
@ -162,18 +162,18 @@ func AddRequestUserAgentMiddleware(stack *middleware.Stack) error {
|
|||
return err
|
||||
}
|
||||
|
||||
func getOrAddRequestUserAgent(stack *middleware.Stack) (*requestUserAgent, error) {
|
||||
id := (*requestUserAgent)(nil).ID()
|
||||
func getOrAddRequestUserAgent(stack *middleware.Stack) (*RequestUserAgent, error) {
|
||||
id := (*RequestUserAgent)(nil).ID()
|
||||
bm, ok := stack.Build.Get(id)
|
||||
if !ok {
|
||||
bm = newRequestUserAgent()
|
||||
bm = NewRequestUserAgent()
|
||||
err := stack.Build.Add(bm, middleware.After)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
}
|
||||
|
||||
requestUserAgent, ok := bm.(*requestUserAgent)
|
||||
requestUserAgent, ok := bm.(*RequestUserAgent)
|
||||
if !ok {
|
||||
return nil, fmt.Errorf("%T for %s middleware did not match expected type", bm, id)
|
||||
}
|
||||
|
|
@ -182,34 +182,34 @@ func getOrAddRequestUserAgent(stack *middleware.Stack) (*requestUserAgent, error
|
|||
}
|
||||
|
||||
// AddUserAgentKey adds the component identified by name to the User-Agent string.
|
||||
func (u *requestUserAgent) AddUserAgentKey(key string) {
|
||||
func (u *RequestUserAgent) AddUserAgentKey(key string) {
|
||||
u.userAgent.AddKey(strings.Map(rules, key))
|
||||
}
|
||||
|
||||
// AddUserAgentKeyValue adds the key identified by the given name and value to the User-Agent string.
|
||||
func (u *requestUserAgent) AddUserAgentKeyValue(key, value string) {
|
||||
func (u *RequestUserAgent) AddUserAgentKeyValue(key, value string) {
|
||||
u.userAgent.AddKeyValue(strings.Map(rules, key), strings.Map(rules, value))
|
||||
}
|
||||
|
||||
// AddUserAgentKey adds the component identified by name to the User-Agent string.
|
||||
func (u *requestUserAgent) AddSDKAgentKey(keyType SDKAgentKeyType, key string) {
|
||||
// AddSDKAgentKey adds the component identified by name to the User-Agent string.
|
||||
func (u *RequestUserAgent) AddSDKAgentKey(keyType SDKAgentKeyType, key string) {
|
||||
// TODO: should target sdkAgent
|
||||
u.userAgent.AddKey(keyType.string() + "/" + strings.Map(rules, key))
|
||||
}
|
||||
|
||||
// AddUserAgentKeyValue adds the key identified by the given name and value to the User-Agent string.
|
||||
func (u *requestUserAgent) AddSDKAgentKeyValue(keyType SDKAgentKeyType, key, value string) {
|
||||
// AddSDKAgentKeyValue adds the key identified by the given name and value to the User-Agent string.
|
||||
func (u *RequestUserAgent) AddSDKAgentKeyValue(keyType SDKAgentKeyType, key, value string) {
|
||||
// TODO: should target sdkAgent
|
||||
u.userAgent.AddKeyValue(keyType.string(), strings.Map(rules, key)+"#"+strings.Map(rules, value))
|
||||
}
|
||||
|
||||
// ID the name of the middleware.
|
||||
func (u *requestUserAgent) ID() string {
|
||||
func (u *RequestUserAgent) ID() string {
|
||||
return "UserAgent"
|
||||
}
|
||||
|
||||
// HandleBuild adds or appends the constructed user agent to the request.
|
||||
func (u *requestUserAgent) HandleBuild(ctx context.Context, in middleware.BuildInput, next middleware.BuildHandler) (
|
||||
func (u *RequestUserAgent) HandleBuild(ctx context.Context, in middleware.BuildInput, next middleware.BuildHandler) (
|
||||
out middleware.BuildOutput, metadata middleware.Metadata, err error,
|
||||
) {
|
||||
switch req := in.Request.(type) {
|
||||
|
|
@ -224,12 +224,12 @@ func (u *requestUserAgent) HandleBuild(ctx context.Context, in middleware.BuildI
|
|||
return next.HandleBuild(ctx, in)
|
||||
}
|
||||
|
||||
func (u *requestUserAgent) addHTTPUserAgent(request *smithyhttp.Request) {
|
||||
func (u *RequestUserAgent) addHTTPUserAgent(request *smithyhttp.Request) {
|
||||
const userAgent = "User-Agent"
|
||||
updateHTTPHeader(request, userAgent, u.userAgent.Build())
|
||||
}
|
||||
|
||||
func (u *requestUserAgent) addHTTPSDKAgent(request *smithyhttp.Request) {
|
||||
func (u *RequestUserAgent) addHTTPSDKAgent(request *smithyhttp.Request) {
|
||||
const sdkAgent = "X-Amz-User-Agent"
|
||||
updateHTTPHeader(request, sdkAgent, u.sdkAgent.Build())
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,3 +1,11 @@
|
|||
# v1.6.2 (2024-03-29)
|
||||
|
||||
* No change notes available for this release.
|
||||
|
||||
# v1.6.1 (2024-02-21)
|
||||
|
||||
* No change notes available for this release.
|
||||
|
||||
# v1.6.0 (2024-02-13)
|
||||
|
||||
* **Feature**: Bump minimum Go version to 1.20 per our language support policy.
|
||||
|
|
|
|||
2
vendor/github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream/go_module_metadata.go
generated
vendored
2
vendor/github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream/go_module_metadata.go
generated
vendored
|
|
@ -3,4 +3,4 @@
|
|||
package eventstream
|
||||
|
||||
// goModuleVersion is the tagged release for this module
|
||||
const goModuleVersion = "1.6.0"
|
||||
const goModuleVersion = "1.6.2"
|
||||
|
|
|
|||
|
|
@ -0,0 +1,20 @@
|
|||
package ratelimit
|
||||
|
||||
import "context"
|
||||
|
||||
// None implements a no-op rate limiter which effectively disables client-side
|
||||
// rate limiting (also known as "retry quotas").
|
||||
//
|
||||
// GetToken does nothing and always returns a nil error. The returned
|
||||
// token-release function does nothing, and always returns a nil error.
|
||||
//
|
||||
// AddTokens does nothing and always returns a nil error.
|
||||
var None = &none{}
|
||||
|
||||
type none struct{}
|
||||
|
||||
func (*none) GetToken(ctx context.Context, cost uint) (func() error, error) {
|
||||
return func() error { return nil }, nil
|
||||
}
|
||||
|
||||
func (*none) AddTokens(v uint) error { return nil }
|
||||
|
|
@ -2,12 +2,15 @@ package retry
|
|||
|
||||
import (
|
||||
"context"
|
||||
"errors"
|
||||
"fmt"
|
||||
"github.com/aws/aws-sdk-go-v2/aws/middleware/private/metrics"
|
||||
"strconv"
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
"github.com/aws/aws-sdk-go-v2/aws/middleware/private/metrics"
|
||||
internalcontext "github.com/aws/aws-sdk-go-v2/internal/context"
|
||||
|
||||
"github.com/aws/aws-sdk-go-v2/aws"
|
||||
awsmiddle "github.com/aws/aws-sdk-go-v2/aws/middleware"
|
||||
"github.com/aws/aws-sdk-go-v2/internal/sdk"
|
||||
|
|
@ -39,6 +42,10 @@ type Attempt struct {
|
|||
requestCloner RequestCloner
|
||||
}
|
||||
|
||||
// define the threshold at which we will consider certain kind of errors to be probably
|
||||
// caused by clock skew
|
||||
const skewThreshold = 4 * time.Minute
|
||||
|
||||
// NewAttemptMiddleware returns a new Attempt retry middleware.
|
||||
func NewAttemptMiddleware(retryer aws.Retryer, requestCloner RequestCloner, optFns ...func(*Attempt)) *Attempt {
|
||||
m := &Attempt{
|
||||
|
|
@ -86,6 +93,9 @@ func (r *Attempt) HandleFinalize(ctx context.Context, in smithymiddle.FinalizeIn
|
|||
AttemptClockSkew: attemptClockSkew,
|
||||
})
|
||||
|
||||
// Setting clock skew to be used on other context (like signing)
|
||||
ctx = internalcontext.SetAttemptSkewContext(ctx, attemptClockSkew)
|
||||
|
||||
var attemptResult AttemptResult
|
||||
out, attemptResult, releaseRetryToken, err = r.handleAttempt(attemptCtx, attemptInput, releaseRetryToken, next)
|
||||
attemptClockSkew, _ = awsmiddle.GetAttemptSkew(attemptResult.ResponseMetadata)
|
||||
|
|
@ -185,6 +195,8 @@ func (r *Attempt) handleAttempt(
|
|||
return out, attemptResult, nopRelease, err
|
||||
}
|
||||
|
||||
err = wrapAsClockSkew(ctx, err)
|
||||
|
||||
//------------------------------
|
||||
// Is Retryable and Should Retry
|
||||
//------------------------------
|
||||
|
|
@ -247,6 +259,37 @@ func (r *Attempt) handleAttempt(
|
|||
return out, attemptResult, releaseRetryToken, err
|
||||
}
|
||||
|
||||
// errors that, if detected when we know there's a clock skew,
|
||||
// can be retried and have a high chance of success
|
||||
var possibleSkewCodes = map[string]struct{}{
|
||||
"InvalidSignatureException": {},
|
||||
"SignatureDoesNotMatch": {},
|
||||
"AuthFailure": {},
|
||||
}
|
||||
|
||||
var definiteSkewCodes = map[string]struct{}{
|
||||
"RequestExpired": {},
|
||||
"RequestInTheFuture": {},
|
||||
"RequestTimeTooSkewed": {},
|
||||
}
|
||||
|
||||
// wrapAsClockSkew checks if this error could be related to a clock skew
|
||||
// error and if so, wrap the error.
|
||||
func wrapAsClockSkew(ctx context.Context, err error) error {
|
||||
var v interface{ ErrorCode() string }
|
||||
if !errors.As(err, &v) {
|
||||
return err
|
||||
}
|
||||
if _, ok := definiteSkewCodes[v.ErrorCode()]; ok {
|
||||
return &retryableClockSkewError{Err: err}
|
||||
}
|
||||
_, isPossibleSkewCode := possibleSkewCodes[v.ErrorCode()]
|
||||
if skew := internalcontext.GetAttemptSkewContext(ctx); skew > skewThreshold && isPossibleSkewCode {
|
||||
return &retryableClockSkewError{Err: err}
|
||||
}
|
||||
return err
|
||||
}
|
||||
|
||||
// MetricsHeader attaches SDK request metric header for retries to the transport
|
||||
type MetricsHeader struct{}
|
||||
|
||||
|
|
|
|||
|
|
@ -2,6 +2,7 @@ package retry
|
|||
|
||||
import (
|
||||
"errors"
|
||||
"fmt"
|
||||
"net"
|
||||
"net/url"
|
||||
"strings"
|
||||
|
|
@ -199,3 +200,23 @@ func (r RetryableErrorCode) IsErrorRetryable(err error) aws.Ternary {
|
|||
|
||||
return aws.TrueTernary
|
||||
}
|
||||
|
||||
// retryableClockSkewError marks errors that can be caused by clock skew
|
||||
// (difference between server time and client time).
|
||||
// This is returned when there's certain confidence that adjusting the client time
|
||||
// could allow a retry to succeed
|
||||
type retryableClockSkewError struct{ Err error }
|
||||
|
||||
func (e *retryableClockSkewError) Error() string {
|
||||
return fmt.Sprintf("Probable clock skew error: %v", e.Err)
|
||||
}
|
||||
|
||||
// Unwrap returns the wrapped error.
|
||||
func (e *retryableClockSkewError) Unwrap() error {
|
||||
return e.Err
|
||||
}
|
||||
|
||||
// RetryableError allows the retryer to retry this request
|
||||
func (e *retryableClockSkewError) RetryableError() bool {
|
||||
return true
|
||||
}
|
||||
|
|
|
|||
|
|
@ -123,6 +123,17 @@ type StandardOptions struct {
|
|||
|
||||
// Provides the rate limiting strategy for rate limiting attempt retries
|
||||
// across all attempts the retryer is being used with.
|
||||
//
|
||||
// A RateLimiter operates as a token bucket with a set capacity, where
|
||||
// attempt failures events consume tokens. A retry attempt that attempts to
|
||||
// consume more tokens than what's available results in operation failure.
|
||||
// The default implementation is parameterized as follows:
|
||||
// - a capacity of 500 (DefaultRetryRateTokens)
|
||||
// - a retry caused by a timeout costs 10 tokens (DefaultRetryCost)
|
||||
// - a retry caused by other errors costs 5 tokens (DefaultRetryTimeoutCost)
|
||||
// - an operation that succeeds on the 1st attempt adds 1 token (DefaultNoRetryIncrement)
|
||||
//
|
||||
// You can disable rate limiting by setting this field to ratelimit.None.
|
||||
RateLimiter RateLimiter
|
||||
|
||||
// The cost to deduct from the RateLimiter's token bucket per retry.
|
||||
|
|
|
|||
|
|
@ -38,7 +38,6 @@ var RequiredSignedHeaders = Rules{
|
|||
"X-Amz-Copy-Source-Server-Side-Encryption-Customer-Algorithm": struct{}{},
|
||||
"X-Amz-Copy-Source-Server-Side-Encryption-Customer-Key": struct{}{},
|
||||
"X-Amz-Copy-Source-Server-Side-Encryption-Customer-Key-Md5": struct{}{},
|
||||
"X-Amz-Expected-Bucket-Owner": struct{}{},
|
||||
"X-Amz-Grant-Full-control": struct{}{},
|
||||
"X-Amz-Grant-Read": struct{}{},
|
||||
"X-Amz-Grant-Read-Acp": struct{}{},
|
||||
|
|
|
|||
|
|
@ -11,7 +11,6 @@ import (
|
|||
|
||||
"github.com/aws/aws-sdk-go-v2/aws"
|
||||
awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
|
||||
"github.com/aws/aws-sdk-go-v2/aws/middleware/private/metrics"
|
||||
v4Internal "github.com/aws/aws-sdk-go-v2/aws/signer/internal/v4"
|
||||
internalauth "github.com/aws/aws-sdk-go-v2/internal/auth"
|
||||
"github.com/aws/aws-sdk-go-v2/internal/sdk"
|
||||
|
|
@ -85,12 +84,12 @@ func (m *dynamicPayloadSigningMiddleware) HandleFinalize(
|
|||
}
|
||||
|
||||
if req.IsHTTPS() {
|
||||
return (&unsignedPayload{}).HandleFinalize(ctx, in, next)
|
||||
return (&UnsignedPayload{}).HandleFinalize(ctx, in, next)
|
||||
}
|
||||
return (&computePayloadSHA256{}).HandleFinalize(ctx, in, next)
|
||||
return (&ComputePayloadSHA256{}).HandleFinalize(ctx, in, next)
|
||||
}
|
||||
|
||||
// unsignedPayload sets the SigV4 request payload hash to unsigned.
|
||||
// UnsignedPayload sets the SigV4 request payload hash to unsigned.
|
||||
//
|
||||
// Will not set the Unsigned Payload magic SHA value, if a SHA has already been
|
||||
// stored in the context. (e.g. application pre-computed SHA256 before making
|
||||
|
|
@ -98,21 +97,21 @@ func (m *dynamicPayloadSigningMiddleware) HandleFinalize(
|
|||
//
|
||||
// This middleware does not check the X-Amz-Content-Sha256 header, if that
|
||||
// header is serialized a middleware must translate it into the context.
|
||||
type unsignedPayload struct{}
|
||||
type UnsignedPayload struct{}
|
||||
|
||||
// AddUnsignedPayloadMiddleware adds unsignedPayload to the operation
|
||||
// middleware stack
|
||||
func AddUnsignedPayloadMiddleware(stack *middleware.Stack) error {
|
||||
return stack.Finalize.Insert(&unsignedPayload{}, "ResolveEndpointV2", middleware.After)
|
||||
return stack.Finalize.Insert(&UnsignedPayload{}, "ResolveEndpointV2", middleware.After)
|
||||
}
|
||||
|
||||
// ID returns the unsignedPayload identifier
|
||||
func (m *unsignedPayload) ID() string {
|
||||
func (m *UnsignedPayload) ID() string {
|
||||
return computePayloadHashMiddlewareID
|
||||
}
|
||||
|
||||
// HandleFinalize sets the payload hash magic value to the unsigned sentinel.
|
||||
func (m *unsignedPayload) HandleFinalize(
|
||||
func (m *UnsignedPayload) HandleFinalize(
|
||||
ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler,
|
||||
) (
|
||||
out middleware.FinalizeOutput, metadata middleware.Metadata, err error,
|
||||
|
|
@ -123,7 +122,7 @@ func (m *unsignedPayload) HandleFinalize(
|
|||
return next.HandleFinalize(ctx, in)
|
||||
}
|
||||
|
||||
// computePayloadSHA256 computes SHA256 payload hash to sign.
|
||||
// ComputePayloadSHA256 computes SHA256 payload hash to sign.
|
||||
//
|
||||
// Will not set the Unsigned Payload magic SHA value, if a SHA has already been
|
||||
// stored in the context. (e.g. application pre-computed SHA256 before making
|
||||
|
|
@ -131,12 +130,12 @@ func (m *unsignedPayload) HandleFinalize(
|
|||
//
|
||||
// This middleware does not check the X-Amz-Content-Sha256 header, if that
|
||||
// header is serialized a middleware must translate it into the context.
|
||||
type computePayloadSHA256 struct{}
|
||||
type ComputePayloadSHA256 struct{}
|
||||
|
||||
// AddComputePayloadSHA256Middleware adds computePayloadSHA256 to the
|
||||
// operation middleware stack
|
||||
func AddComputePayloadSHA256Middleware(stack *middleware.Stack) error {
|
||||
return stack.Finalize.Insert(&computePayloadSHA256{}, "ResolveEndpointV2", middleware.After)
|
||||
return stack.Finalize.Insert(&ComputePayloadSHA256{}, "ResolveEndpointV2", middleware.After)
|
||||
}
|
||||
|
||||
// RemoveComputePayloadSHA256Middleware removes computePayloadSHA256 from the
|
||||
|
|
@ -147,13 +146,13 @@ func RemoveComputePayloadSHA256Middleware(stack *middleware.Stack) error {
|
|||
}
|
||||
|
||||
// ID is the middleware name
|
||||
func (m *computePayloadSHA256) ID() string {
|
||||
func (m *ComputePayloadSHA256) ID() string {
|
||||
return computePayloadHashMiddlewareID
|
||||
}
|
||||
|
||||
// HandleFinalize computes the payload hash for the request, storing it to the
|
||||
// context. This is a no-op if a caller has previously set that value.
|
||||
func (m *computePayloadSHA256) HandleFinalize(
|
||||
func (m *ComputePayloadSHA256) HandleFinalize(
|
||||
ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler,
|
||||
) (
|
||||
out middleware.FinalizeOutput, metadata middleware.Metadata, err error,
|
||||
|
|
@ -196,35 +195,35 @@ func (m *computePayloadSHA256) HandleFinalize(
|
|||
// Use this to disable computing the Payload SHA256 checksum and instead use
|
||||
// UNSIGNED-PAYLOAD for the SHA256 value.
|
||||
func SwapComputePayloadSHA256ForUnsignedPayloadMiddleware(stack *middleware.Stack) error {
|
||||
_, err := stack.Finalize.Swap(computePayloadHashMiddlewareID, &unsignedPayload{})
|
||||
_, err := stack.Finalize.Swap(computePayloadHashMiddlewareID, &UnsignedPayload{})
|
||||
return err
|
||||
}
|
||||
|
||||
// contentSHA256Header sets the X-Amz-Content-Sha256 header value to
|
||||
// ContentSHA256Header sets the X-Amz-Content-Sha256 header value to
|
||||
// the Payload hash stored in the context.
|
||||
type contentSHA256Header struct{}
|
||||
type ContentSHA256Header struct{}
|
||||
|
||||
// AddContentSHA256HeaderMiddleware adds ContentSHA256Header to the
|
||||
// operation middleware stack
|
||||
func AddContentSHA256HeaderMiddleware(stack *middleware.Stack) error {
|
||||
return stack.Finalize.Insert(&contentSHA256Header{}, computePayloadHashMiddlewareID, middleware.After)
|
||||
return stack.Finalize.Insert(&ContentSHA256Header{}, computePayloadHashMiddlewareID, middleware.After)
|
||||
}
|
||||
|
||||
// RemoveContentSHA256HeaderMiddleware removes contentSHA256Header middleware
|
||||
// from the operation middleware stack
|
||||
func RemoveContentSHA256HeaderMiddleware(stack *middleware.Stack) error {
|
||||
_, err := stack.Finalize.Remove((*contentSHA256Header)(nil).ID())
|
||||
_, err := stack.Finalize.Remove((*ContentSHA256Header)(nil).ID())
|
||||
return err
|
||||
}
|
||||
|
||||
// ID returns the ContentSHA256HeaderMiddleware identifier
|
||||
func (m *contentSHA256Header) ID() string {
|
||||
func (m *ContentSHA256Header) ID() string {
|
||||
return "SigV4ContentSHA256Header"
|
||||
}
|
||||
|
||||
// HandleFinalize sets the X-Amz-Content-Sha256 header value to the Payload hash
|
||||
// stored in the context.
|
||||
func (m *contentSHA256Header) HandleFinalize(
|
||||
func (m *ContentSHA256Header) HandleFinalize(
|
||||
ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler,
|
||||
) (
|
||||
out middleware.FinalizeOutput, metadata middleware.Metadata, err error,
|
||||
|
|
@ -301,22 +300,7 @@ func (s *SignHTTPRequestMiddleware) HandleFinalize(ctx context.Context, in middl
|
|||
return out, metadata, &SigningError{Err: fmt.Errorf("computed payload hash missing from context")}
|
||||
}
|
||||
|
||||
mctx := metrics.Context(ctx)
|
||||
|
||||
if mctx != nil {
|
||||
if attempt, err := mctx.Data().LatestAttempt(); err == nil {
|
||||
attempt.CredentialFetchStartTime = sdk.NowTime()
|
||||
}
|
||||
}
|
||||
|
||||
credentials, err := s.credentialsProvider.Retrieve(ctx)
|
||||
|
||||
if mctx != nil {
|
||||
if attempt, err := mctx.Data().LatestAttempt(); err == nil {
|
||||
attempt.CredentialFetchEndTime = sdk.NowTime()
|
||||
}
|
||||
}
|
||||
|
||||
if err != nil {
|
||||
return out, metadata, &SigningError{Err: fmt.Errorf("failed to retrieve credentials: %w", err)}
|
||||
}
|
||||
|
|
@ -337,20 +321,7 @@ func (s *SignHTTPRequestMiddleware) HandleFinalize(ctx context.Context, in middl
|
|||
})
|
||||
}
|
||||
|
||||
if mctx != nil {
|
||||
if attempt, err := mctx.Data().LatestAttempt(); err == nil {
|
||||
attempt.SignStartTime = sdk.NowTime()
|
||||
}
|
||||
}
|
||||
|
||||
err = s.signer.SignHTTP(ctx, credentials, req.Request, payloadHash, signingName, signingRegion, sdk.NowTime(), signerOptions...)
|
||||
|
||||
if mctx != nil {
|
||||
if attempt, err := mctx.Data().LatestAttempt(); err == nil {
|
||||
attempt.SignEndTime = sdk.NowTime()
|
||||
}
|
||||
}
|
||||
|
||||
if err != nil {
|
||||
return out, metadata, &SigningError{Err: fmt.Errorf("failed to sign http request, %w", err)}
|
||||
}
|
||||
|
|
@ -360,18 +331,21 @@ func (s *SignHTTPRequestMiddleware) HandleFinalize(ctx context.Context, in middl
|
|||
return next.HandleFinalize(ctx, in)
|
||||
}
|
||||
|
||||
type streamingEventsPayload struct{}
|
||||
// StreamingEventsPayload signs input event stream messages.
|
||||
type StreamingEventsPayload struct{}
|
||||
|
||||
// AddStreamingEventsPayload adds the streamingEventsPayload middleware to the stack.
|
||||
func AddStreamingEventsPayload(stack *middleware.Stack) error {
|
||||
return stack.Finalize.Add(&streamingEventsPayload{}, middleware.Before)
|
||||
return stack.Finalize.Add(&StreamingEventsPayload{}, middleware.Before)
|
||||
}
|
||||
|
||||
func (s *streamingEventsPayload) ID() string {
|
||||
// ID identifies the middleware.
|
||||
func (s *StreamingEventsPayload) ID() string {
|
||||
return computePayloadHashMiddlewareID
|
||||
}
|
||||
|
||||
func (s *streamingEventsPayload) HandleFinalize(
|
||||
// HandleFinalize marks the input stream to be signed with SigV4.
|
||||
func (s *StreamingEventsPayload) HandleFinalize(
|
||||
ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler,
|
||||
) (
|
||||
out middleware.FinalizeOutput, metadata middleware.Metadata, err error,
|
||||
|
|
|
|||
|
|
@ -1,48 +1,41 @@
|
|||
// Package v4 implements signing for AWS V4 signer
|
||||
// Package v4 implements the AWS signature version 4 algorithm (commonly known
|
||||
// as SigV4).
|
||||
//
|
||||
// Provides request signing for request that need to be signed with
|
||||
// AWS V4 Signatures.
|
||||
// For more information about SigV4, see [Signing AWS API requests] in the IAM
|
||||
// user guide.
|
||||
//
|
||||
// # Standalone Signer
|
||||
// While this implementation CAN work in an external context, it is developed
|
||||
// primarily for SDK use and you may encounter fringe behaviors around header
|
||||
// canonicalization.
|
||||
//
|
||||
// Generally using the signer outside of the SDK should not require any additional
|
||||
// # Pre-escaping a request URI
|
||||
//
|
||||
// The signer does this by taking advantage of the URL.EscapedPath method. If your request URI requires
|
||||
// AWS v4 signature validation requires that the canonical string's URI path
|
||||
// component must be the escaped form of the HTTP request's path.
|
||||
//
|
||||
// additional escaping you many need to use the URL.Opaque to define what the raw URI should be sent
|
||||
// to the service as.
|
||||
// The Go HTTP client will perform escaping automatically on the HTTP request.
|
||||
// This may cause signature validation errors because the request differs from
|
||||
// the URI path or query from which the signature was generated.
|
||||
//
|
||||
// The signer will first check the URL.Opaque field, and use its value if set.
|
||||
// The signer does require the URL.Opaque field to be set in the form of:
|
||||
// Because of this, we recommend that you explicitly escape the request when
|
||||
// using this signer outside of the SDK to prevent possible signature mismatch.
|
||||
// This can be done by setting URL.Opaque on the request. The signer will
|
||||
// prefer that value, falling back to the return of URL.EscapedPath if unset.
|
||||
//
|
||||
// When setting URL.Opaque you must do so in the form of:
|
||||
//
|
||||
// "//<hostname>/<path>"
|
||||
//
|
||||
// // e.g.
|
||||
// "//example.com/some/path"
|
||||
//
|
||||
// The leading "//" and hostname are required or the URL.Opaque escaping will
|
||||
// not work correctly.
|
||||
// The leading "//" and hostname are required or the escaping will not work
|
||||
// correctly.
|
||||
//
|
||||
// If URL.Opaque is not set the signer will fallback to the URL.EscapedPath()
|
||||
// method and using the returned value.
|
||||
// The TestStandaloneSign unit test provides a complete example of using the
|
||||
// signer outside of the SDK and pre-escaping the URI path.
|
||||
//
|
||||
// AWS v4 signature validation requires that the canonical string's URI path
|
||||
// element must be the URI escaped form of the HTTP request's path.
|
||||
// http://docs.aws.amazon.com/general/latest/gr/sigv4-create-canonical-request.html
|
||||
//
|
||||
// The Go HTTP client will perform escaping automatically on the request. Some
|
||||
// of these escaping may cause signature validation errors because the HTTP
|
||||
// request differs from the URI path or query that the signature was generated.
|
||||
// https://golang.org/pkg/net/url/#URL.EscapedPath
|
||||
//
|
||||
// Because of this, it is recommended that when using the signer outside of the
|
||||
// SDK that explicitly escaping the request prior to being signed is preferable,
|
||||
// and will help prevent signature validation errors. This can be done by setting
|
||||
// the URL.Opaque or URL.RawPath. The SDK will use URL.Opaque first and then
|
||||
// call URL.EscapedPath() if Opaque is not set.
|
||||
//
|
||||
// Test `TestStandaloneSign` provides a complete example of using the signer
|
||||
// outside of the SDK and pre-escaping the URI path.
|
||||
// [Signing AWS API requests]: https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_aws-signing.html
|
||||
package v4
|
||||
|
||||
import (
|
||||
|
|
@ -402,6 +395,12 @@ func buildQuery(r v4Internal.Rule, header http.Header) (url.Values, http.Header)
|
|||
query := url.Values{}
|
||||
unsignedHeaders := http.Header{}
|
||||
for k, h := range header {
|
||||
// literally just this header has this constraint for some stupid reason,
|
||||
// see #2508
|
||||
if k == "X-Amz-Expected-Bucket-Owner" {
|
||||
k = "x-amz-expected-bucket-owner"
|
||||
}
|
||||
|
||||
if r.IsValid(k) {
|
||||
query[k] = h
|
||||
} else {
|
||||
|
|
|
|||
10
vendor/github.com/aws/aws-sdk-go-v2/aws/transport/http/response_error_middleware.go
generated
vendored
10
vendor/github.com/aws/aws-sdk-go-v2/aws/transport/http/response_error_middleware.go
generated
vendored
|
|
@ -12,18 +12,20 @@ import (
|
|||
func AddResponseErrorMiddleware(stack *middleware.Stack) error {
|
||||
// add error wrapper middleware before request id retriever middleware so that it can wrap the error response
|
||||
// returned by operation deserializers
|
||||
return stack.Deserialize.Insert(&responseErrorWrapper{}, "RequestIDRetriever", middleware.Before)
|
||||
return stack.Deserialize.Insert(&ResponseErrorWrapper{}, "RequestIDRetriever", middleware.Before)
|
||||
}
|
||||
|
||||
type responseErrorWrapper struct {
|
||||
// ResponseErrorWrapper wraps operation errors with ResponseError.
|
||||
type ResponseErrorWrapper struct {
|
||||
}
|
||||
|
||||
// ID returns the middleware identifier
|
||||
func (m *responseErrorWrapper) ID() string {
|
||||
func (m *ResponseErrorWrapper) ID() string {
|
||||
return "ResponseErrorWrapper"
|
||||
}
|
||||
|
||||
func (m *responseErrorWrapper) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
|
||||
// HandleDeserialize wraps the stack error with smithyhttp.ResponseError.
|
||||
func (m *ResponseErrorWrapper) 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)
|
||||
|
|
|
|||
|
|
@ -1,3 +1,95 @@
|
|||
# v1.27.18 (2024-06-07)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.27.17 (2024-06-03)
|
||||
|
||||
* **Documentation**: Add deprecation docs to global endpoint resolution interfaces. These APIs were previously deprecated with the introduction of service-specific endpoint resolution (EndpointResolverV2 and BaseEndpoint on service client options).
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.27.16 (2024-05-23)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.27.15 (2024-05-16)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.27.14 (2024-05-15)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.27.13 (2024-05-10)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.27.12 (2024-05-08)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.27.11 (2024-04-05)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.27.10 (2024-03-29)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.27.9 (2024-03-21)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.27.8 (2024-03-18)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.27.7 (2024-03-07)
|
||||
|
||||
* **Bug Fix**: Remove dependency on go-cmp.
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.27.6 (2024-03-05)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.27.5 (2024-03-04)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.27.4 (2024-02-23)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.27.3 (2024-02-22)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.27.2 (2024-02-21)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.27.1 (2024-02-20)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.27.0 (2024-02-13)
|
||||
|
||||
* **Feature**: Bump minimum Go version to 1.20 per our language support policy.
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.26.6 (2024-01-22)
|
||||
|
||||
* **Bug Fix**: Remove invalid escaping of shared config values. All values in the shared config file will now be interpreted literally, save for fully-quoted strings which are unwrapped for legacy reasons.
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.26.5 (2024-01-18)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.26.4 (2024-01-16)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.26.3 (2024-01-04)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
|
|
|||
|
|
@ -3,4 +3,4 @@
|
|||
package config
|
||||
|
||||
// goModuleVersion is the tagged release for this module
|
||||
const goModuleVersion = "1.26.3"
|
||||
const goModuleVersion = "1.27.18"
|
||||
|
|
|
|||
|
|
@ -824,7 +824,14 @@ func (o LoadOptions) getEndpointResolver(ctx context.Context) (aws.EndpointResol
|
|||
// the EndpointResolver value is ignored. If multiple WithEndpointResolver calls
|
||||
// are made, the last call overrides the previous call values.
|
||||
//
|
||||
// Deprecated: See WithEndpointResolverWithOptions
|
||||
// Deprecated: The global endpoint resolution interface is deprecated. The API
|
||||
// for endpoint resolution is now unique to each service and is set via the
|
||||
// EndpointResolverV2 field on service client options. Use of
|
||||
// WithEndpointResolver or WithEndpointResolverWithOptions will prevent you
|
||||
// from using any endpoint-related service features released after the
|
||||
// introduction of EndpointResolverV2. You may also encounter broken or
|
||||
// unexpected behavior when using the old global interface with services that
|
||||
// use many endpoint-related customizations such as S3.
|
||||
func WithEndpointResolver(v aws.EndpointResolver) LoadOptionsFunc {
|
||||
return func(o *LoadOptions) error {
|
||||
o.EndpointResolver = v
|
||||
|
|
@ -844,6 +851,9 @@ func (o LoadOptions) getEndpointResolverWithOptions(ctx context.Context) (aws.En
|
|||
// that sets the EndpointResolverWithOptions on LoadOptions. If the EndpointResolverWithOptions is set to nil,
|
||||
// the EndpointResolver value is ignored. If multiple WithEndpointResolver calls
|
||||
// are made, the last call overrides the previous call values.
|
||||
//
|
||||
// Deprecated: The global endpoint resolution interface is deprecated. See
|
||||
// deprecation docs on [WithEndpointResolver].
|
||||
func WithEndpointResolverWithOptions(v aws.EndpointResolverWithOptions) LoadOptionsFunc {
|
||||
return func(o *LoadOptions) error {
|
||||
o.EndpointResolverWithOptions = v
|
||||
|
|
|
|||
|
|
@ -1,3 +1,89 @@
|
|||
# v1.17.18 (2024-06-07)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.17.17 (2024-06-03)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.17.16 (2024-05-23)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.17.15 (2024-05-16)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.17.14 (2024-05-15)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.17.13 (2024-05-10)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.17.12 (2024-05-08)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.17.11 (2024-04-05)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.17.10 (2024-03-29)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.17.9 (2024-03-21)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.17.8 (2024-03-18)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.17.7 (2024-03-07)
|
||||
|
||||
* **Bug Fix**: Remove dependency on go-cmp.
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.17.6 (2024-03-05)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.17.5 (2024-03-04)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.17.4 (2024-02-23)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.17.3 (2024-02-22)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.17.2 (2024-02-21)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.17.1 (2024-02-20)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.17.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.16.16 (2024-01-18)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.16.15 (2024-01-16)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.16.14 (2024-01-04)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
|
|
|||
|
|
@ -3,4 +3,4 @@
|
|||
package credentials
|
||||
|
||||
// goModuleVersion is the tagged release for this module
|
||||
const goModuleVersion = "1.16.14"
|
||||
const goModuleVersion = "1.17.18"
|
||||
|
|
|
|||
|
|
@ -1,3 +1,49 @@
|
|||
# v1.16.5 (2024-06-07)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.16.4 (2024-06-03)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.16.3 (2024-05-16)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.16.2 (2024-05-15)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.16.1 (2024-03-29)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.16.0 (2024-03-21)
|
||||
|
||||
* **Feature**: Add config switch `DisableDefaultTimeout` that allows you to disable the default operation timeout (5 seconds) for IMDS calls.
|
||||
|
||||
# v1.15.4 (2024-03-18)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.15.3 (2024-03-07)
|
||||
|
||||
* **Bug Fix**: Remove dependency on go-cmp.
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.15.2 (2024-02-23)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.15.1 (2024-02-21)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.15.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.14.11 (2024-01-04)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
|
|
|||
|
|
@ -185,6 +185,10 @@ type Options struct {
|
|||
// [configuring IMDS]: https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/configuring-instance-metadata-service.html
|
||||
EnableFallback aws.Ternary
|
||||
|
||||
// By default, all IMDS client operations enforce a 5-second timeout. You
|
||||
// can disable that behavior with this setting.
|
||||
DisableDefaultTimeout bool
|
||||
|
||||
// provides the caching of API tokens used for operation calls. If unset,
|
||||
// the API token will not be retrieved for the operation.
|
||||
tokenProvider *tokenProvider
|
||||
|
|
|
|||
|
|
@ -3,8 +3,9 @@
|
|||
//
|
||||
// All Client operation calls have a default timeout. If the operation is not
|
||||
// completed before this timeout expires, the operation will be canceled. This
|
||||
// timeout can be overridden by providing Context with a timeout or deadline
|
||||
// with calling the client's operations.
|
||||
// timeout can be overridden through the following:
|
||||
// - Set the options flag DisableDefaultTimeout
|
||||
// - Provide a Context with a timeout or deadline with calling the client's operations.
|
||||
//
|
||||
// See the EC2 IMDS user guide for more information on using the API.
|
||||
// https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-instance-metadata.html
|
||||
|
|
|
|||
|
|
@ -3,4 +3,4 @@
|
|||
package imds
|
||||
|
||||
// goModuleVersion is the tagged release for this module
|
||||
const goModuleVersion = "1.14.11"
|
||||
const goModuleVersion = "1.16.5"
|
||||
|
|
|
|||
|
|
@ -56,6 +56,7 @@ func addRequestMiddleware(stack *middleware.Stack,
|
|||
|
||||
// Operation timeout
|
||||
err = stack.Initialize.Add(&operationTimeout{
|
||||
Disabled: options.DisableDefaultTimeout,
|
||||
DefaultTimeout: defaultOperationTimeout,
|
||||
}, middleware.Before)
|
||||
if err != nil {
|
||||
|
|
@ -260,6 +261,7 @@ const (
|
|||
// Otherwise the timeout cleanup will race the resource being consumed
|
||||
// upstream.
|
||||
type operationTimeout struct {
|
||||
Disabled bool
|
||||
DefaultTimeout time.Duration
|
||||
}
|
||||
|
||||
|
|
@ -270,6 +272,10 @@ func (m *operationTimeout) HandleInitialize(
|
|||
) (
|
||||
output middleware.InitializeOutput, metadata middleware.Metadata, err error,
|
||||
) {
|
||||
if m.Disabled {
|
||||
return next.HandleInitialize(ctx, input)
|
||||
}
|
||||
|
||||
if _, ok := ctx.Deadline(); !ok && m.DefaultTimeout != 0 {
|
||||
var cancelFn func()
|
||||
ctx, cancelFn = context.WithTimeout(ctx, m.DefaultTimeout)
|
||||
|
|
|
|||
|
|
@ -5,6 +5,7 @@ import (
|
|||
"fmt"
|
||||
|
||||
v4 "github.com/aws/aws-sdk-go-v2/aws/signer/v4"
|
||||
internalcontext "github.com/aws/aws-sdk-go-v2/internal/context"
|
||||
"github.com/aws/aws-sdk-go-v2/internal/sdk"
|
||||
"github.com/aws/smithy-go"
|
||||
"github.com/aws/smithy-go/auth"
|
||||
|
|
@ -39,7 +40,10 @@ func (v *V4SignerAdapter) SignRequest(ctx context.Context, r *smithyhttp.Request
|
|||
}
|
||||
|
||||
hash := v4.GetPayloadHash(ctx)
|
||||
err := v.Signer.SignHTTP(ctx, ca.Credentials, r.Request, hash, name, region, sdk.NowTime(), func(o *v4.SignerOptions) {
|
||||
signingTime := sdk.NowTime()
|
||||
skew := internalcontext.GetAttemptSkewContext(ctx)
|
||||
signingTime = signingTime.Add(skew)
|
||||
err := v.Signer.SignHTTP(ctx, ca.Credentials, r.Request, hash, name, region, signingTime, func(o *v4.SignerOptions) {
|
||||
o.DisableURIPathEscaping, _ = smithyhttp.GetDisableDoubleEncoding(&props)
|
||||
|
||||
o.Logger = v.Logger
|
||||
|
|
|
|||
|
|
@ -1,3 +1,39 @@
|
|||
# v1.3.9 (2024-06-07)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.3.8 (2024-06-03)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.3.7 (2024-05-16)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.3.6 (2024-05-15)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.3.5 (2024-03-29)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.3.4 (2024-03-18)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.3.3 (2024-03-07)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.3.2 (2024-02-23)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.3.1 (2024-02-21)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.3.0 (2024-02-13)
|
||||
|
||||
* **Feature**: Bump minimum Go version to 1.20 per our language support policy.
|
||||
|
|
|
|||
2
vendor/github.com/aws/aws-sdk-go-v2/internal/configsources/go_module_metadata.go
generated
vendored
2
vendor/github.com/aws/aws-sdk-go-v2/internal/configsources/go_module_metadata.go
generated
vendored
|
|
@ -3,4 +3,4 @@
|
|||
package configsources
|
||||
|
||||
// goModuleVersion is the tagged release for this module
|
||||
const goModuleVersion = "1.3.0"
|
||||
const goModuleVersion = "1.3.9"
|
||||
|
|
|
|||
|
|
@ -2,12 +2,14 @@ package context
|
|||
|
||||
import (
|
||||
"context"
|
||||
"time"
|
||||
|
||||
"github.com/aws/smithy-go/middleware"
|
||||
)
|
||||
|
||||
type s3BackendKey struct{}
|
||||
type checksumInputAlgorithmKey struct{}
|
||||
type clockSkew struct{}
|
||||
|
||||
const (
|
||||
// S3BackendS3Express identifies the S3Express backend
|
||||
|
|
@ -37,3 +39,14 @@ func GetChecksumInputAlgorithm(ctx context.Context) string {
|
|||
v, _ := middleware.GetStackValue(ctx, checksumInputAlgorithmKey{}).(string)
|
||||
return v
|
||||
}
|
||||
|
||||
// SetAttemptSkewContext sets the clock skew value on the context
|
||||
func SetAttemptSkewContext(ctx context.Context, v time.Duration) context.Context {
|
||||
return middleware.WithStackValue(ctx, clockSkew{}, v)
|
||||
}
|
||||
|
||||
// GetAttemptSkewContext gets the clock skew value from the context
|
||||
func GetAttemptSkewContext(ctx context.Context) time.Duration {
|
||||
x, _ := middleware.GetStackValue(ctx, clockSkew{}).(time.Duration)
|
||||
return x
|
||||
}
|
||||
|
|
|
|||
6
vendor/github.com/aws/aws-sdk-go-v2/internal/endpoints/awsrulesfn/partitions.json
generated
vendored
6
vendor/github.com/aws/aws-sdk-go-v2/internal/endpoints/awsrulesfn/partitions.json
generated
vendored
|
|
@ -198,7 +198,11 @@
|
|||
"supportsFIPS" : true
|
||||
},
|
||||
"regionRegex" : "^eu\\-isoe\\-\\w+\\-\\d+$",
|
||||
"regions" : { }
|
||||
"regions" : {
|
||||
"eu-isoe-west-1" : {
|
||||
"description" : "EU ISOE West"
|
||||
}
|
||||
}
|
||||
}, {
|
||||
"id" : "aws-iso-f",
|
||||
"outputs" : {
|
||||
|
|
|
|||
|
|
@ -1,3 +1,40 @@
|
|||
# v2.6.9 (2024-06-07)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v2.6.8 (2024-06-03)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v2.6.7 (2024-05-16)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v2.6.6 (2024-05-15)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v2.6.5 (2024-03-29)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v2.6.4 (2024-03-18)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v2.6.3 (2024-03-07)
|
||||
|
||||
* **Bug Fix**: Remove dependency on go-cmp.
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v2.6.2 (2024-02-23)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v2.6.1 (2024-02-21)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v2.6.0 (2024-02-13)
|
||||
|
||||
* **Feature**: Bump minimum Go version to 1.20 per our language support policy.
|
||||
|
|
|
|||
2
vendor/github.com/aws/aws-sdk-go-v2/internal/endpoints/v2/go_module_metadata.go
generated
vendored
2
vendor/github.com/aws/aws-sdk-go-v2/internal/endpoints/v2/go_module_metadata.go
generated
vendored
|
|
@ -3,4 +3,4 @@
|
|||
package endpoints
|
||||
|
||||
// goModuleVersion is the tagged release for this module
|
||||
const goModuleVersion = "2.6.0"
|
||||
const goModuleVersion = "2.6.9"
|
||||
|
|
|
|||
|
|
@ -1,3 +1,11 @@
|
|||
# v1.8.0 (2024-02-13)
|
||||
|
||||
* **Feature**: Bump minimum Go version to 1.20 per our language support policy.
|
||||
|
||||
# v1.7.3 (2024-01-22)
|
||||
|
||||
* **Bug Fix**: Remove invalid escaping of shared config values. All values in the shared config file will now be interpreted literally, save for fully-quoted strings which are unwrapped for legacy reasons.
|
||||
|
||||
# v1.7.2 (2023-12-08)
|
||||
|
||||
* **Bug Fix**: Correct loading of [services *] sections into shared config.
|
||||
|
|
|
|||
|
|
@ -3,4 +3,4 @@
|
|||
package ini
|
||||
|
||||
// goModuleVersion is the tagged release for this module
|
||||
const goModuleVersion = "1.7.2"
|
||||
const goModuleVersion = "1.8.0"
|
||||
|
|
|
|||
|
|
@ -67,12 +67,8 @@ func unquote(s string) string {
|
|||
|
||||
// applies various legacy conversions to property values:
|
||||
// - remote wrapping single/doublequotes
|
||||
// - expand escaped quote and newline sequences
|
||||
func legacyStrconv(s string) string {
|
||||
s = unquote(s)
|
||||
s = strings.ReplaceAll(s, `\"`, `"`)
|
||||
s = strings.ReplaceAll(s, `\'`, `'`)
|
||||
s = strings.ReplaceAll(s, `\n`, "\n")
|
||||
return s
|
||||
}
|
||||
|
||||
|
|
|
|||
42
vendor/github.com/aws/aws-sdk-go-v2/internal/middleware/middleware.go
generated
vendored
Normal file
42
vendor/github.com/aws/aws-sdk-go-v2/internal/middleware/middleware.go
generated
vendored
Normal file
|
|
@ -0,0 +1,42 @@
|
|||
package middleware
|
||||
|
||||
import (
|
||||
"context"
|
||||
"sync/atomic"
|
||||
"time"
|
||||
|
||||
internalcontext "github.com/aws/aws-sdk-go-v2/internal/context"
|
||||
"github.com/aws/smithy-go/middleware"
|
||||
)
|
||||
|
||||
// AddTimeOffsetMiddleware sets a value representing clock skew on the request context.
|
||||
// This can be read by other operations (such as signing) to correct the date value they send
|
||||
// on the request
|
||||
type AddTimeOffsetMiddleware struct {
|
||||
Offset *atomic.Int64
|
||||
}
|
||||
|
||||
// ID the identifier for AddTimeOffsetMiddleware
|
||||
func (m *AddTimeOffsetMiddleware) ID() string { return "AddTimeOffsetMiddleware" }
|
||||
|
||||
// HandleBuild sets a value for attemptSkew on the request context if one is set on the client.
|
||||
func (m AddTimeOffsetMiddleware) HandleBuild(ctx context.Context, in middleware.BuildInput, next middleware.BuildHandler) (
|
||||
out middleware.BuildOutput, metadata middleware.Metadata, err error,
|
||||
) {
|
||||
if m.Offset != nil {
|
||||
offset := time.Duration(m.Offset.Load())
|
||||
ctx = internalcontext.SetAttemptSkewContext(ctx, offset)
|
||||
}
|
||||
return next.HandleBuild(ctx, in)
|
||||
}
|
||||
|
||||
// HandleDeserialize gets the clock skew context from the context, and if set, sets it on the pointer
|
||||
// held by AddTimeOffsetMiddleware
|
||||
func (m *AddTimeOffsetMiddleware) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
|
||||
out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
|
||||
) {
|
||||
if v := internalcontext.GetAttemptSkewContext(ctx); v != 0 {
|
||||
m.Offset.Store(v.Nanoseconds())
|
||||
}
|
||||
return next.HandleDeserialize(ctx, in)
|
||||
}
|
||||
|
|
@ -1,3 +1,40 @@
|
|||
# v1.3.9 (2024-06-07)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.3.8 (2024-06-03)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.3.7 (2024-05-16)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.3.6 (2024-05-15)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.3.5 (2024-03-29)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.3.4 (2024-03-18)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.3.3 (2024-03-07)
|
||||
|
||||
* **Bug Fix**: Remove dependency on go-cmp.
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.3.2 (2024-02-23)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.3.1 (2024-02-21)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.3.0 (2024-02-13)
|
||||
|
||||
* **Feature**: Bump minimum Go version to 1.20 per our language support policy.
|
||||
|
|
|
|||
|
|
@ -3,4 +3,4 @@
|
|||
package v4a
|
||||
|
||||
// goModuleVersion is the tagged release for this module
|
||||
const goModuleVersion = "1.3.0"
|
||||
const goModuleVersion = "1.3.9"
|
||||
|
|
|
|||
|
|
@ -5,6 +5,8 @@ import (
|
|||
"fmt"
|
||||
"time"
|
||||
|
||||
internalcontext "github.com/aws/aws-sdk-go-v2/internal/context"
|
||||
|
||||
v4 "github.com/aws/aws-sdk-go-v2/aws/signer/v4"
|
||||
"github.com/aws/aws-sdk-go-v2/internal/sdk"
|
||||
"github.com/aws/smithy-go"
|
||||
|
|
@ -72,7 +74,11 @@ func (v *SignerAdapter) SignRequest(ctx context.Context, r *smithyhttp.Request,
|
|||
}
|
||||
|
||||
hash := v4.GetPayloadHash(ctx)
|
||||
err := v.Signer.SignHTTP(ctx, ca.Credentials, r.Request, hash, name, regions, sdk.NowTime(), func(o *SignerOptions) {
|
||||
signingTime := sdk.NowTime()
|
||||
if skew := internalcontext.GetAttemptSkewContext(ctx); skew != 0 {
|
||||
signingTime.Add(skew)
|
||||
}
|
||||
err := v.Signer.SignHTTP(ctx, ca.Credentials, r.Request, hash, name, regions, signingTime, func(o *SignerOptions) {
|
||||
o.DisableURIPathEscaping, _ = smithyhttp.GetDisableDoubleEncoding(&props)
|
||||
|
||||
o.Logger = v.Logger
|
||||
|
|
|
|||
8
vendor/github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding/CHANGELOG.md
generated
vendored
8
vendor/github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding/CHANGELOG.md
generated
vendored
|
|
@ -1,3 +1,11 @@
|
|||
# v1.11.2 (2024-03-29)
|
||||
|
||||
* No change notes available for this release.
|
||||
|
||||
# v1.11.1 (2024-02-21)
|
||||
|
||||
* No change notes available for this release.
|
||||
|
||||
# v1.11.0 (2024-02-13)
|
||||
|
||||
* **Feature**: Bump minimum Go version to 1.20 per our language support policy.
|
||||
|
|
|
|||
|
|
@ -3,4 +3,4 @@
|
|||
package acceptencoding
|
||||
|
||||
// goModuleVersion is the tagged release for this module
|
||||
const goModuleVersion = "1.11.0"
|
||||
const goModuleVersion = "1.11.2"
|
||||
|
|
|
|||
|
|
@ -1,3 +1,48 @@
|
|||
# v1.3.11 (2024-06-07)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.3.10 (2024-06-03)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.3.9 (2024-05-16)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.3.8 (2024-05-15)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.3.7 (2024-03-29)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.3.6 (2024-03-18)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.3.5 (2024-03-07)
|
||||
|
||||
* **Bug Fix**: Remove dependency on go-cmp.
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.3.4 (2024-03-05)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.3.3 (2024-03-04)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.3.2 (2024-02-23)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.3.1 (2024-02-21)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.3.0 (2024-02-13)
|
||||
|
||||
* **Feature**: Bump minimum Go version to 1.20 per our language support policy.
|
||||
|
|
|
|||
2
vendor/github.com/aws/aws-sdk-go-v2/service/internal/checksum/go_module_metadata.go
generated
vendored
2
vendor/github.com/aws/aws-sdk-go-v2/service/internal/checksum/go_module_metadata.go
generated
vendored
|
|
@ -3,4 +3,4 @@
|
|||
package checksum
|
||||
|
||||
// goModuleVersion is the tagged release for this module
|
||||
const goModuleVersion = "1.3.0"
|
||||
const goModuleVersion = "1.3.11"
|
||||
|
|
|
|||
45
vendor/github.com/aws/aws-sdk-go-v2/service/internal/presigned-url/CHANGELOG.md
generated
vendored
45
vendor/github.com/aws/aws-sdk-go-v2/service/internal/presigned-url/CHANGELOG.md
generated
vendored
|
|
@ -1,3 +1,48 @@
|
|||
# v1.11.11 (2024-06-07)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.11.10 (2024-06-03)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.11.9 (2024-05-16)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.11.8 (2024-05-15)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.11.7 (2024-03-29)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.11.6 (2024-03-18)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.11.5 (2024-03-07)
|
||||
|
||||
* **Bug Fix**: Remove dependency on go-cmp.
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.11.4 (2024-03-05)
|
||||
|
||||
* **Bug Fix**: Restore typo'd API `AddAsIsInternalPresigingMiddleware` as an alias for backwards compatibility.
|
||||
|
||||
# v1.11.3 (2024-03-04)
|
||||
|
||||
* **Bug Fix**: Correct a typo in internal AddAsIsPresigningMiddleware API.
|
||||
|
||||
# v1.11.2 (2024-02-23)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.11.1 (2024-02-21)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.11.0 (2024-02-13)
|
||||
|
||||
* **Feature**: Bump minimum Go version to 1.20 per our language support policy.
|
||||
|
|
|
|||
|
|
@ -27,13 +27,21 @@ func GetIsPresigning(ctx context.Context) bool {
|
|||
|
||||
type isPresigningKey struct{}
|
||||
|
||||
// AddAsIsPresigingMiddleware adds a middleware to the head of the stack that
|
||||
// AddAsIsPresigningMiddleware adds a middleware to the head of the stack that
|
||||
// will update the stack's context to be flagged as being invoked for the
|
||||
// purpose of presigning.
|
||||
func AddAsIsPresigingMiddleware(stack *middleware.Stack) error {
|
||||
func AddAsIsPresigningMiddleware(stack *middleware.Stack) error {
|
||||
return stack.Initialize.Add(asIsPresigningMiddleware{}, middleware.Before)
|
||||
}
|
||||
|
||||
// AddAsIsPresigingMiddleware is an alias for backwards compatibility.
|
||||
//
|
||||
// Deprecated: This API was released with a typo. Use
|
||||
// [AddAsIsPresigningMiddleware] instead.
|
||||
func AddAsIsPresigingMiddleware(stack *middleware.Stack) error {
|
||||
return AddAsIsPresigningMiddleware(stack)
|
||||
}
|
||||
|
||||
type asIsPresigningMiddleware struct{}
|
||||
|
||||
func (asIsPresigningMiddleware) ID() string { return "AsIsPresigningMiddleware" }
|
||||
|
|
|
|||
|
|
@ -3,4 +3,4 @@
|
|||
package presignedurl
|
||||
|
||||
// goModuleVersion is the tagged release for this module
|
||||
const goModuleVersion = "1.11.0"
|
||||
const goModuleVersion = "1.11.11"
|
||||
|
|
|
|||
|
|
@ -1,3 +1,39 @@
|
|||
# v1.17.9 (2024-06-07)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.17.8 (2024-06-03)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.17.7 (2024-05-16)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.17.6 (2024-05-15)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.17.5 (2024-03-29)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.17.4 (2024-03-18)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.17.3 (2024-03-07)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.17.2 (2024-02-23)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.17.1 (2024-02-21)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.17.0 (2024-02-13)
|
||||
|
||||
* **Feature**: Bump minimum Go version to 1.20 per our language support policy.
|
||||
|
|
|
|||
2
vendor/github.com/aws/aws-sdk-go-v2/service/internal/s3shared/go_module_metadata.go
generated
vendored
2
vendor/github.com/aws/aws-sdk-go-v2/service/internal/s3shared/go_module_metadata.go
generated
vendored
|
|
@ -3,4 +3,4 @@
|
|||
package s3shared
|
||||
|
||||
// goModuleVersion is the tagged release for this module
|
||||
const goModuleVersion = "1.17.0"
|
||||
const goModuleVersion = "1.17.9"
|
||||
|
|
|
|||
|
|
@ -1,3 +1,81 @@
|
|||
# v1.55.1 (2024-06-07)
|
||||
|
||||
* **Bug Fix**: Add clock skew correction on all service clients
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.55.0 (2024-06-05)
|
||||
|
||||
* **Feature**: Added new params copySource and key to copyObject API for supporting S3 Access Grants plugin. These changes will not change any of the existing S3 API functionality.
|
||||
* **Bug Fix**: Add S3-specific smithy protocol tests.
|
||||
|
||||
# v1.54.4 (2024-06-03)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.54.3 (2024-05-23)
|
||||
|
||||
* **Bug Fix**: Prevent parsing failures for nonstandard `Expires` values in responses. If the SDK cannot parse the value set in the response header for this field it will now be returned as `nil`. A new field, `ExpiresString`, has been added that will retain the unparsed value from the response (regardless of whether it came back in a format recognized by the SDK).
|
||||
|
||||
# v1.54.2 (2024-05-16)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.54.1 (2024-05-15)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.54.0 (2024-05-14)
|
||||
|
||||
* **Feature**: Updated a few x-id in the http uri traits
|
||||
|
||||
# v1.53.2 (2024-05-08)
|
||||
|
||||
* **Bug Fix**: GoDoc improvement
|
||||
|
||||
# v1.53.1 (2024-03-29)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.53.0 (2024-03-18)
|
||||
|
||||
* **Feature**: Fix two issues with response root node names.
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.52.1 (2024-03-15)
|
||||
|
||||
* **Documentation**: Documentation updates for Amazon S3.
|
||||
|
||||
# v1.52.0 (2024-03-13)
|
||||
|
||||
* **Feature**: This release makes the default option for S3 on Outposts request signing to use the SigV4A algorithm when using AWS Common Runtime (CRT).
|
||||
|
||||
# v1.51.4 (2024-03-07)
|
||||
|
||||
* **Bug Fix**: Remove dependency on go-cmp.
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.51.3 (2024-03-05)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.51.2 (2024-03-04)
|
||||
|
||||
* **Bug Fix**: Update internal/presigned-url dependency for corrected API name.
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.51.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.51.0 (2024-02-22)
|
||||
|
||||
* **Feature**: Add middleware stack snapshot tests.
|
||||
|
||||
# v1.50.3 (2024-02-21)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.50.2 (2024-02-20)
|
||||
|
||||
* **Bug Fix**: When sourcing values for a service's `EndpointParameters`, the lack of a configured region (i.e. `options.Region == ""`) will now translate to a `nil` value for `EndpointParameters.Region` instead of a pointer to the empty string `""`. This will result in a much more explicit error when calling an operation instead of an obscure hostname lookup failure.
|
||||
|
|
|
|||
|
|
@ -14,6 +14,7 @@ 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"
|
||||
"github.com/aws/aws-sdk-go-v2/internal/v4a"
|
||||
acceptencodingcust "github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding"
|
||||
internalChecksum "github.com/aws/aws-sdk-go-v2/service/internal/checksum"
|
||||
|
|
@ -28,6 +29,7 @@ import (
|
|||
smithyhttp "github.com/aws/smithy-go/transport/http"
|
||||
"net"
|
||||
"net/http"
|
||||
"sync/atomic"
|
||||
"time"
|
||||
)
|
||||
|
||||
|
|
@ -38,6 +40,9 @@ const ServiceAPIVersion = "2006-03-01"
|
|||
// Storage Service.
|
||||
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
|
||||
|
|
@ -82,6 +87,8 @@ func New(options Options, optFns ...func(*Options)) *Client {
|
|||
|
||||
finalizeExpressCredentials(&options, client)
|
||||
|
||||
initializeTimeOffsetResolver(client)
|
||||
|
||||
return client
|
||||
}
|
||||
|
||||
|
|
@ -394,17 +401,37 @@ func resolveAWSEndpointResolver(cfg aws.Config, o *Options) {
|
|||
}
|
||||
|
||||
func addClientUserAgent(stack *middleware.Stack, options Options) error {
|
||||
if err := awsmiddleware.AddSDKAgentKeyValue(awsmiddleware.APIMetadata, "s3", goModuleVersion)(stack); err != nil {
|
||||
ua, err := getOrAddRequestUserAgent(stack)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
ua.AddSDKAgentKeyValue(awsmiddleware.APIMetadata, "s3", goModuleVersion)
|
||||
if len(options.AppID) > 0 {
|
||||
return awsmiddleware.AddSDKAgentKey(awsmiddleware.ApplicationIdentifier, options.AppID)(stack)
|
||||
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
|
||||
}
|
||||
|
|
@ -424,12 +451,48 @@ func newDefaultV4Signer(o Options) *v4.Signer {
|
|||
})
|
||||
}
|
||||
|
||||
func addRetryMiddlewares(stack *middleware.Stack, o Options) error {
|
||||
mo := retry.AddRetryMiddlewaresOptions{
|
||||
Retryer: o.Retryer,
|
||||
LogRetryAttempts: o.ClientLogMode.IsRetries(),
|
||||
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 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 addRetry(stack *middleware.Stack, o Options) error {
|
||||
attempt := retry.NewAttemptMiddleware(o.Retryer, smithyhttp.RequestCloner, func(m *retry.Attempt) {
|
||||
m.LogAttempts = o.ClientLogMode.IsRetries()
|
||||
})
|
||||
if err := stack.Finalize.Insert(attempt, "Signing", middleware.Before); err != nil {
|
||||
return err
|
||||
}
|
||||
return retry.AddRetryMiddlewares(stack, mo)
|
||||
if err := stack.Finalize.Insert(&retry.MetricsHeader{}, attempt.ID(), middleware.After); err != nil {
|
||||
return err
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
// resolves UseARNRegion S3 configuration
|
||||
|
|
@ -512,6 +575,17 @@ func newDefaultV4aSigner(o Options) *v4a.Signer {
|
|||
})
|
||||
}
|
||||
|
||||
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 addMetadataRetrieverMiddleware(stack *middleware.Stack) error {
|
||||
return s3shared.AddMetadataRetrieverMiddleware(stack)
|
||||
}
|
||||
|
|
@ -520,6 +594,10 @@ func add100Continue(stack *middleware.Stack, options Options) error {
|
|||
return s3shared.Add100Continue(stack, options.ContinueHeaderThresholdBytes)
|
||||
}
|
||||
|
||||
func addRecursionDetection(stack *middleware.Stack) error {
|
||||
return stack.Build.Add(&awsmiddleware.RecursionDetection{}, middleware.After)
|
||||
}
|
||||
|
||||
// ComputedInputChecksumsMetadata provides information about the algorithms used
|
||||
// to compute the checksum(s) of the input payload.
|
||||
type ComputedInputChecksumsMetadata struct {
|
||||
|
|
@ -792,7 +870,7 @@ func (c presignConverter) convertToPresignMiddleware(stack *middleware.Stack, op
|
|||
if err != nil {
|
||||
return err
|
||||
}
|
||||
err = presignedurlcust.AddAsIsPresigingMiddleware(stack)
|
||||
err = presignedurlcust.AddAsIsPresigningMiddleware(stack)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
|
|
|||
142
vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_AbortMultipartUpload.go
generated
vendored
142
vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_AbortMultipartUpload.go
generated
vendored
|
|
@ -18,22 +18,27 @@ import (
|
|||
// 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
|
||||
// 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]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
|
||||
// requests are not supported. For more information, see [Regional and Zonal endpoints]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.
|
||||
// required to use the multipart upload, see [Multipart Upload and Permissions]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
|
||||
// directory bucket, we recommend that you use the [CreateSession]CreateSession 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
|
||||
|
|
@ -41,17 +46,31 @@ import (
|
|||
// 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)
|
||||
// .
|
||||
// expires. For more information about authorization, see [CreateSession]CreateSession .
|
||||
//
|
||||
// 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)
|
||||
// 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]
|
||||
//
|
||||
// [UploadPart]
|
||||
//
|
||||
// [CompleteMultipartUpload]
|
||||
//
|
||||
// [ListParts]
|
||||
//
|
||||
// [ListMultipartUploads]
|
||||
//
|
||||
// [ListParts]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListParts.html
|
||||
// [UploadPart]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_UploadPart.html
|
||||
// [Regional and Zonal endpoints]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-express-Regions-and-Zones.html
|
||||
// [ListMultipartUploads]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListMultipartUploads.html
|
||||
// [CreateSession]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_CreateSession.html
|
||||
// [Multipart Upload and Permissions]: https://docs.aws.amazon.com/AmazonS3/latest/dev/mpuAndPermissions.html
|
||||
// [CompleteMultipartUpload]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_CompleteMultipartUpload.html
|
||||
// [CreateMultipartUpload]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_CreateMultipartUpload.html
|
||||
func (c *Client) AbortMultipartUpload(ctx context.Context, params *AbortMultipartUploadInput, optFns ...func(*Options)) (*AbortMultipartUploadOutput, error) {
|
||||
if params == nil {
|
||||
params = &AbortMultipartUploadInput{}
|
||||
|
|
@ -69,31 +88,39 @@ func (c *Client) AbortMultipartUpload(ctx context.Context, params *AbortMultipar
|
|||
|
||||
type AbortMultipartUploadInput struct {
|
||||
|
||||
// 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
|
||||
// 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-az2--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
|
||||
// example, DOC-EXAMPLE-BUCKET--usw2-az1--x-s3 ). For information about bucket
|
||||
// naming restrictions, see [Directory bucket naming rules]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]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.
|
||||
// information about S3 on Outposts ARNs, see [What is S3 on Outposts?]in the Amazon S3 User Guide.
|
||||
//
|
||||
// [Directory bucket naming rules]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/directory-bucket-naming-rules.html
|
||||
// [What is S3 on Outposts?]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/S3onOutposts.html
|
||||
// [Using access points]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/using-access-points.html
|
||||
//
|
||||
// This member is required.
|
||||
Bucket *string
|
||||
|
|
@ -117,10 +144,12 @@ type AbortMultipartUploadInput struct {
|
|||
// 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.
|
||||
// downloading objects from Requester Pays buckets, see [Downloading Objects in Requester Pays Buckets]in the Amazon S3 User
|
||||
// Guide.
|
||||
//
|
||||
// This functionality is not supported for directory buckets.
|
||||
//
|
||||
// [Downloading Objects in Requester Pays Buckets]: https://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html
|
||||
RequestPayer types.RequestPayer
|
||||
|
||||
noSmithyDocumentSerde
|
||||
|
|
@ -135,7 +164,9 @@ func (in *AbortMultipartUploadInput) bindEndpointParams(p *EndpointParameters) {
|
|||
type AbortMultipartUploadOutput struct {
|
||||
|
||||
// If present, indicates that the requester was successfully charged for the
|
||||
// request. This functionality is not supported for directory buckets.
|
||||
// request.
|
||||
//
|
||||
// This functionality is not supported for directory buckets.
|
||||
RequestCharged types.RequestCharged
|
||||
|
||||
// Metadata pertaining to the operation's result.
|
||||
|
|
@ -166,25 +197,25 @@ func (c *Client) addOperationAbortMultipartUploadMiddlewares(stack *middleware.S
|
|||
if err = addSetLoggerMiddleware(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
|
||||
if err = addClientRequestID(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
|
||||
if err = addComputeContentLength(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addResolveEndpointMiddleware(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
|
||||
if err = addComputePayloadSHA256(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addRetryMiddlewares(stack, options); err != nil {
|
||||
if err = addRetry(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
|
||||
if err = addRawResponseToMetadata(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
|
||||
if err = addRecordResponseTiming(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addClientUserAgent(stack, options); err != nil {
|
||||
|
|
@ -202,6 +233,9 @@ func (c *Client) addOperationAbortMultipartUploadMiddlewares(stack *middleware.S
|
|||
if err = addPutBucketContextMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addTimeOffsetBuild(stack, c); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addOpAbortMultipartUploadValidationMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
|
|
@ -211,7 +245,7 @@ func (c *Client) addOperationAbortMultipartUploadMiddlewares(stack *middleware.S
|
|||
if err = addMetadataRetrieverMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = awsmiddleware.AddRecursionDetection(stack); err != nil {
|
||||
if err = addRecursionDetection(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addAbortMultipartUploadUpdateEndpoint(stack, options); err != nil {
|
||||
|
|
|
|||
313
vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_CompleteMultipartUpload.go
generated
vendored
313
vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_CompleteMultipartUpload.go
generated
vendored
|
|
@ -13,51 +13,59 @@ import (
|
|||
smithyhttp "github.com/aws/smithy-go/transport/http"
|
||||
)
|
||||
|
||||
// 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).
|
||||
// Completes a multipart upload by assembling previously uploaded parts.
|
||||
//
|
||||
// You first initiate the multipart upload and then upload all parts using the [UploadPart]
|
||||
// operation or the [UploadPartCopy]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 the failed requests. 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
|
||||
// retry any failed requests (including 500 error responses). For more information,
|
||||
// see [Amazon S3 Error Best Practices].
|
||||
//
|
||||
// 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
|
||||
// header, CompleteMultipartUpload can still return a 200 OK response.
|
||||
//
|
||||
// For more information about multipart uploads, see [Uploading Objects Using Multipart Upload] 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
|
||||
// requests are not supported. For more information, see [Regional and Zonal endpoints]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.
|
||||
// required to use the multipart upload API, see [Multipart Upload and Permissions]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
|
||||
// directory bucket, we recommend that you use the [CreateSession]CreateSession 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
|
||||
|
|
@ -65,36 +73,65 @@ import (
|
|||
// 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)
|
||||
// .
|
||||
// expires. For more information about authorization, see [CreateSession]CreateSession .
|
||||
//
|
||||
// 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)
|
||||
// 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]
|
||||
//
|
||||
// [UploadPart]
|
||||
//
|
||||
// [AbortMultipartUpload]
|
||||
//
|
||||
// [ListParts]
|
||||
//
|
||||
// [ListMultipartUploads]
|
||||
//
|
||||
// [Uploading Objects Using Multipart Upload]: https://docs.aws.amazon.com/AmazonS3/latest/dev/uploadobjusingmpu.html
|
||||
// [Amazon S3 Error Best Practices]: https://docs.aws.amazon.com/AmazonS3/latest/dev/ErrorBestPractices.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
|
||||
// [UploadPart]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_UploadPart.html
|
||||
// [Regional and Zonal endpoints]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-express-Regions-and-Zones.html
|
||||
// [ListMultipartUploads]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListMultipartUploads.html
|
||||
// [CreateSession]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_CreateSession.html
|
||||
// [UploadPartCopy]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_UploadPartCopy.html
|
||||
// [Multipart Upload and Permissions]: https://docs.aws.amazon.com/AmazonS3/latest/dev/mpuAndPermissions.html
|
||||
// [CreateMultipartUpload]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_CreateMultipartUpload.html
|
||||
func (c *Client) CompleteMultipartUpload(ctx context.Context, params *CompleteMultipartUploadInput, optFns ...func(*Options)) (*CompleteMultipartUploadOutput, error) {
|
||||
if params == nil {
|
||||
params = &CompleteMultipartUploadInput{}
|
||||
|
|
@ -112,31 +149,39 @@ func (c *Client) CompleteMultipartUpload(ctx context.Context, params *CompleteMu
|
|||
|
||||
type CompleteMultipartUploadInput struct {
|
||||
|
||||
// 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
|
||||
// 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-az2--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
|
||||
// example, DOC-EXAMPLE-BUCKET--usw2-az1--x-s3 ). For information about bucket
|
||||
// naming restrictions, see [Directory bucket naming rules]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]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.
|
||||
// information about S3 on Outposts ARNs, see [What is S3 on Outposts?]in the Amazon S3 User Guide.
|
||||
//
|
||||
// [Directory bucket naming rules]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/directory-bucket-naming-rules.html
|
||||
// [What is S3 on Outposts?]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/S3onOutposts.html
|
||||
// [Using access points]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/using-access-points.html
|
||||
//
|
||||
// This member is required.
|
||||
Bucket *string
|
||||
|
|
@ -153,30 +198,34 @@ type CompleteMultipartUploadInput struct {
|
|||
|
||||
// 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)
|
||||
// base64-encoded, 32-bit CRC32 checksum of the object. For more information, see [Checking object integrity]
|
||||
// in the Amazon S3 User Guide.
|
||||
//
|
||||
// [Checking object integrity]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html
|
||||
ChecksumCRC32 *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)
|
||||
// base64-encoded, 32-bit CRC32C checksum of the object. For more information, see [Checking object integrity]
|
||||
// in the Amazon S3 User Guide.
|
||||
//
|
||||
// [Checking object integrity]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html
|
||||
ChecksumCRC32C *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)
|
||||
// base64-encoded, 160-bit SHA-1 digest of the object. For more information, see [Checking object integrity]
|
||||
// in the Amazon S3 User Guide.
|
||||
//
|
||||
// [Checking object integrity]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html
|
||||
ChecksumSHA1 *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)
|
||||
// base64-encoded, 256-bit SHA-256 digest of the object. For more information, see [Checking object integrity]
|
||||
// in the Amazon S3 User Guide.
|
||||
//
|
||||
// [Checking object integrity]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html
|
||||
ChecksumSHA256 *string
|
||||
|
||||
// The account ID of the expected bucket owner. If the account ID that you provide
|
||||
|
|
@ -191,32 +240,40 @@ type CompleteMultipartUploadInput struct {
|
|||
// 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.
|
||||
// downloading objects from Requester Pays buckets, see [Downloading Objects in Requester Pays Buckets]in the Amazon S3 User
|
||||
// Guide.
|
||||
//
|
||||
// This functionality is not supported for directory buckets.
|
||||
//
|
||||
// [Downloading Objects in Requester Pays Buckets]: https://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html
|
||||
RequestPayer types.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.
|
||||
// information, see [Protecting data using SSE-C keys]in the Amazon S3 User Guide.
|
||||
//
|
||||
// This functionality is not supported for directory buckets.
|
||||
//
|
||||
// [Protecting data using SSE-C keys]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/ServerSideEncryptionCustomerKeys.html#ssec-require-condition-key
|
||||
SSECustomerAlgorithm *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.
|
||||
// information, see [Protecting data using SSE-C keys]in the Amazon S3 User Guide.
|
||||
//
|
||||
// This functionality is not supported for directory buckets.
|
||||
//
|
||||
// [Protecting data using SSE-C keys]: https://docs.aws.amazon.com/AmazonS3/latest/dev/ServerSideEncryptionCustomerKeys.html
|
||||
SSECustomerKey *string
|
||||
|
||||
// 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.
|
||||
// information, see [Protecting data using SSE-C keys]in the Amazon S3 User Guide.
|
||||
//
|
||||
// This functionality is not supported for directory buckets.
|
||||
//
|
||||
// [Protecting data using SSE-C keys]: https://docs.aws.amazon.com/AmazonS3/latest/dev/ServerSideEncryptionCustomerKeys.html
|
||||
SSECustomerKeyMD5 *string
|
||||
|
||||
noSmithyDocumentSerde
|
||||
|
|
@ -231,13 +288,15 @@ func (in *CompleteMultipartUploadInput) bindEndpointParams(p *EndpointParameters
|
|||
type CompleteMultipartUploadOutput struct {
|
||||
|
||||
// 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.
|
||||
// the access point ARN or access point alias if used.
|
||||
//
|
||||
// Access points are not supported by directory buckets.
|
||||
Bucket *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.
|
||||
// encryption with Key Management Service (KMS) keys (SSE-KMS).
|
||||
//
|
||||
// This functionality is not supported for directory buckets.
|
||||
BucketKeyEnabled *bool
|
||||
|
||||
// The base64-encoded, 32-bit CRC32 checksum of the object. This will only be
|
||||
|
|
@ -245,8 +304,10 @@ type CompleteMultipartUploadOutput struct {
|
|||
// 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.
|
||||
// checksums are calculated with multipart uploads, see [Checking object integrity]in the Amazon S3 User
|
||||
// Guide.
|
||||
//
|
||||
// [Checking object integrity]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html#large-object-checksums
|
||||
ChecksumCRC32 *string
|
||||
|
||||
// The base64-encoded, 32-bit CRC32C checksum of the object. This will only be
|
||||
|
|
@ -254,8 +315,10 @@ type CompleteMultipartUploadOutput struct {
|
|||
// 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.
|
||||
// checksums are calculated with multipart uploads, see [Checking object integrity]in the Amazon S3 User
|
||||
// Guide.
|
||||
//
|
||||
// [Checking object integrity]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html#large-object-checksums
|
||||
ChecksumCRC32C *string
|
||||
|
||||
// The base64-encoded, 160-bit SHA-1 digest of the object. This will only be
|
||||
|
|
@ -263,8 +326,10 @@ type CompleteMultipartUploadOutput struct {
|
|||
// 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.
|
||||
// checksums are calculated with multipart uploads, see [Checking object integrity]in the Amazon S3 User
|
||||
// Guide.
|
||||
//
|
||||
// [Checking object integrity]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html#large-object-checksums
|
||||
ChecksumSHA1 *string
|
||||
|
||||
// The base64-encoded, 256-bit SHA-256 digest of the object. This will only be
|
||||
|
|
@ -272,8 +337,10 @@ type CompleteMultipartUploadOutput struct {
|
|||
// 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.
|
||||
// checksums are calculated with multipart uploads, see [Checking object integrity]in the Amazon S3 User
|
||||
// Guide.
|
||||
//
|
||||
// [Checking object integrity]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html#large-object-checksums
|
||||
ChecksumSHA256 *string
|
||||
|
||||
// Entity tag that identifies the newly created object's data. Objects with
|
||||
|
|
@ -282,12 +349,14 @@ type CompleteMultipartUploadOutput struct {
|
|||
// 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.
|
||||
// is calculated, see [Checking object integrity]in the Amazon S3 User Guide.
|
||||
//
|
||||
// [Checking object integrity]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html
|
||||
ETag *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
|
||||
|
||||
|
|
@ -298,21 +367,28 @@ type CompleteMultipartUploadOutput struct {
|
|||
Location *string
|
||||
|
||||
// If present, indicates that the requester was successfully charged for the
|
||||
// request. This functionality is not supported for directory buckets.
|
||||
// request.
|
||||
//
|
||||
// This functionality is not supported for directory buckets.
|
||||
RequestCharged types.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.
|
||||
// encryption customer managed key that was used for the object.
|
||||
//
|
||||
// This functionality is not supported for directory buckets.
|
||||
SSEKMSKeyId *string
|
||||
|
||||
// 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.
|
||||
// (for example, AES256 , aws:kms ).
|
||||
//
|
||||
// For directory buckets, only server-side encryption with Amazon S3 managed keys
|
||||
// (SSE-S3) ( AES256 ) is supported.
|
||||
ServerSideEncryption types.ServerSideEncryption
|
||||
|
||||
// Version ID of the newly created object, in case the bucket has versioning
|
||||
// turned on. This functionality is not supported for directory buckets.
|
||||
// turned on.
|
||||
//
|
||||
// This functionality is not supported for directory buckets.
|
||||
VersionId *string
|
||||
|
||||
// Metadata pertaining to the operation's result.
|
||||
|
|
@ -343,25 +419,25 @@ func (c *Client) addOperationCompleteMultipartUploadMiddlewares(stack *middlewar
|
|||
if err = addSetLoggerMiddleware(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
|
||||
if err = addClientRequestID(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
|
||||
if err = addComputeContentLength(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addResolveEndpointMiddleware(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
|
||||
if err = addComputePayloadSHA256(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addRetryMiddlewares(stack, options); err != nil {
|
||||
if err = addRetry(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
|
||||
if err = addRawResponseToMetadata(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
|
||||
if err = addRecordResponseTiming(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addClientUserAgent(stack, options); err != nil {
|
||||
|
|
@ -379,6 +455,9 @@ func (c *Client) addOperationCompleteMultipartUploadMiddlewares(stack *middlewar
|
|||
if err = addPutBucketContextMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addTimeOffsetBuild(stack, c); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addOpCompleteMultipartUploadValidationMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
|
|
@ -388,7 +467,7 @@ func (c *Client) addOperationCompleteMultipartUploadMiddlewares(stack *middlewar
|
|||
if err = addMetadataRetrieverMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = awsmiddleware.AddRecursionDetection(stack); err != nil {
|
||||
if err = addRecursionDetection(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addCompleteMultipartUploadUpdateEndpoint(stack, options); err != nil {
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load Diff
|
|
@ -15,82 +15,116 @@ import (
|
|||
)
|
||||
|
||||
// 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.
|
||||
// bucket, see [CreateBucket]CreateBucket .
|
||||
//
|
||||
// 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]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.
|
||||
// more information, see [Virtual hosting of buckets]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.
|
||||
// Virtual-hosted-style requests aren't supported. For more information, see [Regional and Zonal endpoints]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. If your CreateBucket request sets BucketOwnerEnforced
|
||||
// for Amazon S3 Object Ownership and specifies a bucket ACL that provides access
|
||||
// to an external Amazon Web Services account, your request fails with a 400
|
||||
// error and returns the InvalidBucketAcLWithObjectOwnership error code. For more
|
||||
// information, see Setting Object Ownership on an existing bucket (https://docs.aws.amazon.com/AmazonS3/latest/userguide/object-ownership-existing-bucket.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.
|
||||
// permission is required.
|
||||
//
|
||||
// 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)
|
||||
// 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]and [Blocking public access to your Amazon S3 storage]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]DeletePublicAccessBlock 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]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]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]in the Amazon S3 User Guide. For more information about
|
||||
// supported S3 features for directory buckets, see [Features of S3 Express One Zone]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]
|
||||
//
|
||||
// [DeleteBucket]
|
||||
//
|
||||
// [Creating, configuring, and working with Amazon S3 buckets]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/creating-buckets-s3.html
|
||||
// [Regional and Zonal endpoints]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-express-Regions-and-Zones.html
|
||||
// [DeleteBucket]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_DeleteBucket.html
|
||||
// [PutObject]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutObject.html
|
||||
// [CreateBucket]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_control_CreateBucket.html
|
||||
// [Virtual hosting of buckets]: https://docs.aws.amazon.com/AmazonS3/latest/dev/VirtualHosting.html
|
||||
//
|
||||
// [DeletePublicAccessBlock]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_DeletePublicAccessBlock.html
|
||||
// [Directory buckets]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/directory-buckets-overview.html
|
||||
// [Features of S3 Express One Zone]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-express-one-zone.html#s3-express-features
|
||||
// [Controlling ownership of objects and disabling ACLs for your bucket]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/about-object-ownership.html
|
||||
// [Blocking public access to your Amazon S3 storage]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/access-control-block-public-access.html
|
||||
// [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
|
||||
func (c *Client) CreateBucket(ctx context.Context, params *CreateBucketInput, optFns ...func(*Options)) (*CreateBucketOutput, error) {
|
||||
if params == nil {
|
||||
params = &CreateBucketInput{}
|
||||
|
|
@ -108,71 +142,93 @@ func (c *Client) CreateBucket(ctx context.Context, params *CreateBucketInput, op
|
|||
|
||||
type CreateBucketInput struct {
|
||||
|
||||
// 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
|
||||
// The name of the bucket to create.
|
||||
//
|
||||
// General purpose buckets - For information about bucket naming restrictions, see [Bucket naming rules]
|
||||
// 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-az2--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_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]in the Amazon S3 User
|
||||
// Guide
|
||||
//
|
||||
// [Directory bucket naming rules]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/directory-bucket-naming-rules.html
|
||||
// [Bucket naming rules]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/bucketnamingrules.html
|
||||
//
|
||||
// This member is required.
|
||||
Bucket *string
|
||||
|
||||
// The canned ACL to apply to the bucket. This functionality is not supported for
|
||||
// directory buckets.
|
||||
// The canned ACL to apply to the bucket.
|
||||
//
|
||||
// This functionality is not supported for directory buckets.
|
||||
ACL types.BucketCannedACL
|
||||
|
||||
// The configuration information for the bucket.
|
||||
CreateBucketConfiguration *types.CreateBucketConfiguration
|
||||
|
||||
// Allows grantee the read, write, read ACP, and write ACP permissions on the
|
||||
// bucket. This functionality is not supported for directory buckets.
|
||||
// bucket.
|
||||
//
|
||||
// This functionality is not supported for directory buckets.
|
||||
GrantFullControl *string
|
||||
|
||||
// Allows grantee to list the objects in the bucket. This functionality is not
|
||||
// supported for directory buckets.
|
||||
// Allows grantee to list the objects in the bucket.
|
||||
//
|
||||
// This functionality is not supported for directory buckets.
|
||||
GrantRead *string
|
||||
|
||||
// Allows grantee to read the bucket ACL. This functionality is not supported for
|
||||
// directory buckets.
|
||||
// Allows grantee to read the bucket ACL.
|
||||
//
|
||||
// This functionality is not supported for directory buckets.
|
||||
GrantReadACP *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.
|
||||
// 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
|
||||
|
||||
// Allows grantee to write the ACL for the applicable bucket. This functionality
|
||||
// is not supported for directory buckets.
|
||||
// Allows grantee to write the ACL for the applicable bucket.
|
||||
//
|
||||
// This functionality is not supported for directory buckets.
|
||||
GrantWriteACP *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
|
||||
|
||||
// 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.
|
||||
// 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.
|
||||
// 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]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.
|
||||
//
|
||||
// [Controlling ownership of objects and disabling ACLs for your bucket]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/about-object-ownership.html
|
||||
ObjectOwnership types.ObjectOwnership
|
||||
|
||||
noSmithyDocumentSerde
|
||||
|
|
@ -217,25 +273,25 @@ func (c *Client) addOperationCreateBucketMiddlewares(stack *middleware.Stack, op
|
|||
if err = addSetLoggerMiddleware(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
|
||||
if err = addClientRequestID(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
|
||||
if err = addComputeContentLength(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addResolveEndpointMiddleware(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
|
||||
if err = addComputePayloadSHA256(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addRetryMiddlewares(stack, options); err != nil {
|
||||
if err = addRetry(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
|
||||
if err = addRawResponseToMetadata(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
|
||||
if err = addRecordResponseTiming(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addClientUserAgent(stack, options); err != nil {
|
||||
|
|
@ -253,6 +309,9 @@ func (c *Client) addOperationCreateBucketMiddlewares(stack *middleware.Stack, op
|
|||
if err = addPutBucketContextMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addTimeOffsetBuild(stack, c); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addOpCreateBucketValidationMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
|
|
@ -262,7 +321,7 @@ func (c *Client) addOperationCreateBucketMiddlewares(stack *middleware.Stack, op
|
|||
if err = addMetadataRetrieverMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = awsmiddleware.AddRecursionDetection(stack); err != nil {
|
||||
if err = addRecursionDetection(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addCreateBucketUpdateEndpoint(stack, options); err != nil {
|
||||
|
|
|
|||
685
vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_CreateMultipartUpload.go
generated
vendored
685
vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_CreateMultipartUpload.go
generated
vendored
|
|
@ -16,62 +16,64 @@ import (
|
|||
|
||||
// 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)
|
||||
// .
|
||||
// specify this upload ID in each of your subsequent upload part requests (see [UploadPart]).
|
||||
// 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]
|
||||
// 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].
|
||||
//
|
||||
// - 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.
|
||||
// Path-style requests are not supported. For more information, see [Regional and Zonal endpoints]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
|
||||
// requests. For more information about signing, see [Authenticating Requests (Amazon Web Services Signature Version 4)]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)
|
||||
// .
|
||||
// required to use the multipart upload API, see [Multipart upload and permissions]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]and [Protecting data using server-side encryption with Amazon Web Services KMS]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]CreateSession 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]CreateSession .
|
||||
//
|
||||
// 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
|
||||
|
|
@ -91,61 +93,96 @@ import (
|
|||
// 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.
|
||||
// in [UploadPart]and [UploadPartCopy]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.
|
||||
// before it completes the multipart upload. For more information, see [Multipart upload API and permissions]and [Protecting data using server-side encryption with Amazon Web Services KMS]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.
|
||||
// supported Amazon Web Services SDKs and Amazon Web Services CLI, see [Specifying the Signature Version in Request Authentication]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 . 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)
|
||||
// For more information about server-side encryption with KMS keys (SSE-KMS), see [Protecting Data Using Server-Side Encryption with KMS keys]
|
||||
//
|
||||
// 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)]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]
|
||||
//
|
||||
// [CompleteMultipartUpload]
|
||||
//
|
||||
// [AbortMultipartUpload]
|
||||
//
|
||||
// [ListParts]
|
||||
//
|
||||
// [ListMultipartUploads]
|
||||
//
|
||||
// [ListParts]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListParts.html
|
||||
// [UploadPart]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_UploadPart.html
|
||||
// [Protecting Data Using Server-Side Encryption with KMS keys]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/UsingKMSEncryption.html
|
||||
// [Regional and Zonal endpoints]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-express-Regions-and-Zones.html
|
||||
// [Specifying the Signature Version in Request Authentication]: https://docs.aws.amazon.com/AmazonS3/latest/dev/UsingAWSSDK.html#specify-signature-version
|
||||
// [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
|
||||
// [Multipart upload and permissions]: https://docs.aws.amazon.com/AmazonS3/latest/dev/mpuAndPermissions.html
|
||||
// [Multipart upload API and permissions]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/mpuoverview.html#mpuAndPermissions
|
||||
// [UploadPartCopy]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_UploadPartCopy.html
|
||||
// [CompleteMultipartUpload]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_CompleteMultipartUpload.html
|
||||
// [Authenticating Requests (Amazon Web Services Signature Version 4)]: https://docs.aws.amazon.com/AmazonS3/latest/API/sig-v4-authenticating-requests.html
|
||||
// [AbortMultipartUpload]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_AbortMultipartUpload.html
|
||||
// [Multipart Upload Overview]: https://docs.aws.amazon.com/AmazonS3/latest/dev/mpuoverview.html
|
||||
// [Protecting data using server-side encryption with Amazon Web Services KMS]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/UsingKMSEncryption.html
|
||||
// [ListMultipartUploads]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListMultipartUploads.html
|
||||
//
|
||||
// [CreateSession]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_CreateSession.html
|
||||
// [Protecting data using server-side encryption with customer-provided encryption keys (SSE-C)]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/ServerSideEncryptionCustomerKeys.html
|
||||
func (c *Client) CreateMultipartUpload(ctx context.Context, params *CreateMultipartUploadInput, optFns ...func(*Options)) (*CreateMultipartUploadOutput, error) {
|
||||
if params == nil {
|
||||
params = &CreateMultipartUploadInput{}
|
||||
|
|
@ -164,30 +201,39 @@ func (c *Client) CreateMultipartUpload(ctx context.Context, params *CreateMultip
|
|||
type CreateMultipartUploadInput struct {
|
||||
|
||||
// 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
|
||||
// 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-az2--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
|
||||
// example, DOC-EXAMPLE-BUCKET--usw2-az1--x-s3 ). For information about bucket
|
||||
// naming restrictions, see [Directory bucket naming rules]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]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.
|
||||
// information about S3 on Outposts ARNs, see [What is S3 on Outposts?]in the Amazon S3 User Guide.
|
||||
//
|
||||
// [Directory bucket naming rules]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/directory-bucket-naming-rules.html
|
||||
// [What is S3 on Outposts?]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/S3onOutposts.html
|
||||
// [Using access points]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/using-access-points.html
|
||||
//
|
||||
// This member is required.
|
||||
Bucket *string
|
||||
|
|
@ -199,32 +245,41 @@ type CreateMultipartUploadInput struct {
|
|||
|
||||
// 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.
|
||||
// permissions. For more information, see [Canned ACL]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]. 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.
|
||||
//
|
||||
// [Canned ACL]: https://docs.aws.amazon.com/AmazonS3/latest/dev/acl-overview.html#CannedACL
|
||||
// [Using ACLs]: https://docs.aws.amazon.com/AmazonS3/latest/dev/S3_ACLs_UsingACLs.html
|
||||
ACL types.ObjectCannedACL
|
||||
|
||||
// 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.
|
||||
// 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
|
||||
|
||||
// Specifies caching behavior along the request/reply chain.
|
||||
CacheControl *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.
|
||||
// for the object. For more information, see [Checking object integrity]in the Amazon S3 User Guide.
|
||||
//
|
||||
// [Checking object integrity]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html
|
||||
ChecksumAlgorithm types.ChecksumAlgorithm
|
||||
|
||||
// Specifies presentational information for the object.
|
||||
|
|
@ -232,8 +287,10 @@ type CreateMultipartUploadInput struct {
|
|||
|
||||
// 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.
|
||||
// Content-Type header field.
|
||||
//
|
||||
// For directory buckets, only the aws-chunked value is supported in this header
|
||||
// field.
|
||||
ContentEncoding *string
|
||||
|
||||
// The language that the content is in.
|
||||
|
|
@ -251,207 +308,322 @@ type CreateMultipartUploadInput struct {
|
|||
Expires *time.Time
|
||||
|
||||
// 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
|
||||
|
||||
// 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
|
||||
|
||||
// Specify access permissions explicitly to allows grantee to read the object ACL.
|
||||
// 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:
|
||||
// see [Access Control List (ACL) Overview]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:
|
||||
// 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.
|
||||
//
|
||||
// - South America (São Paulo)
|
||||
//
|
||||
// For a list of all the Amazon S3 supported Regions and endpoints, see [Regions and Endpoints]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"
|
||||
// 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.
|
||||
//
|
||||
// [Regions and Endpoints]: https://docs.aws.amazon.com/general/latest/gr/rande.html#s3_region
|
||||
// [Access Control List (ACL) Overview]: https://docs.aws.amazon.com/AmazonS3/latest/dev/acl-overview.html
|
||||
GrantFullControl *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]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]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.
|
||||
//
|
||||
// [Regions and Endpoints]: https://docs.aws.amazon.com/general/latest/gr/rande.html#s3_region
|
||||
// [Access Control List (ACL) Overview]: https://docs.aws.amazon.com/AmazonS3/latest/dev/acl-overview.html
|
||||
GrantRead *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]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]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.
|
||||
//
|
||||
// [Regions and Endpoints]: https://docs.aws.amazon.com/general/latest/gr/rande.html#s3_region
|
||||
// [Access Control List (ACL) Overview]: https://docs.aws.amazon.com/AmazonS3/latest/dev/acl-overview.html
|
||||
GrantReadACP *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:
|
||||
// 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]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:
|
||||
// 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.
|
||||
//
|
||||
// - South America (São Paulo)
|
||||
//
|
||||
// For a list of all the Amazon S3 supported Regions and endpoints, see [Regions and Endpoints]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"
|
||||
// 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.
|
||||
//
|
||||
// [Regions and Endpoints]: https://docs.aws.amazon.com/general/latest/gr/rande.html#s3_region
|
||||
// [Access Control List (ACL) Overview]: https://docs.aws.amazon.com/AmazonS3/latest/dev/acl-overview.html
|
||||
GrantWriteACP *string
|
||||
|
||||
// A map of metadata to store with the object in S3.
|
||||
Metadata map[string]string
|
||||
|
||||
// Specifies whether you want to apply a legal hold to the uploaded object. This
|
||||
// functionality is not supported for directory buckets.
|
||||
// Specifies whether you want to apply a legal hold to the uploaded object.
|
||||
//
|
||||
// This functionality is not supported for directory buckets.
|
||||
ObjectLockLegalHoldStatus types.ObjectLockLegalHoldStatus
|
||||
|
||||
// Specifies the Object Lock mode that you want to apply to the uploaded object.
|
||||
//
|
||||
// This functionality is not supported for directory buckets.
|
||||
ObjectLockMode types.ObjectLockMode
|
||||
|
||||
// Specifies the date and time when you want the Object Lock to expire. This
|
||||
// functionality is not supported for directory buckets.
|
||||
// Specifies the date and time when you want the Object Lock to expire.
|
||||
//
|
||||
// This functionality is not supported for directory buckets.
|
||||
ObjectLockRetainUntilDate *time.Time
|
||||
|
||||
// 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.
|
||||
// downloading objects from Requester Pays buckets, see [Downloading Objects in Requester Pays Buckets]in the Amazon S3 User
|
||||
// Guide.
|
||||
//
|
||||
// This functionality is not supported for directory buckets.
|
||||
//
|
||||
// [Downloading Objects in Requester Pays Buckets]: https://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html
|
||||
RequestPayer types.RequestPayer
|
||||
|
||||
// Specifies the algorithm to use when encrypting the object (for example,
|
||||
// AES256). This functionality is not supported for directory buckets.
|
||||
// Specifies the algorithm to use when encrypting the object (for example, AES256).
|
||||
//
|
||||
// This functionality is not supported for directory buckets.
|
||||
SSECustomerAlgorithm *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.
|
||||
// x-amz-server-side-encryption-customer-algorithm header.
|
||||
//
|
||||
// This functionality is not supported for directory buckets.
|
||||
SSECustomerKey *string
|
||||
|
||||
// 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.
|
||||
// to ensure that the encryption key was transmitted without error.
|
||||
//
|
||||
// This functionality is not supported for directory buckets.
|
||||
SSECustomerKeyMD5 *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.
|
||||
// JSON with the encryption context key-value pairs.
|
||||
//
|
||||
// This functionality is not supported for directory buckets.
|
||||
SSEKMSEncryptionContext *string
|
||||
|
||||
// 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.
|
||||
// customer managed key to use for object encryption.
|
||||
//
|
||||
// This functionality is not supported for directory buckets.
|
||||
SSEKMSKeyId *string
|
||||
|
||||
// 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.
|
||||
// S3 (for example, AES256 , aws:kms ).
|
||||
//
|
||||
// For directory buckets, only server-side encryption with Amazon S3 managed keys
|
||||
// (SSE-S3) ( AES256 ) is supported.
|
||||
ServerSideEncryption types.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.
|
||||
// Storage Class. For more information, see [Storage Classes]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.
|
||||
//
|
||||
// [Storage Classes]: https://docs.aws.amazon.com/AmazonS3/latest/dev/storage-class-intro.html
|
||||
StorageClass types.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.
|
||||
// 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
|
||||
|
||||
// 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.
|
||||
// value of this header in the object metadata.
|
||||
//
|
||||
// This functionality is not supported for directory buckets.
|
||||
WebsiteRedirectLocation *string
|
||||
|
||||
noSmithyDocumentSerde
|
||||
|
|
@ -469,27 +641,33 @@ type CreateMultipartUploadOutput struct {
|
|||
// 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.
|
||||
// operation. For more information, see [Aborting Incomplete Multipart Uploads Using a Bucket Lifecycle Configuration]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.
|
||||
//
|
||||
// [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
|
||||
AbortDate *time.Time
|
||||
|
||||
// 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.
|
||||
// incomplete multipart uploads.
|
||||
//
|
||||
// This functionality is not supported for directory buckets.
|
||||
AbortRuleId *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.
|
||||
// return the access point ARN or access point alias if used.
|
||||
//
|
||||
// Access points are not supported by directory buckets.
|
||||
Bucket *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.
|
||||
// encryption with Key Management Service (KMS) keys (SSE-KMS).
|
||||
//
|
||||
// This functionality is not supported for directory buckets.
|
||||
BucketKeyEnabled *bool
|
||||
|
||||
// The algorithm that was used to create a checksum of the object.
|
||||
|
|
@ -499,35 +677,43 @@ type CreateMultipartUploadOutput struct {
|
|||
Key *string
|
||||
|
||||
// If present, indicates that the requester was successfully charged for the
|
||||
// request. This functionality is not supported for directory buckets.
|
||||
// request.
|
||||
//
|
||||
// This functionality is not supported for directory buckets.
|
||||
RequestCharged types.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.
|
||||
// algorithm that's used.
|
||||
//
|
||||
// This functionality is not supported for directory buckets.
|
||||
SSECustomerAlgorithm *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.
|
||||
// message integrity verification of the customer-provided encryption key.
|
||||
//
|
||||
// This functionality is not supported for directory buckets.
|
||||
SSECustomerKeyMD5 *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.
|
||||
// holding JSON with the encryption context key-value pairs.
|
||||
//
|
||||
// This functionality is not supported for directory buckets.
|
||||
SSEKMSEncryptionContext *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.
|
||||
// encryption customer managed key that was used for the object.
|
||||
//
|
||||
// This functionality is not supported for directory buckets.
|
||||
SSEKMSKeyId *string
|
||||
|
||||
// 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.
|
||||
// S3 (for example, AES256 , aws:kms ).
|
||||
//
|
||||
// For directory buckets, only server-side encryption with Amazon S3 managed keys
|
||||
// (SSE-S3) ( AES256 ) is supported.
|
||||
ServerSideEncryption types.ServerSideEncryption
|
||||
|
||||
// ID for the initiated multipart upload.
|
||||
|
|
@ -561,25 +747,25 @@ func (c *Client) addOperationCreateMultipartUploadMiddlewares(stack *middleware.
|
|||
if err = addSetLoggerMiddleware(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
|
||||
if err = addClientRequestID(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
|
||||
if err = addComputeContentLength(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addResolveEndpointMiddleware(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
|
||||
if err = addComputePayloadSHA256(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addRetryMiddlewares(stack, options); err != nil {
|
||||
if err = addRetry(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
|
||||
if err = addRawResponseToMetadata(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
|
||||
if err = addRecordResponseTiming(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addClientUserAgent(stack, options); err != nil {
|
||||
|
|
@ -597,6 +783,9 @@ func (c *Client) addOperationCreateMultipartUploadMiddlewares(stack *middleware.
|
|||
if err = addPutBucketContextMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addTimeOffsetBuild(stack, c); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addOpCreateMultipartUploadValidationMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
|
|
@ -606,7 +795,7 @@ func (c *Client) addOperationCreateMultipartUploadMiddlewares(stack *middleware.
|
|||
if err = addMetadataRetrieverMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = awsmiddleware.AddRecursionDetection(stack); err != nil {
|
||||
if err = addRecursionDetection(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addCreateMultipartUploadUpdateEndpoint(stack, options); err != nil {
|
||||
|
|
|
|||
|
|
@ -17,62 +17,72 @@ import (
|
|||
// 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
|
||||
// Availability Zone in the request endpoint, see [S3 Express One Zone APIs]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.
|
||||
// requests to the CreateSession API. For more information, see [Performance guidelines and design patterns]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.
|
||||
// are not supported. For more information, see [Regional and Zonal endpoints]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)
|
||||
// .
|
||||
// operation on directory buckets, see [CopyObject].
|
||||
//
|
||||
// - 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)
|
||||
// .
|
||||
// operation on directory buckets, see [HeadBucket].
|
||||
//
|
||||
// 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 .
|
||||
// more information about ReadWrite or ReadOnly sessions, see [x-amz-create-session-mode]
|
||||
// x-amz-create-session-mode . For example policies, see [Example bucket policies for S3 Express One Zone] and [Amazon Web Services Identity and Access Management (IAM) identity-based policies for S3 Express One Zone] 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 .
|
||||
//
|
||||
// [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
|
||||
// [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
|
||||
// [Example bucket policies for S3 Express One Zone]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-express-security-iam-example-bucket-policies.html
|
||||
// [Regional and Zonal endpoints]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-express-Regions-and-Zones.html
|
||||
// [CopyObject]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_CopyObject.html
|
||||
// [x-amz-create-session-mode]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_CreateSession.html#API_CreateSession_RequestParameters
|
||||
// [S3 Express One Zone APIs]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-express-APIs.html
|
||||
// [HeadBucket]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_HeadBucket.html
|
||||
func (c *Client) CreateSession(ctx context.Context, params *CreateSessionInput, optFns ...func(*Options)) (*CreateSessionOutput, error) {
|
||||
if params == nil {
|
||||
params = &CreateSessionInput{}
|
||||
|
|
@ -146,25 +156,25 @@ func (c *Client) addOperationCreateSessionMiddlewares(stack *middleware.Stack, o
|
|||
if err = addSetLoggerMiddleware(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
|
||||
if err = addClientRequestID(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
|
||||
if err = addComputeContentLength(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addResolveEndpointMiddleware(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
|
||||
if err = addComputePayloadSHA256(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addRetryMiddlewares(stack, options); err != nil {
|
||||
if err = addRetry(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
|
||||
if err = addRawResponseToMetadata(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
|
||||
if err = addRecordResponseTiming(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addClientUserAgent(stack, options); err != nil {
|
||||
|
|
@ -182,6 +192,9 @@ func (c *Client) addOperationCreateSessionMiddlewares(stack *middleware.Stack, o
|
|||
if err = addPutBucketContextMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addTimeOffsetBuild(stack, c); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addOpCreateSessionValidationMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
|
|
@ -191,7 +204,7 @@ func (c *Client) addOperationCreateSessionMiddlewares(stack *middleware.Stack, o
|
|||
if err = addMetadataRetrieverMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = awsmiddleware.AddRecursionDetection(stack); err != nil {
|
||||
if err = addRecursionDetection(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addCreateSessionUpdateEndpoint(stack, options); err != nil {
|
||||
|
|
|
|||
|
|
@ -15,33 +15,43 @@ import (
|
|||
|
||||
// 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.
|
||||
// Virtual-hosted-style requests aren't supported. For more information, see [Regional and Zonal endpoints]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.
|
||||
// more information about directory bucket policies and permissions, see [Amazon Web Services Identity and Access Management (IAM) for S3 Express One Zone]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)
|
||||
// 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]
|
||||
//
|
||||
// [DeleteObject]
|
||||
//
|
||||
// [DeleteObject]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_DeleteObject.html
|
||||
// [Regional and Zonal endpoints]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-express-Regions-and-Zones.html
|
||||
// [CreateBucket]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_CreateBucket.html
|
||||
// [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
|
||||
func (c *Client) DeleteBucket(ctx context.Context, params *DeleteBucketInput, optFns ...func(*Options)) (*DeleteBucketOutput, error) {
|
||||
if params == nil {
|
||||
params = &DeleteBucketInput{}
|
||||
|
|
@ -59,24 +69,29 @@ func (c *Client) DeleteBucket(ctx context.Context, params *DeleteBucketInput, op
|
|||
|
||||
type DeleteBucketInput struct {
|
||||
|
||||
// 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 .
|
||||
// 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-az2--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_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]in the Amazon S3 User
|
||||
// Guide
|
||||
//
|
||||
// [Directory bucket naming rules]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/directory-bucket-naming-rules.html
|
||||
//
|
||||
// This member is required.
|
||||
Bucket *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). 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 .
|
||||
// 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
|
||||
|
||||
noSmithyDocumentSerde
|
||||
|
|
@ -116,25 +131,25 @@ func (c *Client) addOperationDeleteBucketMiddlewares(stack *middleware.Stack, op
|
|||
if err = addSetLoggerMiddleware(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
|
||||
if err = addClientRequestID(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
|
||||
if err = addComputeContentLength(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addResolveEndpointMiddleware(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
|
||||
if err = addComputePayloadSHA256(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addRetryMiddlewares(stack, options); err != nil {
|
||||
if err = addRetry(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
|
||||
if err = addRawResponseToMetadata(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
|
||||
if err = addRecordResponseTiming(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addClientUserAgent(stack, options); err != nil {
|
||||
|
|
@ -152,6 +167,9 @@ func (c *Client) addOperationDeleteBucketMiddlewares(stack *middleware.Stack, op
|
|||
if err = addPutBucketContextMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addTimeOffsetBuild(stack, c); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addOpDeleteBucketValidationMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
|
|
@ -161,7 +179,7 @@ func (c *Client) addOperationDeleteBucketMiddlewares(stack *middleware.Stack, op
|
|||
if err = addMetadataRetrieverMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = awsmiddleware.AddRecursionDetection(stack); err != nil {
|
||||
if err = addRecursionDetection(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addDeleteBucketUpdateEndpoint(stack, options); err != nil {
|
||||
|
|
|
|||
|
|
@ -13,20 +13,32 @@ import (
|
|||
smithyhttp "github.com/aws/smithy-go/transport/http"
|
||||
)
|
||||
|
||||
// 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
|
||||
// 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)
|
||||
// information about permissions, see [Permissions Related to Bucket Subresource Operations]and [Managing Access Permissions to Your Amazon S3 Resources].
|
||||
//
|
||||
// For information about the Amazon S3 analytics feature, see [Amazon S3 Analytics – Storage Class Analysis].
|
||||
//
|
||||
// The following operations are related to DeleteBucketAnalyticsConfiguration :
|
||||
//
|
||||
// [GetBucketAnalyticsConfiguration]
|
||||
//
|
||||
// [ListBucketAnalyticsConfigurations]
|
||||
//
|
||||
// [PutBucketAnalyticsConfiguration]
|
||||
//
|
||||
// [Amazon S3 Analytics – Storage Class Analysis]: https://docs.aws.amazon.com/AmazonS3/latest/dev/analytics-storage-class.html
|
||||
// [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
|
||||
// [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
|
||||
// [Managing Access Permissions to Your Amazon S3 Resources]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-access-control.html
|
||||
func (c *Client) DeleteBucketAnalyticsConfiguration(ctx context.Context, params *DeleteBucketAnalyticsConfigurationInput, optFns ...func(*Options)) (*DeleteBucketAnalyticsConfigurationOutput, error) {
|
||||
if params == nil {
|
||||
params = &DeleteBucketAnalyticsConfigurationInput{}
|
||||
|
|
@ -96,25 +108,25 @@ func (c *Client) addOperationDeleteBucketAnalyticsConfigurationMiddlewares(stack
|
|||
if err = addSetLoggerMiddleware(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
|
||||
if err = addClientRequestID(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
|
||||
if err = addComputeContentLength(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addResolveEndpointMiddleware(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
|
||||
if err = addComputePayloadSHA256(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addRetryMiddlewares(stack, options); err != nil {
|
||||
if err = addRetry(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
|
||||
if err = addRawResponseToMetadata(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
|
||||
if err = addRecordResponseTiming(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addClientUserAgent(stack, options); err != nil {
|
||||
|
|
@ -132,6 +144,9 @@ func (c *Client) addOperationDeleteBucketAnalyticsConfigurationMiddlewares(stack
|
|||
if err = addPutBucketContextMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addTimeOffsetBuild(stack, c); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addOpDeleteBucketAnalyticsConfigurationValidationMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
|
|
@ -141,7 +156,7 @@ func (c *Client) addOperationDeleteBucketAnalyticsConfigurationMiddlewares(stack
|
|||
if err = addMetadataRetrieverMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = awsmiddleware.AddRecursionDetection(stack); err != nil {
|
||||
if err = addRecursionDetection(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addDeleteBucketAnalyticsConfigurationUpdateEndpoint(stack, options); err != nil {
|
||||
|
|
|
|||
|
|
@ -13,14 +13,25 @@ import (
|
|||
smithyhttp "github.com/aws/smithy-go/transport/http"
|
||||
)
|
||||
|
||||
// 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)
|
||||
// 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] in the Amazon S3 User Guide.
|
||||
//
|
||||
// # Related Resources
|
||||
//
|
||||
// [PutBucketCors]
|
||||
//
|
||||
// [RESTOPTIONSobject]
|
||||
//
|
||||
// [PutBucketCors]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketCors.html
|
||||
// [Enabling Cross-Origin Resource Sharing]: https://docs.aws.amazon.com/AmazonS3/latest/dev/cors.html
|
||||
// [RESTOPTIONSobject]: https://docs.aws.amazon.com/AmazonS3/latest/API/RESTOPTIONSobject.html
|
||||
func (c *Client) DeleteBucketCors(ctx context.Context, params *DeleteBucketCorsInput, optFns ...func(*Options)) (*DeleteBucketCorsOutput, error) {
|
||||
if params == nil {
|
||||
params = &DeleteBucketCorsInput{}
|
||||
|
|
@ -85,25 +96,25 @@ func (c *Client) addOperationDeleteBucketCorsMiddlewares(stack *middleware.Stack
|
|||
if err = addSetLoggerMiddleware(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
|
||||
if err = addClientRequestID(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
|
||||
if err = addComputeContentLength(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addResolveEndpointMiddleware(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
|
||||
if err = addComputePayloadSHA256(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addRetryMiddlewares(stack, options); err != nil {
|
||||
if err = addRetry(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
|
||||
if err = addRawResponseToMetadata(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
|
||||
if err = addRecordResponseTiming(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addClientUserAgent(stack, options); err != nil {
|
||||
|
|
@ -121,6 +132,9 @@ func (c *Client) addOperationDeleteBucketCorsMiddlewares(stack *middleware.Stack
|
|||
if err = addPutBucketContextMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addTimeOffsetBuild(stack, c); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addOpDeleteBucketCorsValidationMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
|
|
@ -130,7 +144,7 @@ func (c *Client) addOperationDeleteBucketCorsMiddlewares(stack *middleware.Stack
|
|||
if err = addMetadataRetrieverMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = awsmiddleware.AddRecursionDetection(stack); err != nil {
|
||||
if err = addRecursionDetection(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addDeleteBucketCorsUpdateEndpoint(stack, options); err != nil {
|
||||
|
|
|
|||
54
vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_DeleteBucketEncryption.go
generated
vendored
54
vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_DeleteBucketEncryption.go
generated
vendored
|
|
@ -13,20 +13,29 @@ import (
|
|||
smithyhttp "github.com/aws/smithy-go/transport/http"
|
||||
)
|
||||
|
||||
// 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)
|
||||
// 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]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]and [Managing Access Permissions to your Amazon S3 Resources] in the Amazon S3 User Guide.
|
||||
//
|
||||
// The following operations are related to DeleteBucketEncryption :
|
||||
//
|
||||
// [PutBucketEncryption]
|
||||
//
|
||||
// [GetBucketEncryption]
|
||||
//
|
||||
// [GetBucketEncryption]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetBucketEncryption.html
|
||||
// [PutBucketEncryption]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketEncryption.html
|
||||
// [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
|
||||
// [Managing Access Permissions to your Amazon S3 Resources]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-access-control.html
|
||||
// [Amazon S3 Bucket Default Encryption]: https://docs.aws.amazon.com/AmazonS3/latest/dev/bucket-encryption.html
|
||||
func (c *Client) DeleteBucketEncryption(ctx context.Context, params *DeleteBucketEncryptionInput, optFns ...func(*Options)) (*DeleteBucketEncryptionOutput, error) {
|
||||
if params == nil {
|
||||
params = &DeleteBucketEncryptionInput{}
|
||||
|
|
@ -92,25 +101,25 @@ func (c *Client) addOperationDeleteBucketEncryptionMiddlewares(stack *middleware
|
|||
if err = addSetLoggerMiddleware(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
|
||||
if err = addClientRequestID(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
|
||||
if err = addComputeContentLength(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addResolveEndpointMiddleware(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
|
||||
if err = addComputePayloadSHA256(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addRetryMiddlewares(stack, options); err != nil {
|
||||
if err = addRetry(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
|
||||
if err = addRawResponseToMetadata(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
|
||||
if err = addRecordResponseTiming(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addClientUserAgent(stack, options); err != nil {
|
||||
|
|
@ -128,6 +137,9 @@ func (c *Client) addOperationDeleteBucketEncryptionMiddlewares(stack *middleware
|
|||
if err = addPutBucketContextMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addTimeOffsetBuild(stack, c); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addOpDeleteBucketEncryptionValidationMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
|
|
@ -137,7 +149,7 @@ func (c *Client) addOperationDeleteBucketEncryptionMiddlewares(stack *middleware
|
|||
if err = addMetadataRetrieverMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = awsmiddleware.AddRecursionDetection(stack); err != nil {
|
||||
if err = addRecursionDetection(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addDeleteBucketEncryptionUpdateEndpoint(stack, options); err != nil {
|
||||
|
|
|
|||
|
|
@ -13,25 +13,38 @@ import (
|
|||
smithyhttp "github.com/aws/smithy-go/transport/http"
|
||||
)
|
||||
|
||||
// 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,
|
||||
// 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)
|
||||
// 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].
|
||||
//
|
||||
// Operations related to DeleteBucketIntelligentTieringConfiguration include:
|
||||
//
|
||||
// [GetBucketIntelligentTieringConfiguration]
|
||||
//
|
||||
// [PutBucketIntelligentTieringConfiguration]
|
||||
//
|
||||
// [ListBucketIntelligentTieringConfigurations]
|
||||
//
|
||||
// [ListBucketIntelligentTieringConfigurations]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListBucketIntelligentTieringConfigurations.html
|
||||
// [GetBucketIntelligentTieringConfiguration]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetBucketIntelligentTieringConfiguration.html
|
||||
// [PutBucketIntelligentTieringConfiguration]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketIntelligentTieringConfiguration.html
|
||||
// [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
|
||||
func (c *Client) DeleteBucketIntelligentTieringConfiguration(ctx context.Context, params *DeleteBucketIntelligentTieringConfigurationInput, optFns ...func(*Options)) (*DeleteBucketIntelligentTieringConfigurationOutput, error) {
|
||||
if params == nil {
|
||||
params = &DeleteBucketIntelligentTieringConfigurationInput{}
|
||||
|
|
@ -97,25 +110,25 @@ func (c *Client) addOperationDeleteBucketIntelligentTieringConfigurationMiddlewa
|
|||
if err = addSetLoggerMiddleware(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
|
||||
if err = addClientRequestID(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
|
||||
if err = addComputeContentLength(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addResolveEndpointMiddleware(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
|
||||
if err = addComputePayloadSHA256(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addRetryMiddlewares(stack, options); err != nil {
|
||||
if err = addRetry(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
|
||||
if err = addRawResponseToMetadata(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
|
||||
if err = addRecordResponseTiming(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addClientUserAgent(stack, options); err != nil {
|
||||
|
|
@ -133,6 +146,9 @@ func (c *Client) addOperationDeleteBucketIntelligentTieringConfigurationMiddlewa
|
|||
if err = addPutBucketContextMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addTimeOffsetBuild(stack, c); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addOpDeleteBucketIntelligentTieringConfigurationValidationMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
|
|
@ -142,7 +158,7 @@ func (c *Client) addOperationDeleteBucketIntelligentTieringConfigurationMiddlewa
|
|||
if err = addMetadataRetrieverMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = awsmiddleware.AddRecursionDetection(stack); err != nil {
|
||||
if err = addRecursionDetection(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addDeleteBucketIntelligentTieringConfigurationUpdateEndpoint(stack, options); err != nil {
|
||||
|
|
|
|||
|
|
@ -13,18 +13,32 @@ import (
|
|||
smithyhttp "github.com/aws/smithy-go/transport/http"
|
||||
)
|
||||
|
||||
// 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)
|
||||
// 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]and [Managing Access Permissions to Your Amazon S3 Resources].
|
||||
//
|
||||
// For information about the Amazon S3 inventory feature, see [Amazon S3 Inventory].
|
||||
//
|
||||
// Operations related to DeleteBucketInventoryConfiguration include:
|
||||
//
|
||||
// [GetBucketInventoryConfiguration]
|
||||
//
|
||||
// [PutBucketInventoryConfiguration]
|
||||
//
|
||||
// [ListBucketInventoryConfigurations]
|
||||
//
|
||||
// [Amazon S3 Inventory]: https://docs.aws.amazon.com/AmazonS3/latest/dev/storage-inventory.html
|
||||
// [ListBucketInventoryConfigurations]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListBucketInventoryConfigurations.html
|
||||
// [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
|
||||
// [Managing Access Permissions to Your Amazon S3 Resources]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-access-control.html
|
||||
// [PutBucketInventoryConfiguration]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketInventoryConfiguration.html
|
||||
// [GetBucketInventoryConfiguration]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetBucketInventoryConfiguration.html
|
||||
func (c *Client) DeleteBucketInventoryConfiguration(ctx context.Context, params *DeleteBucketInventoryConfigurationInput, optFns ...func(*Options)) (*DeleteBucketInventoryConfigurationOutput, error) {
|
||||
if params == nil {
|
||||
params = &DeleteBucketInventoryConfigurationInput{}
|
||||
|
|
@ -94,25 +108,25 @@ func (c *Client) addOperationDeleteBucketInventoryConfigurationMiddlewares(stack
|
|||
if err = addSetLoggerMiddleware(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
|
||||
if err = addClientRequestID(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
|
||||
if err = addComputeContentLength(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addResolveEndpointMiddleware(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
|
||||
if err = addComputePayloadSHA256(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addRetryMiddlewares(stack, options); err != nil {
|
||||
if err = addRetry(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
|
||||
if err = addRawResponseToMetadata(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
|
||||
if err = addRecordResponseTiming(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addClientUserAgent(stack, options); err != nil {
|
||||
|
|
@ -130,6 +144,9 @@ func (c *Client) addOperationDeleteBucketInventoryConfigurationMiddlewares(stack
|
|||
if err = addPutBucketContextMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addTimeOffsetBuild(stack, c); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addOpDeleteBucketInventoryConfigurationValidationMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
|
|
@ -139,7 +156,7 @@ func (c *Client) addOperationDeleteBucketInventoryConfigurationMiddlewares(stack
|
|||
if err = addMetadataRetrieverMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = awsmiddleware.AddRecursionDetection(stack); err != nil {
|
||||
if err = addRecursionDetection(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addDeleteBucketInventoryConfigurationUpdateEndpoint(stack, options); err != nil {
|
||||
|
|
|
|||
53
vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_DeleteBucketLifecycle.go
generated
vendored
53
vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_DeleteBucketLifecycle.go
generated
vendored
|
|
@ -13,20 +13,32 @@ import (
|
|||
smithyhttp "github.com/aws/smithy-go/transport/http"
|
||||
)
|
||||
|
||||
// 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.
|
||||
// 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)
|
||||
// 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].
|
||||
//
|
||||
// Related actions include:
|
||||
//
|
||||
// [PutBucketLifecycleConfiguration]
|
||||
//
|
||||
// [GetBucketLifecycleConfiguration]
|
||||
//
|
||||
// [PutBucketLifecycleConfiguration]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketLifecycleConfiguration.html
|
||||
// [Elements to Describe Lifecycle Actions]: https://docs.aws.amazon.com/AmazonS3/latest/dev/intro-lifecycle-rules.html#intro-lifecycle-rules-actions
|
||||
// [GetBucketLifecycleConfiguration]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetBucketLifecycleConfiguration.html
|
||||
func (c *Client) DeleteBucketLifecycle(ctx context.Context, params *DeleteBucketLifecycleInput, optFns ...func(*Options)) (*DeleteBucketLifecycleOutput, error) {
|
||||
if params == nil {
|
||||
params = &DeleteBucketLifecycleInput{}
|
||||
|
|
@ -91,25 +103,25 @@ func (c *Client) addOperationDeleteBucketLifecycleMiddlewares(stack *middleware.
|
|||
if err = addSetLoggerMiddleware(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
|
||||
if err = addClientRequestID(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
|
||||
if err = addComputeContentLength(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addResolveEndpointMiddleware(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
|
||||
if err = addComputePayloadSHA256(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addRetryMiddlewares(stack, options); err != nil {
|
||||
if err = addRetry(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
|
||||
if err = addRawResponseToMetadata(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
|
||||
if err = addRecordResponseTiming(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addClientUserAgent(stack, options); err != nil {
|
||||
|
|
@ -127,6 +139,9 @@ func (c *Client) addOperationDeleteBucketLifecycleMiddlewares(stack *middleware.
|
|||
if err = addPutBucketContextMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addTimeOffsetBuild(stack, c); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addOpDeleteBucketLifecycleValidationMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
|
|
@ -136,7 +151,7 @@ func (c *Client) addOperationDeleteBucketLifecycleMiddlewares(stack *middleware.
|
|||
if err = addMetadataRetrieverMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = awsmiddleware.AddRecursionDetection(stack); err != nil {
|
||||
if err = addRecursionDetection(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addDeleteBucketLifecycleUpdateEndpoint(stack, options); err != nil {
|
||||
|
|
|
|||
|
|
@ -13,22 +13,35 @@ import (
|
|||
smithyhttp "github.com/aws/smithy-go/transport/http"
|
||||
)
|
||||
|
||||
// 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)
|
||||
// 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]and [Managing Access Permissions to Your Amazon S3 Resources].
|
||||
//
|
||||
// For information about CloudWatch request metrics for Amazon S3, see [Monitoring Metrics with Amazon CloudWatch].
|
||||
//
|
||||
// The following operations are related to DeleteBucketMetricsConfiguration :
|
||||
//
|
||||
// [GetBucketMetricsConfiguration]
|
||||
//
|
||||
// [PutBucketMetricsConfiguration]
|
||||
//
|
||||
// [ListBucketMetricsConfigurations]
|
||||
//
|
||||
// [Monitoring Metrics with Amazon CloudWatch]
|
||||
//
|
||||
// [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
|
||||
// [Monitoring Metrics with Amazon CloudWatch]: https://docs.aws.amazon.com/AmazonS3/latest/dev/cloudwatch-monitoring.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]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketMetricsConfiguration.html
|
||||
// [Managing Access Permissions to Your Amazon S3 Resources]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-access-control.html
|
||||
func (c *Client) DeleteBucketMetricsConfiguration(ctx context.Context, params *DeleteBucketMetricsConfigurationInput, optFns ...func(*Options)) (*DeleteBucketMetricsConfigurationOutput, error) {
|
||||
if params == nil {
|
||||
params = &DeleteBucketMetricsConfigurationInput{}
|
||||
|
|
@ -99,25 +112,25 @@ func (c *Client) addOperationDeleteBucketMetricsConfigurationMiddlewares(stack *
|
|||
if err = addSetLoggerMiddleware(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
|
||||
if err = addClientRequestID(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
|
||||
if err = addComputeContentLength(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addResolveEndpointMiddleware(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
|
||||
if err = addComputePayloadSHA256(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addRetryMiddlewares(stack, options); err != nil {
|
||||
if err = addRetry(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
|
||||
if err = addRawResponseToMetadata(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
|
||||
if err = addRecordResponseTiming(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addClientUserAgent(stack, options); err != nil {
|
||||
|
|
@ -135,6 +148,9 @@ func (c *Client) addOperationDeleteBucketMetricsConfigurationMiddlewares(stack *
|
|||
if err = addPutBucketContextMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addTimeOffsetBuild(stack, c); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addOpDeleteBucketMetricsConfigurationValidationMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
|
|
@ -144,7 +160,7 @@ func (c *Client) addOperationDeleteBucketMetricsConfigurationMiddlewares(stack *
|
|||
if err = addMetadataRetrieverMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = awsmiddleware.AddRecursionDetection(stack); err != nil {
|
||||
if err = addRecursionDetection(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addDeleteBucketMetricsConfigurationUpdateEndpoint(stack, options); err != nil {
|
||||
|
|
|
|||
41
vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_DeleteBucketOwnershipControls.go
generated
vendored
41
vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_DeleteBucketOwnershipControls.go
generated
vendored
|
|
@ -13,14 +13,22 @@ import (
|
|||
smithyhttp "github.com/aws/smithy-go/transport/http"
|
||||
)
|
||||
|
||||
// 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
|
||||
// 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].
|
||||
//
|
||||
// For information about Amazon S3 Object Ownership, see [Using Object Ownership].
|
||||
//
|
||||
// The following operations are related to DeleteBucketOwnershipControls :
|
||||
//
|
||||
// # GetBucketOwnershipControls
|
||||
//
|
||||
// # PutBucketOwnershipControls
|
||||
//
|
||||
// [Using Object Ownership]: https://docs.aws.amazon.com/AmazonS3/latest/dev/about-object-ownership.html
|
||||
// [Specifying Permissions in a Policy]: https://docs.aws.amazon.com/AmazonS3/latest/dev/using-with-s3-actions.html
|
||||
func (c *Client) DeleteBucketOwnershipControls(ctx context.Context, params *DeleteBucketOwnershipControlsInput, optFns ...func(*Options)) (*DeleteBucketOwnershipControlsOutput, error) {
|
||||
if params == nil {
|
||||
params = &DeleteBucketOwnershipControlsInput{}
|
||||
|
|
@ -85,25 +93,25 @@ func (c *Client) addOperationDeleteBucketOwnershipControlsMiddlewares(stack *mid
|
|||
if err = addSetLoggerMiddleware(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
|
||||
if err = addClientRequestID(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
|
||||
if err = addComputeContentLength(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addResolveEndpointMiddleware(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
|
||||
if err = addComputePayloadSHA256(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addRetryMiddlewares(stack, options); err != nil {
|
||||
if err = addRetry(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
|
||||
if err = addRawResponseToMetadata(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
|
||||
if err = addRecordResponseTiming(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addClientUserAgent(stack, options); err != nil {
|
||||
|
|
@ -121,6 +129,9 @@ func (c *Client) addOperationDeleteBucketOwnershipControlsMiddlewares(stack *mid
|
|||
if err = addPutBucketContextMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addTimeOffsetBuild(stack, c); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addOpDeleteBucketOwnershipControlsValidationMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
|
|
@ -130,7 +141,7 @@ func (c *Client) addOperationDeleteBucketOwnershipControlsMiddlewares(stack *mid
|
|||
if err = addMetadataRetrieverMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = awsmiddleware.AddRecursionDetection(stack); err != nil {
|
||||
if err = addRecursionDetection(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addDeleteBucketOwnershipControlsUpdateEndpoint(stack, options); err != nil {
|
||||
|
|
|
|||
|
|
@ -13,44 +13,57 @@ import (
|
|||
smithyhttp "github.com/aws/smithy-go/transport/http"
|
||||
)
|
||||
|
||||
// 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.
|
||||
// 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]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.
|
||||
// policies, see [Using Bucket Policies and User Policies]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.
|
||||
// policies and permissions, see [Amazon Web Services Identity and Access Management (IAM) for S3 Express One Zone]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)
|
||||
// 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]
|
||||
//
|
||||
// [DeleteObject]
|
||||
//
|
||||
// [DeleteObject]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_DeleteObject.html
|
||||
// [Regional and Zonal endpoints]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-express-Regions-and-Zones.html
|
||||
// [Using Bucket Policies and User Policies]: https://docs.aws.amazon.com/AmazonS3/latest/dev/using-iam-policies.html
|
||||
// [CreateBucket]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_CreateBucket.html
|
||||
// [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
|
||||
func (c *Client) DeleteBucketPolicy(ctx context.Context, params *DeleteBucketPolicyInput, optFns ...func(*Options)) (*DeleteBucketPolicyOutput, error) {
|
||||
if params == nil {
|
||||
params = &DeleteBucketPolicyInput{}
|
||||
|
|
@ -68,24 +81,29 @@ func (c *Client) DeleteBucketPolicy(ctx context.Context, params *DeleteBucketPol
|
|||
|
||||
type DeleteBucketPolicyInput struct {
|
||||
|
||||
// The bucket name. Directory buckets - When you use this operation with a
|
||||
// directory bucket, you must use path-style requests in the format
|
||||
// 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-az2--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_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]in the Amazon S3 User
|
||||
// Guide
|
||||
//
|
||||
// [Directory bucket naming rules]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/directory-bucket-naming-rules.html
|
||||
//
|
||||
// This member is required.
|
||||
Bucket *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). 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 .
|
||||
// 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
|
||||
|
||||
noSmithyDocumentSerde
|
||||
|
|
@ -125,25 +143,25 @@ func (c *Client) addOperationDeleteBucketPolicyMiddlewares(stack *middleware.Sta
|
|||
if err = addSetLoggerMiddleware(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
|
||||
if err = addClientRequestID(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
|
||||
if err = addComputeContentLength(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addResolveEndpointMiddleware(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
|
||||
if err = addComputePayloadSHA256(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addRetryMiddlewares(stack, options); err != nil {
|
||||
if err = addRetry(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
|
||||
if err = addRawResponseToMetadata(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
|
||||
if err = addRecordResponseTiming(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addClientUserAgent(stack, options); err != nil {
|
||||
|
|
@ -161,6 +179,9 @@ func (c *Client) addOperationDeleteBucketPolicyMiddlewares(stack *middleware.Sta
|
|||
if err = addPutBucketContextMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addTimeOffsetBuild(stack, c); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addOpDeleteBucketPolicyValidationMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
|
|
@ -170,7 +191,7 @@ func (c *Client) addOperationDeleteBucketPolicyMiddlewares(stack *middleware.Sta
|
|||
if err = addMetadataRetrieverMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = awsmiddleware.AddRecursionDetection(stack); err != nil {
|
||||
if err = addRecursionDetection(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addDeleteBucketPolicyUpdateEndpoint(stack, options); err != nil {
|
||||
|
|
|
|||
57
vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_DeleteBucketReplication.go
generated
vendored
57
vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_DeleteBucketReplication.go
generated
vendored
|
|
@ -13,18 +13,32 @@ import (
|
|||
smithyhttp "github.com/aws/smithy-go/transport/http"
|
||||
)
|
||||
|
||||
// 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)
|
||||
// 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]
|
||||
// and [Managing Access Permissions to Your Amazon S3 Resources].
|
||||
//
|
||||
// It can take a while for the deletion of a replication configuration to fully
|
||||
// propagate.
|
||||
//
|
||||
// For information about replication configuration, see [Replication] in the Amazon S3 User
|
||||
// Guide.
|
||||
//
|
||||
// The following operations are related to DeleteBucketReplication :
|
||||
//
|
||||
// [PutBucketReplication]
|
||||
//
|
||||
// [GetBucketReplication]
|
||||
//
|
||||
// [GetBucketReplication]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetBucketReplication.html
|
||||
// [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
|
||||
// [PutBucketReplication]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketReplication.html
|
||||
// [Replication]: https://docs.aws.amazon.com/AmazonS3/latest/dev/replication.html
|
||||
// [Managing Access Permissions to Your Amazon S3 Resources]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-access-control.html
|
||||
func (c *Client) DeleteBucketReplication(ctx context.Context, params *DeleteBucketReplicationInput, optFns ...func(*Options)) (*DeleteBucketReplicationOutput, error) {
|
||||
if params == nil {
|
||||
params = &DeleteBucketReplicationInput{}
|
||||
|
|
@ -42,7 +56,7 @@ func (c *Client) DeleteBucketReplication(ctx context.Context, params *DeleteBuck
|
|||
|
||||
type DeleteBucketReplicationInput struct {
|
||||
|
||||
// The bucket name.
|
||||
// The bucket name.
|
||||
//
|
||||
// This member is required.
|
||||
Bucket *string
|
||||
|
|
@ -89,25 +103,25 @@ func (c *Client) addOperationDeleteBucketReplicationMiddlewares(stack *middlewar
|
|||
if err = addSetLoggerMiddleware(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
|
||||
if err = addClientRequestID(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
|
||||
if err = addComputeContentLength(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addResolveEndpointMiddleware(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
|
||||
if err = addComputePayloadSHA256(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addRetryMiddlewares(stack, options); err != nil {
|
||||
if err = addRetry(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
|
||||
if err = addRawResponseToMetadata(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
|
||||
if err = addRecordResponseTiming(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addClientUserAgent(stack, options); err != nil {
|
||||
|
|
@ -125,6 +139,9 @@ func (c *Client) addOperationDeleteBucketReplicationMiddlewares(stack *middlewar
|
|||
if err = addPutBucketContextMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addTimeOffsetBuild(stack, c); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addOpDeleteBucketReplicationValidationMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
|
|
@ -134,7 +151,7 @@ func (c *Client) addOperationDeleteBucketReplicationMiddlewares(stack *middlewar
|
|||
if err = addMetadataRetrieverMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = awsmiddleware.AddRecursionDetection(stack); err != nil {
|
||||
if err = addRecursionDetection(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addDeleteBucketReplicationUpdateEndpoint(stack, options); err != nil {
|
||||
|
|
|
|||
|
|
@ -13,13 +13,22 @@ import (
|
|||
smithyhttp "github.com/aws/smithy-go/transport/http"
|
||||
)
|
||||
|
||||
// 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
|
||||
// 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)
|
||||
// can grant this permission to others.
|
||||
//
|
||||
// The following operations are related to DeleteBucketTagging :
|
||||
//
|
||||
// [GetBucketTagging]
|
||||
//
|
||||
// [PutBucketTagging]
|
||||
//
|
||||
// [GetBucketTagging]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetBucketTagging.html
|
||||
// [PutBucketTagging]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketTagging.html
|
||||
func (c *Client) DeleteBucketTagging(ctx context.Context, params *DeleteBucketTaggingInput, optFns ...func(*Options)) (*DeleteBucketTaggingOutput, error) {
|
||||
if params == nil {
|
||||
params = &DeleteBucketTaggingInput{}
|
||||
|
|
@ -84,25 +93,25 @@ func (c *Client) addOperationDeleteBucketTaggingMiddlewares(stack *middleware.St
|
|||
if err = addSetLoggerMiddleware(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
|
||||
if err = addClientRequestID(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
|
||||
if err = addComputeContentLength(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addResolveEndpointMiddleware(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
|
||||
if err = addComputePayloadSHA256(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addRetryMiddlewares(stack, options); err != nil {
|
||||
if err = addRetry(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
|
||||
if err = addRawResponseToMetadata(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
|
||||
if err = addRecordResponseTiming(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addClientUserAgent(stack, options); err != nil {
|
||||
|
|
@ -120,6 +129,9 @@ func (c *Client) addOperationDeleteBucketTaggingMiddlewares(stack *middleware.St
|
|||
if err = addPutBucketContextMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addTimeOffsetBuild(stack, c); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addOpDeleteBucketTaggingValidationMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
|
|
@ -129,7 +141,7 @@ func (c *Client) addOperationDeleteBucketTaggingMiddlewares(stack *middleware.St
|
|||
if err = addMetadataRetrieverMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = awsmiddleware.AddRecursionDetection(stack); err != nil {
|
||||
if err = addRecursionDetection(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addDeleteBucketTaggingUpdateEndpoint(stack, options); err != nil {
|
||||
|
|
|
|||
|
|
@ -13,20 +13,31 @@ import (
|
|||
smithyhttp "github.com/aws/smithy-go/transport/http"
|
||||
)
|
||||
|
||||
// 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)
|
||||
// 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].
|
||||
//
|
||||
// The following operations are related to DeleteBucketWebsite :
|
||||
//
|
||||
// [GetBucketWebsite]
|
||||
//
|
||||
// [PutBucketWebsite]
|
||||
//
|
||||
// [GetBucketWebsite]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetBucketWebsite.html
|
||||
// [PutBucketWebsite]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketWebsite.html
|
||||
// [Hosting Websites on Amazon S3]: https://docs.aws.amazon.com/AmazonS3/latest/dev/WebsiteHosting.html
|
||||
func (c *Client) DeleteBucketWebsite(ctx context.Context, params *DeleteBucketWebsiteInput, optFns ...func(*Options)) (*DeleteBucketWebsiteOutput, error) {
|
||||
if params == nil {
|
||||
params = &DeleteBucketWebsiteInput{}
|
||||
|
|
@ -91,25 +102,25 @@ func (c *Client) addOperationDeleteBucketWebsiteMiddlewares(stack *middleware.St
|
|||
if err = addSetLoggerMiddleware(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
|
||||
if err = addClientRequestID(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
|
||||
if err = addComputeContentLength(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addResolveEndpointMiddleware(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
|
||||
if err = addComputePayloadSHA256(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addRetryMiddlewares(stack, options); err != nil {
|
||||
if err = addRetry(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
|
||||
if err = addRawResponseToMetadata(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
|
||||
if err = addRecordResponseTiming(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addClientUserAgent(stack, options); err != nil {
|
||||
|
|
@ -127,6 +138,9 @@ func (c *Client) addOperationDeleteBucketWebsiteMiddlewares(stack *middleware.St
|
|||
if err = addPutBucketContextMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addTimeOffsetBuild(stack, c); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addOpDeleteBucketWebsiteValidationMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
|
|
@ -136,7 +150,7 @@ func (c *Client) addOperationDeleteBucketWebsiteMiddlewares(stack *middleware.St
|
|||
if err = addMetadataRetrieverMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = awsmiddleware.AddRecursionDetection(stack); err != nil {
|
||||
if err = addRecursionDetection(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addDeleteBucketWebsiteUpdateEndpoint(stack, options); err != nil {
|
||||
|
|
|
|||
|
|
@ -16,13 +16,21 @@ import (
|
|||
// Removes an object from a bucket. The behavior depends on the bucket's
|
||||
// versioning state:
|
||||
//
|
||||
// - If versioning is enabled, the operation removes the null version (if there
|
||||
// is one) of an object and inserts a delete marker, which becomes the latest
|
||||
// version of the object. If there isn't a null version, Amazon S3 does not remove
|
||||
// any objects but will still respond that the command was successful.
|
||||
// - If bucket versioning is not enabled, the operation permanently deletes the
|
||||
// object.
|
||||
//
|
||||
// - If versioning is suspended or 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].
|
||||
//
|
||||
// - 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].
|
||||
//
|
||||
// - 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
|
||||
|
|
@ -33,36 +41,43 @@ import (
|
|||
// 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.
|
||||
// Path-style requests are not supported. For more information, see [Regional and Zonal endpoints]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.
|
||||
// use HTTPS. For more information about MFA Delete, see [Using MFA Delete]in the Amazon S3 User
|
||||
// Guide. To see sample requests that use versioning, see [Sample Request].
|
||||
//
|
||||
// Directory buckets - MFA delete is not supported by directory buckets.
|
||||
//
|
||||
// You can delete objects by explicitly calling DELETE Object or calling ([PutBucketLifecycle] ) 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
|
||||
// versiong-enabled bucket, you must have the s3:DeleteObjectVersion permission.
|
||||
// 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
|
||||
// directory bucket, we recommend that you use the [CreateSession]CreateSession 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
|
||||
|
|
@ -70,13 +85,23 @@ import (
|
|||
// 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)
|
||||
// .
|
||||
// expires. For more information about authorization, see [CreateSession]CreateSession .
|
||||
//
|
||||
// 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)
|
||||
// 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]
|
||||
//
|
||||
// [Sample Request]: https://docs.aws.amazon.com/AmazonS3/latest/API/RESTObjectDELETE.html#ExampleVersionObjectDelete
|
||||
// [Regional and Zonal endpoints]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-express-Regions-and-Zones.html
|
||||
// [Deleting objects from versioning-suspended buckets]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/DeletingObjectsfromVersioningSuspendedBuckets.html
|
||||
// [PutObject]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutObject.html
|
||||
// [PutBucketLifecycle]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketLifecycle.html
|
||||
// [CreateSession]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_CreateSession.html
|
||||
// [Deleting object versions from a versioning-enabled bucket]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/DeletingObjectVersions.html
|
||||
// [Using MFA Delete]: https://docs.aws.amazon.com/AmazonS3/latest/dev/UsingMFADelete.html
|
||||
func (c *Client) DeleteObject(ctx context.Context, params *DeleteObjectInput, optFns ...func(*Options)) (*DeleteObjectOutput, error) {
|
||||
if params == nil {
|
||||
params = &DeleteObjectInput{}
|
||||
|
|
@ -94,31 +119,39 @@ func (c *Client) DeleteObject(ctx context.Context, params *DeleteObjectInput, op
|
|||
|
||||
type DeleteObjectInput struct {
|
||||
|
||||
// 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
|
||||
// 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-az2--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
|
||||
// example, DOC-EXAMPLE-BUCKET--usw2-az1--x-s3 ). For information about bucket
|
||||
// naming restrictions, see [Directory bucket naming rules]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]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.
|
||||
// information about S3 on Outposts ARNs, see [What is S3 on Outposts?]in the Amazon S3 User Guide.
|
||||
//
|
||||
// [Directory bucket naming rules]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/directory-bucket-naming-rules.html
|
||||
// [What is S3 on Outposts?]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/S3onOutposts.html
|
||||
// [Using access points]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/using-access-points.html
|
||||
//
|
||||
// This member is required.
|
||||
Bucket *string
|
||||
|
|
@ -130,8 +163,9 @@ type DeleteObjectInput struct {
|
|||
|
||||
// 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.
|
||||
// s3:BypassGovernanceRetention permission.
|
||||
//
|
||||
// This functionality is not supported for directory buckets.
|
||||
BypassGovernanceRetention *bool
|
||||
|
||||
// The account ID of the expected bucket owner. If the account ID that you provide
|
||||
|
|
@ -142,22 +176,27 @@ type DeleteObjectInput struct {
|
|||
// 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.
|
||||
// delete enabled.
|
||||
//
|
||||
// This functionality is not supported for directory buckets.
|
||||
MFA *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.
|
||||
// downloading objects from Requester Pays buckets, see [Downloading Objects in Requester Pays Buckets]in the Amazon S3 User
|
||||
// Guide.
|
||||
//
|
||||
// This functionality is not supported for directory buckets.
|
||||
//
|
||||
// [Downloading Objects in Requester Pays Buckets]: https://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html
|
||||
RequestPayer types.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.
|
||||
// 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
|
||||
|
||||
noSmithyDocumentSerde
|
||||
|
|
@ -174,16 +213,21 @@ type DeleteObjectOutput struct {
|
|||
// 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.
|
||||
// object is a delete marker.
|
||||
//
|
||||
// This functionality is not supported for directory buckets.
|
||||
DeleteMarker *bool
|
||||
|
||||
// If present, indicates that the requester was successfully charged for the
|
||||
// request. This functionality is not supported for directory buckets.
|
||||
// request.
|
||||
//
|
||||
// This functionality is not supported for directory buckets.
|
||||
RequestCharged types.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.
|
||||
// operation.
|
||||
//
|
||||
// This functionality is not supported for directory buckets.
|
||||
VersionId *string
|
||||
|
||||
// Metadata pertaining to the operation's result.
|
||||
|
|
@ -214,25 +258,25 @@ func (c *Client) addOperationDeleteObjectMiddlewares(stack *middleware.Stack, op
|
|||
if err = addSetLoggerMiddleware(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
|
||||
if err = addClientRequestID(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
|
||||
if err = addComputeContentLength(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addResolveEndpointMiddleware(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
|
||||
if err = addComputePayloadSHA256(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addRetryMiddlewares(stack, options); err != nil {
|
||||
if err = addRetry(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
|
||||
if err = addRawResponseToMetadata(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
|
||||
if err = addRecordResponseTiming(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addClientUserAgent(stack, options); err != nil {
|
||||
|
|
@ -250,6 +294,9 @@ func (c *Client) addOperationDeleteObjectMiddlewares(stack *middleware.Stack, op
|
|||
if err = addPutBucketContextMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addTimeOffsetBuild(stack, c); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addOpDeleteObjectValidationMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
|
|
@ -259,7 +306,7 @@ func (c *Client) addOperationDeleteObjectMiddlewares(stack *middleware.Stack, op
|
|||
if err = addMetadataRetrieverMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = awsmiddleware.AddRecursionDetection(stack); err != nil {
|
||||
if err = addRecursionDetection(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addDeleteObjectUpdateEndpoint(stack, options); err != nil {
|
||||
|
|
|
|||
|
|
@ -12,16 +12,27 @@ import (
|
|||
smithyhttp "github.com/aws/smithy-go/transport/http"
|
||||
)
|
||||
|
||||
// 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)
|
||||
// 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].
|
||||
//
|
||||
// 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]
|
||||
//
|
||||
// [GetObjectTagging]
|
||||
//
|
||||
// [PutObjectTagging]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutObjectTagging.html
|
||||
// [Object Tagging]: https://docs.aws.amazon.com/AmazonS3/latest/dev/object-tagging.html
|
||||
// [GetObjectTagging]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetObjectTagging.html
|
||||
func (c *Client) DeleteObjectTagging(ctx context.Context, params *DeleteObjectTaggingInput, optFns ...func(*Options)) (*DeleteObjectTaggingOutput, error) {
|
||||
if params == nil {
|
||||
params = &DeleteObjectTaggingInput{}
|
||||
|
|
@ -39,23 +50,27 @@ func (c *Client) DeleteObjectTagging(ctx context.Context, params *DeleteObjectTa
|
|||
|
||||
type DeleteObjectTaggingInput struct {
|
||||
|
||||
// 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
|
||||
// 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
|
||||
// access point ARNs, see [Using access points]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.
|
||||
// information about S3 on Outposts ARNs, see [What is S3 on Outposts?]in the Amazon S3 User Guide.
|
||||
//
|
||||
// [What is S3 on Outposts?]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/S3onOutposts.html
|
||||
// [Using access points]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/using-access-points.html
|
||||
//
|
||||
// This member is required.
|
||||
Bucket *string
|
||||
|
|
@ -114,25 +129,25 @@ func (c *Client) addOperationDeleteObjectTaggingMiddlewares(stack *middleware.St
|
|||
if err = addSetLoggerMiddleware(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
|
||||
if err = addClientRequestID(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
|
||||
if err = addComputeContentLength(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addResolveEndpointMiddleware(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
|
||||
if err = addComputePayloadSHA256(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addRetryMiddlewares(stack, options); err != nil {
|
||||
if err = addRetry(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
|
||||
if err = addRawResponseToMetadata(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
|
||||
if err = addRecordResponseTiming(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addClientUserAgent(stack, options); err != nil {
|
||||
|
|
@ -150,6 +165,9 @@ func (c *Client) addOperationDeleteObjectTaggingMiddlewares(stack *middleware.St
|
|||
if err = addPutBucketContextMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addTimeOffsetBuild(stack, c); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addOpDeleteObjectTaggingValidationMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
|
|
@ -159,7 +177,7 @@ func (c *Client) addOperationDeleteObjectTaggingMiddlewares(stack *middleware.St
|
|||
if err = addMetadataRetrieverMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = awsmiddleware.AddRecursionDetection(stack); err != nil {
|
||||
if err = addRecursionDetection(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addDeleteObjectTaggingUpdateEndpoint(stack, options); err != nil {
|
||||
|
|
|
|||
|
|
@ -17,47 +17,57 @@ import (
|
|||
// 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.
|
||||
// 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.
|
||||
// Path-style requests are not supported. For more information, see [Regional and Zonal endpoints]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
|
||||
// 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]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
|
||||
// versiong-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
|
||||
// directory bucket, we recommend that you use the [CreateSession]CreateSession 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
|
||||
|
|
@ -65,26 +75,42 @@ import (
|
|||
// 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)
|
||||
// .
|
||||
// expires. For more information about authorization, see [CreateSession]CreateSession .
|
||||
//
|
||||
// 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)
|
||||
// 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]
|
||||
//
|
||||
// [UploadPart]
|
||||
//
|
||||
// [CompleteMultipartUpload]
|
||||
//
|
||||
// [ListParts]
|
||||
//
|
||||
// [AbortMultipartUpload]
|
||||
//
|
||||
// [ListParts]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListParts.html
|
||||
// [AbortMultipartUpload]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_AbortMultipartUpload.html
|
||||
// [UploadPart]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_UploadPart.html
|
||||
// [Regional and Zonal endpoints]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-express-Regions-and-Zones.html
|
||||
// [CreateSession]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_CreateSession.html
|
||||
// [CompleteMultipartUpload]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_CompleteMultipartUpload.html
|
||||
// [MFA Delete]: https://docs.aws.amazon.com/AmazonS3/latest/dev/Versioning.html#MultiFactorAuthenticationDelete
|
||||
// [CreateMultipartUpload]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_CreateMultipartUpload.html
|
||||
func (c *Client) DeleteObjects(ctx context.Context, params *DeleteObjectsInput, optFns ...func(*Options)) (*DeleteObjectsOutput, error) {
|
||||
if params == nil {
|
||||
params = &DeleteObjectsInput{}
|
||||
|
|
@ -102,31 +128,39 @@ func (c *Client) DeleteObjects(ctx context.Context, params *DeleteObjectsInput,
|
|||
|
||||
type DeleteObjectsInput struct {
|
||||
|
||||
// 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-az2--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
|
||||
// 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]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]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.
|
||||
// information about S3 on Outposts ARNs, see [What is S3 on Outposts?]in the Amazon S3 User Guide.
|
||||
//
|
||||
// [Directory bucket naming rules]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/directory-bucket-naming-rules.html
|
||||
// [What is S3 on Outposts?]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/S3onOutposts.html
|
||||
// [Using access points]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/using-access-points.html
|
||||
//
|
||||
// This member is required.
|
||||
Bucket *string
|
||||
|
|
@ -138,28 +172,40 @@ type DeleteObjectsInput struct {
|
|||
|
||||
// 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.
|
||||
// s3:BypassGovernanceRetention permission.
|
||||
//
|
||||
// This functionality is not supported for directory buckets.
|
||||
BypassGovernanceRetention *bool
|
||||
|
||||
// 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:
|
||||
// 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.
|
||||
//
|
||||
// For more information, see [Checking object integrity] 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.
|
||||
//
|
||||
// [Checking object integrity]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html
|
||||
ChecksumAlgorithm types.ChecksumAlgorithm
|
||||
|
||||
// The account ID of the expected bucket owner. If the account ID that you provide
|
||||
|
|
@ -170,25 +216,31 @@ type DeleteObjectsInput struct {
|
|||
// 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.
|
||||
// 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]in the Amazon S3 User Guide.
|
||||
//
|
||||
// This functionality is not supported for directory buckets.
|
||||
//
|
||||
// [MFA Delete]: https://docs.aws.amazon.com/AmazonS3/latest/dev/Versioning.html#MultiFactorAuthenticationDelete
|
||||
MFA *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.
|
||||
// downloading objects from Requester Pays buckets, see [Downloading Objects in Requester Pays Buckets]in the Amazon S3 User
|
||||
// Guide.
|
||||
//
|
||||
// This functionality is not supported for directory buckets.
|
||||
//
|
||||
// [Downloading Objects in Requester Pays Buckets]: https://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html
|
||||
RequestPayer types.RequestPayer
|
||||
|
||||
noSmithyDocumentSerde
|
||||
|
|
@ -210,7 +262,9 @@ type DeleteObjectsOutput struct {
|
|||
Errors []types.Error
|
||||
|
||||
// If present, indicates that the requester was successfully charged for the
|
||||
// request. This functionality is not supported for directory buckets.
|
||||
// request.
|
||||
//
|
||||
// This functionality is not supported for directory buckets.
|
||||
RequestCharged types.RequestCharged
|
||||
|
||||
// Metadata pertaining to the operation's result.
|
||||
|
|
@ -241,25 +295,25 @@ func (c *Client) addOperationDeleteObjectsMiddlewares(stack *middleware.Stack, o
|
|||
if err = addSetLoggerMiddleware(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
|
||||
if err = addClientRequestID(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
|
||||
if err = addComputeContentLength(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addResolveEndpointMiddleware(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
|
||||
if err = addComputePayloadSHA256(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addRetryMiddlewares(stack, options); err != nil {
|
||||
if err = addRetry(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
|
||||
if err = addRawResponseToMetadata(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
|
||||
if err = addRecordResponseTiming(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addClientUserAgent(stack, options); err != nil {
|
||||
|
|
@ -277,6 +331,9 @@ func (c *Client) addOperationDeleteObjectsMiddlewares(stack *middleware.Stack, o
|
|||
if err = addPutBucketContextMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addTimeOffsetBuild(stack, c); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addOpDeleteObjectsValidationMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
|
|
@ -286,7 +343,7 @@ func (c *Client) addOperationDeleteObjectsMiddlewares(stack *middleware.Stack, o
|
|||
if err = addMetadataRetrieverMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = awsmiddleware.AddRecursionDetection(stack); err != nil {
|
||||
if err = addRecursionDetection(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addDeleteObjectsInputChecksumMiddlewares(stack, options); err != nil {
|
||||
|
|
|
|||
50
vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_DeletePublicAccessBlock.go
generated
vendored
50
vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_DeletePublicAccessBlock.go
generated
vendored
|
|
@ -13,17 +13,28 @@ import (
|
|||
smithyhttp "github.com/aws/smithy-go/transport/http"
|
||||
)
|
||||
|
||||
// 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)
|
||||
// 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]and [Managing Access Permissions to Your Amazon S3 Resources].
|
||||
//
|
||||
// The following operations are related to DeletePublicAccessBlock :
|
||||
//
|
||||
// [Using Amazon S3 Block Public Access]
|
||||
//
|
||||
// [GetPublicAccessBlock]
|
||||
//
|
||||
// [PutPublicAccessBlock]
|
||||
//
|
||||
// [GetBucketPolicyStatus]
|
||||
//
|
||||
// [GetPublicAccessBlock]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetPublicAccessBlock.html
|
||||
// [PutPublicAccessBlock]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutPublicAccessBlock.html
|
||||
// [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
|
||||
// [Using Amazon S3 Block Public Access]: https://docs.aws.amazon.com/AmazonS3/latest/dev/access-control-block-public-access.html
|
||||
// [Managing Access Permissions to Your Amazon S3 Resources]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-access-control.html
|
||||
// [GetBucketPolicyStatus]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetBucketPolicyStatus.html
|
||||
func (c *Client) DeletePublicAccessBlock(ctx context.Context, params *DeletePublicAccessBlockInput, optFns ...func(*Options)) (*DeletePublicAccessBlockOutput, error) {
|
||||
if params == nil {
|
||||
params = &DeletePublicAccessBlockInput{}
|
||||
|
|
@ -88,25 +99,25 @@ func (c *Client) addOperationDeletePublicAccessBlockMiddlewares(stack *middlewar
|
|||
if err = addSetLoggerMiddleware(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
|
||||
if err = addClientRequestID(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
|
||||
if err = addComputeContentLength(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addResolveEndpointMiddleware(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
|
||||
if err = addComputePayloadSHA256(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addRetryMiddlewares(stack, options); err != nil {
|
||||
if err = addRetry(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
|
||||
if err = addRawResponseToMetadata(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
|
||||
if err = addRecordResponseTiming(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addClientUserAgent(stack, options); err != nil {
|
||||
|
|
@ -124,6 +135,9 @@ func (c *Client) addOperationDeletePublicAccessBlockMiddlewares(stack *middlewar
|
|||
if err = addPutBucketContextMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addTimeOffsetBuild(stack, c); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addOpDeletePublicAccessBlockValidationMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
|
|
@ -133,7 +147,7 @@ func (c *Client) addOperationDeletePublicAccessBlockMiddlewares(stack *middlewar
|
|||
if err = addMetadataRetrieverMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = awsmiddleware.AddRecursionDetection(stack); err != nil {
|
||||
if err = addRecursionDetection(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addDeletePublicAccessBlockUpdateEndpoint(stack, options); err != nil {
|
||||
|
|
|
|||
|
|
@ -14,26 +14,36 @@ import (
|
|||
smithyhttp "github.com/aws/smithy-go/transport/http"
|
||||
)
|
||||
|
||||
// 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)
|
||||
// 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]and [Managing Access Permissions to your Amazon S3 Resources] in the Amazon S3 User Guide.
|
||||
//
|
||||
// You set the Transfer Acceleration state of an existing bucket to Enabled or
|
||||
// Suspended by using the [PutBucketAccelerateConfiguration] 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] in the Amazon S3 User
|
||||
// Guide.
|
||||
//
|
||||
// The following operations are related to GetBucketAccelerateConfiguration :
|
||||
//
|
||||
// [PutBucketAccelerateConfiguration]
|
||||
//
|
||||
// [PutBucketAccelerateConfiguration]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketAccelerateConfiguration.html
|
||||
// [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
|
||||
// [Managing Access Permissions to your Amazon S3 Resources]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-access-control.html
|
||||
// [Transfer Acceleration]: https://docs.aws.amazon.com/AmazonS3/latest/dev/transfer-acceleration.html
|
||||
func (c *Client) GetBucketAccelerateConfiguration(ctx context.Context, params *GetBucketAccelerateConfigurationInput, optFns ...func(*Options)) (*GetBucketAccelerateConfigurationOutput, error) {
|
||||
if params == nil {
|
||||
params = &GetBucketAccelerateConfigurationInput{}
|
||||
|
|
@ -65,10 +75,12 @@ type GetBucketAccelerateConfigurationInput struct {
|
|||
// 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.
|
||||
// downloading objects from Requester Pays buckets, see [Downloading Objects in Requester Pays Buckets]in the Amazon S3 User
|
||||
// Guide.
|
||||
//
|
||||
// This functionality is not supported for directory buckets.
|
||||
//
|
||||
// [Downloading Objects in Requester Pays Buckets]: https://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html
|
||||
RequestPayer types.RequestPayer
|
||||
|
||||
noSmithyDocumentSerde
|
||||
|
|
@ -82,7 +94,9 @@ func (in *GetBucketAccelerateConfigurationInput) bindEndpointParams(p *EndpointP
|
|||
type GetBucketAccelerateConfigurationOutput struct {
|
||||
|
||||
// If present, indicates that the requester was successfully charged for the
|
||||
// request. This functionality is not supported for directory buckets.
|
||||
// request.
|
||||
//
|
||||
// This functionality is not supported for directory buckets.
|
||||
RequestCharged types.RequestCharged
|
||||
|
||||
// The accelerate configuration of the bucket.
|
||||
|
|
@ -116,25 +130,25 @@ func (c *Client) addOperationGetBucketAccelerateConfigurationMiddlewares(stack *
|
|||
if err = addSetLoggerMiddleware(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
|
||||
if err = addClientRequestID(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
|
||||
if err = addComputeContentLength(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addResolveEndpointMiddleware(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
|
||||
if err = addComputePayloadSHA256(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addRetryMiddlewares(stack, options); err != nil {
|
||||
if err = addRetry(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
|
||||
if err = addRawResponseToMetadata(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
|
||||
if err = addRecordResponseTiming(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addClientUserAgent(stack, options); err != nil {
|
||||
|
|
@ -152,6 +166,9 @@ func (c *Client) addOperationGetBucketAccelerateConfigurationMiddlewares(stack *
|
|||
if err = addPutBucketContextMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addTimeOffsetBuild(stack, c); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addOpGetBucketAccelerateConfigurationValidationMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
|
|
@ -161,7 +178,7 @@ func (c *Client) addOperationGetBucketAccelerateConfigurationMiddlewares(stack *
|
|||
if err = addMetadataRetrieverMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = awsmiddleware.AddRecursionDetection(stack); err != nil {
|
||||
if err = addRecursionDetection(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addGetBucketAccelerateConfigurationUpdateEndpoint(stack, options); err != nil {
|
||||
|
|
|
|||
|
|
@ -14,26 +14,35 @@ import (
|
|||
smithyhttp "github.com/aws/smithy-go/transport/http"
|
||||
)
|
||||
|
||||
// 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
|
||||
// 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,
|
||||
// InvalidAccessPointAliasError , see [List of Error Codes].
|
||||
//
|
||||
// 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)
|
||||
// bucket. For more information, see [Controlling object ownership and disabling ACLs]in the Amazon S3 User Guide.
|
||||
//
|
||||
// The following operations are related to GetBucketAcl :
|
||||
//
|
||||
// [ListObjects]
|
||||
//
|
||||
// [ListObjects]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListObjects.html
|
||||
// [List of Error Codes]: https://docs.aws.amazon.com/AmazonS3/latest/API/ErrorResponses.html#ErrorCodeList
|
||||
// [Controlling object ownership and disabling ACLs]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/about-object-ownership.html
|
||||
func (c *Client) GetBucketAcl(ctx context.Context, params *GetBucketAclInput, optFns ...func(*Options)) (*GetBucketAclOutput, error) {
|
||||
if params == nil {
|
||||
params = &GetBucketAclInput{}
|
||||
|
|
@ -51,14 +60,18 @@ func (c *Client) GetBucketAcl(ctx context.Context, params *GetBucketAclInput, op
|
|||
|
||||
type GetBucketAclInput struct {
|
||||
|
||||
// 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)
|
||||
// .
|
||||
// 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].
|
||||
//
|
||||
// [List of Error Codes]: https://docs.aws.amazon.com/AmazonS3/latest/API/ErrorResponses.html#ErrorCodeList
|
||||
//
|
||||
// This member is required.
|
||||
Bucket *string
|
||||
|
|
@ -112,25 +125,25 @@ func (c *Client) addOperationGetBucketAclMiddlewares(stack *middleware.Stack, op
|
|||
if err = addSetLoggerMiddleware(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
|
||||
if err = addClientRequestID(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
|
||||
if err = addComputeContentLength(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addResolveEndpointMiddleware(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
|
||||
if err = addComputePayloadSHA256(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addRetryMiddlewares(stack, options); err != nil {
|
||||
if err = addRetry(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
|
||||
if err = addRawResponseToMetadata(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
|
||||
if err = addRecordResponseTiming(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addClientUserAgent(stack, options); err != nil {
|
||||
|
|
@ -148,6 +161,9 @@ func (c *Client) addOperationGetBucketAclMiddlewares(stack *middleware.Stack, op
|
|||
if err = addPutBucketContextMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addTimeOffsetBuild(stack, c); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addOpGetBucketAclValidationMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
|
|
@ -157,7 +173,7 @@ func (c *Client) addOperationGetBucketAclMiddlewares(stack *middleware.Stack, op
|
|||
if err = addMetadataRetrieverMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = awsmiddleware.AddRecursionDetection(stack); err != nil {
|
||||
if err = addRecursionDetection(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addGetBucketAclUpdateEndpoint(stack, options); err != nil {
|
||||
|
|
|
|||
59
vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetBucketAnalyticsConfiguration.go
generated
vendored
59
vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetBucketAnalyticsConfiguration.go
generated
vendored
|
|
@ -14,21 +14,33 @@ import (
|
|||
smithyhttp "github.com/aws/smithy-go/transport/http"
|
||||
)
|
||||
|
||||
// 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)
|
||||
// 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]and [Managing Access Permissions to Your Amazon S3 Resources] in the Amazon S3 User Guide.
|
||||
//
|
||||
// For information about Amazon S3 analytics feature, see [Amazon S3 Analytics – Storage Class Analysis] in the Amazon S3 User
|
||||
// Guide.
|
||||
//
|
||||
// The following operations are related to GetBucketAnalyticsConfiguration :
|
||||
//
|
||||
// [DeleteBucketAnalyticsConfiguration]
|
||||
//
|
||||
// [ListBucketAnalyticsConfigurations]
|
||||
//
|
||||
// [PutBucketAnalyticsConfiguration]
|
||||
//
|
||||
// [Amazon S3 Analytics – Storage Class Analysis]: https://docs.aws.amazon.com/AmazonS3/latest/dev/analytics-storage-class.html
|
||||
// [DeleteBucketAnalyticsConfiguration]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_DeleteBucketAnalyticsConfiguration.html
|
||||
// [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
|
||||
// [ListBucketAnalyticsConfigurations]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListBucketAnalyticsConfigurations.html
|
||||
// [PutBucketAnalyticsConfiguration]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketAnalyticsConfiguration.html
|
||||
// [Managing Access Permissions to Your Amazon S3 Resources]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-access-control.html
|
||||
func (c *Client) GetBucketAnalyticsConfiguration(ctx context.Context, params *GetBucketAnalyticsConfigurationInput, optFns ...func(*Options)) (*GetBucketAnalyticsConfigurationOutput, error) {
|
||||
if params == nil {
|
||||
params = &GetBucketAnalyticsConfigurationInput{}
|
||||
|
|
@ -102,25 +114,25 @@ func (c *Client) addOperationGetBucketAnalyticsConfigurationMiddlewares(stack *m
|
|||
if err = addSetLoggerMiddleware(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
|
||||
if err = addClientRequestID(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
|
||||
if err = addComputeContentLength(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addResolveEndpointMiddleware(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
|
||||
if err = addComputePayloadSHA256(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addRetryMiddlewares(stack, options); err != nil {
|
||||
if err = addRetry(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
|
||||
if err = addRawResponseToMetadata(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
|
||||
if err = addRecordResponseTiming(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addClientUserAgent(stack, options); err != nil {
|
||||
|
|
@ -138,6 +150,9 @@ func (c *Client) addOperationGetBucketAnalyticsConfigurationMiddlewares(stack *m
|
|||
if err = addPutBucketContextMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addTimeOffsetBuild(stack, c); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addOpGetBucketAnalyticsConfigurationValidationMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
|
|
@ -147,7 +162,7 @@ func (c *Client) addOperationGetBucketAnalyticsConfigurationMiddlewares(stack *m
|
|||
if err = addMetadataRetrieverMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = awsmiddleware.AddRecursionDetection(stack); err != nil {
|
||||
if err = addRecursionDetection(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addGetBucketAnalyticsConfigurationUpdateEndpoint(stack, options); err != nil {
|
||||
|
|
|
|||
|
|
@ -14,21 +14,36 @@ import (
|
|||
smithyhttp "github.com/aws/smithy-go/transport/http"
|
||||
)
|
||||
|
||||
// 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
|
||||
// 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)
|
||||
// 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].
|
||||
//
|
||||
// For more information about CORS, see [Enabling Cross-Origin Resource Sharing].
|
||||
//
|
||||
// The following operations are related to GetBucketCors :
|
||||
//
|
||||
// [PutBucketCors]
|
||||
//
|
||||
// [DeleteBucketCors]
|
||||
//
|
||||
// [PutBucketCors]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketCors.html
|
||||
// [Enabling Cross-Origin Resource Sharing]: https://docs.aws.amazon.com/AmazonS3/latest/dev/cors.html
|
||||
// [List of Error Codes]: https://docs.aws.amazon.com/AmazonS3/latest/API/ErrorResponses.html#ErrorCodeList
|
||||
// [DeleteBucketCors]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_DeleteBucketCors.html
|
||||
func (c *Client) GetBucketCors(ctx context.Context, params *GetBucketCorsInput, optFns ...func(*Options)) (*GetBucketCorsOutput, error) {
|
||||
if params == nil {
|
||||
params = &GetBucketCorsInput{}
|
||||
|
|
@ -46,14 +61,18 @@ func (c *Client) GetBucketCors(ctx context.Context, params *GetBucketCorsInput,
|
|||
|
||||
type GetBucketCorsInput struct {
|
||||
|
||||
// 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)
|
||||
// .
|
||||
// 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].
|
||||
//
|
||||
// [List of Error Codes]: https://docs.aws.amazon.com/AmazonS3/latest/API/ErrorResponses.html#ErrorCodeList
|
||||
//
|
||||
// This member is required.
|
||||
Bucket *string
|
||||
|
|
@ -105,25 +124,25 @@ func (c *Client) addOperationGetBucketCorsMiddlewares(stack *middleware.Stack, o
|
|||
if err = addSetLoggerMiddleware(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
|
||||
if err = addClientRequestID(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
|
||||
if err = addComputeContentLength(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addResolveEndpointMiddleware(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
|
||||
if err = addComputePayloadSHA256(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addRetryMiddlewares(stack, options); err != nil {
|
||||
if err = addRetry(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
|
||||
if err = addRawResponseToMetadata(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
|
||||
if err = addRecordResponseTiming(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addClientUserAgent(stack, options); err != nil {
|
||||
|
|
@ -141,6 +160,9 @@ func (c *Client) addOperationGetBucketCorsMiddlewares(stack *middleware.Stack, o
|
|||
if err = addPutBucketContextMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addTimeOffsetBuild(stack, c); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addOpGetBucketCorsValidationMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
|
|
@ -150,7 +172,7 @@ func (c *Client) addOperationGetBucketCorsMiddlewares(stack *middleware.Stack, o
|
|||
if err = addMetadataRetrieverMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = awsmiddleware.AddRecursionDetection(stack); err != nil {
|
||||
if err = addRecursionDetection(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addGetBucketCorsUpdateEndpoint(stack, options); err != nil {
|
||||
|
|
|
|||
|
|
@ -14,20 +14,29 @@ import (
|
|||
smithyhttp "github.com/aws/smithy-go/transport/http"
|
||||
)
|
||||
|
||||
// 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)
|
||||
// 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]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]and [Managing Access Permissions to Your Amazon S3 Resources].
|
||||
//
|
||||
// The following operations are related to GetBucketEncryption :
|
||||
//
|
||||
// [PutBucketEncryption]
|
||||
//
|
||||
// [DeleteBucketEncryption]
|
||||
//
|
||||
// [DeleteBucketEncryption]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_DeleteBucketEncryption.html
|
||||
// [PutBucketEncryption]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketEncryption.html
|
||||
// [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
|
||||
// [Amazon S3 Bucket Default Encryption]: https://docs.aws.amazon.com/AmazonS3/latest/dev/bucket-encryption.html
|
||||
// [Managing Access Permissions to Your Amazon S3 Resources]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-access-control.html
|
||||
func (c *Client) GetBucketEncryption(ctx context.Context, params *GetBucketEncryptionInput, optFns ...func(*Options)) (*GetBucketEncryptionOutput, error) {
|
||||
if params == nil {
|
||||
params = &GetBucketEncryptionInput{}
|
||||
|
|
@ -97,25 +106,25 @@ func (c *Client) addOperationGetBucketEncryptionMiddlewares(stack *middleware.St
|
|||
if err = addSetLoggerMiddleware(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
|
||||
if err = addClientRequestID(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
|
||||
if err = addComputeContentLength(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addResolveEndpointMiddleware(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
|
||||
if err = addComputePayloadSHA256(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addRetryMiddlewares(stack, options); err != nil {
|
||||
if err = addRetry(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
|
||||
if err = addRawResponseToMetadata(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
|
||||
if err = addRecordResponseTiming(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addClientUserAgent(stack, options); err != nil {
|
||||
|
|
@ -133,6 +142,9 @@ func (c *Client) addOperationGetBucketEncryptionMiddlewares(stack *middleware.St
|
|||
if err = addPutBucketContextMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addTimeOffsetBuild(stack, c); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addOpGetBucketEncryptionValidationMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
|
|
@ -142,7 +154,7 @@ func (c *Client) addOperationGetBucketEncryptionMiddlewares(stack *middleware.St
|
|||
if err = addMetadataRetrieverMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = awsmiddleware.AddRecursionDetection(stack); err != nil {
|
||||
if err = addRecursionDetection(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addGetBucketEncryptionUpdateEndpoint(stack, options); err != nil {
|
||||
|
|
|
|||
|
|
@ -14,25 +14,38 @@ import (
|
|||
smithyhttp "github.com/aws/smithy-go/transport/http"
|
||||
)
|
||||
|
||||
// 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,
|
||||
// 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)
|
||||
// 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].
|
||||
//
|
||||
// Operations related to GetBucketIntelligentTieringConfiguration include:
|
||||
//
|
||||
// [DeleteBucketIntelligentTieringConfiguration]
|
||||
//
|
||||
// [PutBucketIntelligentTieringConfiguration]
|
||||
//
|
||||
// [ListBucketIntelligentTieringConfigurations]
|
||||
//
|
||||
// [ListBucketIntelligentTieringConfigurations]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListBucketIntelligentTieringConfigurations.html
|
||||
// [PutBucketIntelligentTieringConfiguration]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketIntelligentTieringConfiguration.html
|
||||
// [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
|
||||
// [DeleteBucketIntelligentTieringConfiguration]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_DeleteBucketIntelligentTieringConfiguration.html
|
||||
func (c *Client) GetBucketIntelligentTieringConfiguration(ctx context.Context, params *GetBucketIntelligentTieringConfigurationInput, optFns ...func(*Options)) (*GetBucketIntelligentTieringConfigurationOutput, error) {
|
||||
if params == nil {
|
||||
params = &GetBucketIntelligentTieringConfigurationInput{}
|
||||
|
|
@ -102,25 +115,25 @@ func (c *Client) addOperationGetBucketIntelligentTieringConfigurationMiddlewares
|
|||
if err = addSetLoggerMiddleware(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
|
||||
if err = addClientRequestID(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
|
||||
if err = addComputeContentLength(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addResolveEndpointMiddleware(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
|
||||
if err = addComputePayloadSHA256(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addRetryMiddlewares(stack, options); err != nil {
|
||||
if err = addRetry(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
|
||||
if err = addRawResponseToMetadata(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
|
||||
if err = addRecordResponseTiming(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addClientUserAgent(stack, options); err != nil {
|
||||
|
|
@ -138,6 +151,9 @@ func (c *Client) addOperationGetBucketIntelligentTieringConfigurationMiddlewares
|
|||
if err = addPutBucketContextMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addTimeOffsetBuild(stack, c); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addOpGetBucketIntelligentTieringConfigurationValidationMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
|
|
@ -147,7 +163,7 @@ func (c *Client) addOperationGetBucketIntelligentTieringConfigurationMiddlewares
|
|||
if err = addMetadataRetrieverMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = awsmiddleware.AddRecursionDetection(stack); err != nil {
|
||||
if err = addRecursionDetection(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addGetBucketIntelligentTieringConfigurationUpdateEndpoint(stack, options); err != nil {
|
||||
|
|
|
|||
51
vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetBucketInventoryConfiguration.go
generated
vendored
51
vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetBucketInventoryConfiguration.go
generated
vendored
|
|
@ -14,18 +14,32 @@ import (
|
|||
smithyhttp "github.com/aws/smithy-go/transport/http"
|
||||
)
|
||||
|
||||
// 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
|
||||
// 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)
|
||||
// permissions, see [Permissions Related to Bucket Subresource Operations]and [Managing Access Permissions to Your Amazon S3 Resources].
|
||||
//
|
||||
// For information about the Amazon S3 inventory feature, see [Amazon S3 Inventory].
|
||||
//
|
||||
// The following operations are related to GetBucketInventoryConfiguration :
|
||||
//
|
||||
// [DeleteBucketInventoryConfiguration]
|
||||
//
|
||||
// [ListBucketInventoryConfigurations]
|
||||
//
|
||||
// [PutBucketInventoryConfiguration]
|
||||
//
|
||||
// [Amazon S3 Inventory]: https://docs.aws.amazon.com/AmazonS3/latest/dev/storage-inventory.html
|
||||
// [ListBucketInventoryConfigurations]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListBucketInventoryConfigurations.html
|
||||
// [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
|
||||
// [DeleteBucketInventoryConfiguration]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_DeleteBucketInventoryConfiguration.html
|
||||
// [Managing Access Permissions to Your Amazon S3 Resources]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-access-control.html
|
||||
// [PutBucketInventoryConfiguration]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketInventoryConfiguration.html
|
||||
func (c *Client) GetBucketInventoryConfiguration(ctx context.Context, params *GetBucketInventoryConfigurationInput, optFns ...func(*Options)) (*GetBucketInventoryConfigurationOutput, error) {
|
||||
if params == nil {
|
||||
params = &GetBucketInventoryConfigurationInput{}
|
||||
|
|
@ -99,25 +113,25 @@ func (c *Client) addOperationGetBucketInventoryConfigurationMiddlewares(stack *m
|
|||
if err = addSetLoggerMiddleware(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
|
||||
if err = addClientRequestID(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
|
||||
if err = addComputeContentLength(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addResolveEndpointMiddleware(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
|
||||
if err = addComputePayloadSHA256(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addRetryMiddlewares(stack, options); err != nil {
|
||||
if err = addRetry(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
|
||||
if err = addRawResponseToMetadata(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
|
||||
if err = addRecordResponseTiming(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addClientUserAgent(stack, options); err != nil {
|
||||
|
|
@ -135,6 +149,9 @@ func (c *Client) addOperationGetBucketInventoryConfigurationMiddlewares(stack *m
|
|||
if err = addPutBucketContextMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addTimeOffsetBuild(stack, c); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addOpGetBucketInventoryConfigurationValidationMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
|
|
@ -144,7 +161,7 @@ func (c *Client) addOperationGetBucketInventoryConfigurationMiddlewares(stack *m
|
|||
if err = addMetadataRetrieverMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = awsmiddleware.AddRecursionDetection(stack); err != nil {
|
||||
if err = addRecursionDetection(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addGetBucketInventoryConfigurationUpdateEndpoint(stack, options); err != nil {
|
||||
|
|
|
|||
71
vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetBucketLifecycleConfiguration.go
generated
vendored
71
vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetBucketLifecycleConfiguration.go
generated
vendored
|
|
@ -14,31 +14,51 @@ import (
|
|||
smithyhttp "github.com/aws/smithy-go/transport/http"
|
||||
)
|
||||
|
||||
// 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, or a combination of both. 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, see GetBucketLifecycle (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetBucketLifecycle.html)
|
||||
// . 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
|
||||
// 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]. 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].
|
||||
//
|
||||
// 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:
|
||||
// information about permissions, see [Permissions Related to Bucket Subresource Operations]and [Managing Access Permissions to Your Amazon S3 Resources].
|
||||
//
|
||||
// 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)
|
||||
//
|
||||
// [GetBucketLifecycle]
|
||||
//
|
||||
// [PutBucketLifecycle]
|
||||
//
|
||||
// [DeleteBucketLifecycle]
|
||||
//
|
||||
// [GetBucketLifecycle]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetBucketLifecycle.html
|
||||
// [Object Lifecycle Management]: https://docs.aws.amazon.com/AmazonS3/latest/dev/object-lifecycle-mgmt.html
|
||||
// [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
|
||||
// [PutBucketLifecycle]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketLifecycle.html
|
||||
// [Managing Access Permissions to Your Amazon S3 Resources]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-access-control.html
|
||||
// [DeleteBucketLifecycle]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_DeleteBucketLifecycle.html
|
||||
func (c *Client) GetBucketLifecycleConfiguration(ctx context.Context, params *GetBucketLifecycleConfigurationInput, optFns ...func(*Options)) (*GetBucketLifecycleConfigurationOutput, error) {
|
||||
if params == nil {
|
||||
params = &GetBucketLifecycleConfigurationInput{}
|
||||
|
|
@ -107,25 +127,25 @@ func (c *Client) addOperationGetBucketLifecycleConfigurationMiddlewares(stack *m
|
|||
if err = addSetLoggerMiddleware(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
|
||||
if err = addClientRequestID(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
|
||||
if err = addComputeContentLength(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addResolveEndpointMiddleware(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
|
||||
if err = addComputePayloadSHA256(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addRetryMiddlewares(stack, options); err != nil {
|
||||
if err = addRetry(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
|
||||
if err = addRawResponseToMetadata(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
|
||||
if err = addRecordResponseTiming(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addClientUserAgent(stack, options); err != nil {
|
||||
|
|
@ -143,6 +163,9 @@ func (c *Client) addOperationGetBucketLifecycleConfigurationMiddlewares(stack *m
|
|||
if err = addPutBucketContextMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addTimeOffsetBuild(stack, c); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addOpGetBucketLifecycleConfigurationValidationMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
|
|
@ -152,7 +175,7 @@ func (c *Client) addOperationGetBucketLifecycleConfigurationMiddlewares(stack *m
|
|||
if err = addMetadataRetrieverMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = awsmiddleware.AddRecursionDetection(stack); err != nil {
|
||||
if err = addRecursionDetection(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addGetBucketLifecycleConfigurationUpdateEndpoint(stack, options); err != nil {
|
||||
|
|
|
|||
|
|
@ -20,23 +20,34 @@ import (
|
|||
"io"
|
||||
)
|
||||
|
||||
// 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)
|
||||
// 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].
|
||||
//
|
||||
// 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].
|
||||
//
|
||||
// We recommend that you use [HeadBucket] 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]
|
||||
//
|
||||
// [CreateBucket]
|
||||
//
|
||||
// [List of Error Codes]: https://docs.aws.amazon.com/AmazonS3/latest/API/ErrorResponses.html#ErrorCodeList
|
||||
// [CreateBucket]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_CreateBucket.html
|
||||
// [GetObject]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetObject.html
|
||||
// [HeadBucket]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_HeadBucket.html
|
||||
func (c *Client) GetBucketLocation(ctx context.Context, params *GetBucketLocationInput, optFns ...func(*Options)) (*GetBucketLocationOutput, error) {
|
||||
if params == nil {
|
||||
params = &GetBucketLocationInput{}
|
||||
|
|
@ -54,14 +65,18 @@ func (c *Client) GetBucketLocation(ctx context.Context, params *GetBucketLocatio
|
|||
|
||||
type GetBucketLocationInput struct {
|
||||
|
||||
// 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)
|
||||
// .
|
||||
// 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].
|
||||
//
|
||||
// [List of Error Codes]: https://docs.aws.amazon.com/AmazonS3/latest/API/ErrorResponses.html#ErrorCodeList
|
||||
//
|
||||
// This member is required.
|
||||
Bucket *string
|
||||
|
|
@ -82,8 +97,10 @@ func (in *GetBucketLocationInput) bindEndpointParams(p *EndpointParameters) {
|
|||
type GetBucketLocationOutput struct {
|
||||
|
||||
// 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 .
|
||||
// supported location constraints by Region, see [Regions and Endpoints]. Buckets in Region us-east-1
|
||||
// have a LocationConstraint of null .
|
||||
//
|
||||
// [Regions and Endpoints]: https://docs.aws.amazon.com/general/latest/gr/rande.html#s3_region
|
||||
LocationConstraint types.BucketLocationConstraint
|
||||
|
||||
// Metadata pertaining to the operation's result.
|
||||
|
|
@ -114,25 +131,25 @@ func (c *Client) addOperationGetBucketLocationMiddlewares(stack *middleware.Stac
|
|||
if err = addSetLoggerMiddleware(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
|
||||
if err = addClientRequestID(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
|
||||
if err = addComputeContentLength(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addResolveEndpointMiddleware(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
|
||||
if err = addComputePayloadSHA256(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addRetryMiddlewares(stack, options); err != nil {
|
||||
if err = addRetry(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
|
||||
if err = addRawResponseToMetadata(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
|
||||
if err = addRecordResponseTiming(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addClientUserAgent(stack, options); err != nil {
|
||||
|
|
@ -153,6 +170,9 @@ func (c *Client) addOperationGetBucketLocationMiddlewares(stack *middleware.Stac
|
|||
if err = addPutBucketContextMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addTimeOffsetBuild(stack, c); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addOpGetBucketLocationValidationMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
|
|
@ -162,7 +182,7 @@ func (c *Client) addOperationGetBucketLocationMiddlewares(stack *middleware.Stac
|
|||
if err = addMetadataRetrieverMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = awsmiddleware.AddRecursionDetection(stack); err != nil {
|
||||
if err = addRecursionDetection(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addGetBucketLocationUpdateEndpoint(stack, options); err != nil {
|
||||
|
|
|
|||
|
|
@ -14,11 +14,19 @@ import (
|
|||
smithyhttp "github.com/aws/smithy-go/transport/http"
|
||||
)
|
||||
|
||||
// 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)
|
||||
// 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]
|
||||
//
|
||||
// [PutBucketLogging]
|
||||
//
|
||||
// [PutBucketLogging]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketLogging.html
|
||||
// [CreateBucket]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_CreateBucket.html
|
||||
func (c *Client) GetBucketLogging(ctx context.Context, params *GetBucketLoggingInput, optFns ...func(*Options)) (*GetBucketLoggingOutput, error) {
|
||||
if params == nil {
|
||||
params = &GetBucketLoggingInput{}
|
||||
|
|
@ -57,8 +65,10 @@ func (in *GetBucketLoggingInput) bindEndpointParams(p *EndpointParameters) {
|
|||
type GetBucketLoggingOutput struct {
|
||||
|
||||
// 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.
|
||||
// log object keys for a bucket. For more information, see [PUT Bucket logging]in the Amazon S3 API
|
||||
// Reference.
|
||||
//
|
||||
// [PUT Bucket logging]: https://docs.aws.amazon.com/AmazonS3/latest/API/RESTBucketPUTlogging.html
|
||||
LoggingEnabled *types.LoggingEnabled
|
||||
|
||||
// Metadata pertaining to the operation's result.
|
||||
|
|
@ -89,25 +99,25 @@ func (c *Client) addOperationGetBucketLoggingMiddlewares(stack *middleware.Stack
|
|||
if err = addSetLoggerMiddleware(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
|
||||
if err = addClientRequestID(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
|
||||
if err = addComputeContentLength(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addResolveEndpointMiddleware(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
|
||||
if err = addComputePayloadSHA256(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addRetryMiddlewares(stack, options); err != nil {
|
||||
if err = addRetry(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
|
||||
if err = addRawResponseToMetadata(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
|
||||
if err = addRecordResponseTiming(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addClientUserAgent(stack, options); err != nil {
|
||||
|
|
@ -125,6 +135,9 @@ func (c *Client) addOperationGetBucketLoggingMiddlewares(stack *middleware.Stack
|
|||
if err = addPutBucketContextMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addTimeOffsetBuild(stack, c); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addOpGetBucketLoggingValidationMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
|
|
@ -134,7 +147,7 @@ func (c *Client) addOperationGetBucketLoggingMiddlewares(stack *middleware.Stack
|
|||
if err = addMetadataRetrieverMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = awsmiddleware.AddRecursionDetection(stack); err != nil {
|
||||
if err = addRecursionDetection(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addGetBucketLoggingUpdateEndpoint(stack, options); err != nil {
|
||||
|
|
|
|||
60
vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetBucketMetricsConfiguration.go
generated
vendored
60
vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetBucketMetricsConfiguration.go
generated
vendored
|
|
@ -14,21 +14,34 @@ import (
|
|||
smithyhttp "github.com/aws/smithy-go/transport/http"
|
||||
)
|
||||
|
||||
// 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)
|
||||
// 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]and [Managing Access Permissions to Your Amazon S3 Resources].
|
||||
//
|
||||
// For information about CloudWatch request metrics for Amazon S3, see [Monitoring Metrics with Amazon CloudWatch].
|
||||
//
|
||||
// The following operations are related to GetBucketMetricsConfiguration :
|
||||
//
|
||||
// [PutBucketMetricsConfiguration]
|
||||
//
|
||||
// [DeleteBucketMetricsConfiguration]
|
||||
//
|
||||
// [ListBucketMetricsConfigurations]
|
||||
//
|
||||
// [Monitoring Metrics with Amazon CloudWatch]
|
||||
//
|
||||
// [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
|
||||
// [Monitoring Metrics with Amazon CloudWatch]: https://docs.aws.amazon.com/AmazonS3/latest/dev/cloudwatch-monitoring.html
|
||||
// [ListBucketMetricsConfigurations]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListBucketMetricsConfigurations.html
|
||||
// [PutBucketMetricsConfiguration]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketMetricsConfiguration.html
|
||||
// [DeleteBucketMetricsConfiguration]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_DeleteBucketMetricsConfiguration.html
|
||||
// [Managing Access Permissions to Your Amazon S3 Resources]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-access-control.html
|
||||
func (c *Client) GetBucketMetricsConfiguration(ctx context.Context, params *GetBucketMetricsConfigurationInput, optFns ...func(*Options)) (*GetBucketMetricsConfigurationOutput, error) {
|
||||
if params == nil {
|
||||
params = &GetBucketMetricsConfigurationInput{}
|
||||
|
|
@ -103,25 +116,25 @@ func (c *Client) addOperationGetBucketMetricsConfigurationMiddlewares(stack *mid
|
|||
if err = addSetLoggerMiddleware(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
|
||||
if err = addClientRequestID(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
|
||||
if err = addComputeContentLength(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addResolveEndpointMiddleware(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
|
||||
if err = addComputePayloadSHA256(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addRetryMiddlewares(stack, options); err != nil {
|
||||
if err = addRetry(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
|
||||
if err = addRawResponseToMetadata(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
|
||||
if err = addRecordResponseTiming(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addClientUserAgent(stack, options); err != nil {
|
||||
|
|
@ -139,6 +152,9 @@ func (c *Client) addOperationGetBucketMetricsConfigurationMiddlewares(stack *mid
|
|||
if err = addPutBucketContextMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addTimeOffsetBuild(stack, c); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addOpGetBucketMetricsConfigurationValidationMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
|
|
@ -148,7 +164,7 @@ func (c *Client) addOperationGetBucketMetricsConfigurationMiddlewares(stack *mid
|
|||
if err = addMetadataRetrieverMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = awsmiddleware.AddRecursionDetection(stack); err != nil {
|
||||
if err = addRecursionDetection(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addGetBucketMetricsConfigurationUpdateEndpoint(stack, options); err != nil {
|
||||
|
|
|
|||
|
|
@ -14,24 +14,38 @@ import (
|
|||
smithyhttp "github.com/aws/smithy-go/transport/http"
|
||||
)
|
||||
|
||||
// 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)
|
||||
// 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].
|
||||
//
|
||||
// For more information about setting and reading the notification configuration
|
||||
// on a bucket, see [Setting Up Notification of Bucket Events]. For more information about bucket policies, see [Using Bucket Policies].
|
||||
//
|
||||
// The following action is related to GetBucketNotification :
|
||||
//
|
||||
// [PutBucketNotification]
|
||||
//
|
||||
// [Using Bucket Policies]: https://docs.aws.amazon.com/AmazonS3/latest/dev/using-iam-policies.html
|
||||
// [Setting Up Notification of Bucket Events]: https://docs.aws.amazon.com/AmazonS3/latest/dev/NotificationHowTo.html
|
||||
// [List of Error Codes]: https://docs.aws.amazon.com/AmazonS3/latest/API/ErrorResponses.html#ErrorCodeList
|
||||
// [PutBucketNotification]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketNotification.html
|
||||
func (c *Client) GetBucketNotificationConfiguration(ctx context.Context, params *GetBucketNotificationConfigurationInput, optFns ...func(*Options)) (*GetBucketNotificationConfigurationOutput, error) {
|
||||
if params == nil {
|
||||
params = &GetBucketNotificationConfigurationInput{}
|
||||
|
|
@ -49,15 +63,18 @@ func (c *Client) GetBucketNotificationConfiguration(ctx context.Context, params
|
|||
|
||||
type GetBucketNotificationConfigurationInput struct {
|
||||
|
||||
// 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)
|
||||
// .
|
||||
// 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].
|
||||
//
|
||||
// [List of Error Codes]: https://docs.aws.amazon.com/AmazonS3/latest/API/ErrorResponses.html#ErrorCodeList
|
||||
//
|
||||
// This member is required.
|
||||
Bucket *string
|
||||
|
|
@ -122,25 +139,25 @@ func (c *Client) addOperationGetBucketNotificationConfigurationMiddlewares(stack
|
|||
if err = addSetLoggerMiddleware(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
|
||||
if err = addClientRequestID(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
|
||||
if err = addComputeContentLength(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addResolveEndpointMiddleware(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
|
||||
if err = addComputePayloadSHA256(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addRetryMiddlewares(stack, options); err != nil {
|
||||
if err = addRetry(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
|
||||
if err = addRawResponseToMetadata(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
|
||||
if err = addRecordResponseTiming(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addClientUserAgent(stack, options); err != nil {
|
||||
|
|
@ -158,6 +175,9 @@ func (c *Client) addOperationGetBucketNotificationConfigurationMiddlewares(stack
|
|||
if err = addPutBucketContextMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addTimeOffsetBuild(stack, c); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addOpGetBucketNotificationConfigurationValidationMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
|
|
@ -167,7 +187,7 @@ func (c *Client) addOperationGetBucketNotificationConfigurationMiddlewares(stack
|
|||
if err = addMetadataRetrieverMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = awsmiddleware.AddRecursionDetection(stack); err != nil {
|
||||
if err = addRecursionDetection(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addGetBucketNotificationConfigurationUpdateEndpoint(stack, options); err != nil {
|
||||
|
|
|
|||
41
vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetBucketOwnershipControls.go
generated
vendored
41
vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetBucketOwnershipControls.go
generated
vendored
|
|
@ -14,14 +14,22 @@ import (
|
|||
smithyhttp "github.com/aws/smithy-go/transport/http"
|
||||
)
|
||||
|
||||
// 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
|
||||
// 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].
|
||||
//
|
||||
// For information about Amazon S3 Object Ownership, see [Using Object Ownership].
|
||||
//
|
||||
// The following operations are related to GetBucketOwnershipControls :
|
||||
//
|
||||
// # PutBucketOwnershipControls
|
||||
//
|
||||
// # DeleteBucketOwnershipControls
|
||||
//
|
||||
// [Using Object Ownership]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/about-object-ownership.html
|
||||
// [Specifying permissions in a policy]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/using-with-s3-actions.html
|
||||
func (c *Client) GetBucketOwnershipControls(ctx context.Context, params *GetBucketOwnershipControlsInput, optFns ...func(*Options)) (*GetBucketOwnershipControlsOutput, error) {
|
||||
if params == nil {
|
||||
params = &GetBucketOwnershipControlsInput{}
|
||||
|
|
@ -91,25 +99,25 @@ func (c *Client) addOperationGetBucketOwnershipControlsMiddlewares(stack *middle
|
|||
if err = addSetLoggerMiddleware(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
|
||||
if err = addClientRequestID(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
|
||||
if err = addComputeContentLength(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addResolveEndpointMiddleware(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
|
||||
if err = addComputePayloadSHA256(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addRetryMiddlewares(stack, options); err != nil {
|
||||
if err = addRetry(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
|
||||
if err = addRawResponseToMetadata(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
|
||||
if err = addRecordResponseTiming(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addClientUserAgent(stack, options); err != nil {
|
||||
|
|
@ -127,6 +135,9 @@ func (c *Client) addOperationGetBucketOwnershipControlsMiddlewares(stack *middle
|
|||
if err = addPutBucketContextMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addTimeOffsetBuild(stack, c); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addOpGetBucketOwnershipControlsValidationMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
|
|
@ -136,7 +147,7 @@ func (c *Client) addOperationGetBucketOwnershipControlsMiddlewares(stack *middle
|
|||
if err = addMetadataRetrieverMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = awsmiddleware.AddRecursionDetection(stack); err != nil {
|
||||
if err = addRecursionDetection(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addGetBucketOwnershipControlsUpdateEndpoint(stack, options); err != nil {
|
||||
|
|
|
|||
|
|
@ -13,47 +13,61 @@ import (
|
|||
smithyhttp "github.com/aws/smithy-go/transport/http"
|
||||
)
|
||||
|
||||
// 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.
|
||||
// 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]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.
|
||||
// policies, see [Using Bucket Policies and User Policies]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.
|
||||
// policies and permissions, see [Amazon Web Services Identity and Access Management (IAM) for S3 Express One Zone]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)
|
||||
// Example bucket policies General purpose buckets example bucket policies - See [Bucket policy examples]
|
||||
// in the Amazon S3 User Guide.
|
||||
//
|
||||
// Directory bucket example bucket policies - See [Example bucket policies for S3 Express One Zone] 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]
|
||||
//
|
||||
// [Bucket policy examples]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/example-bucket-policies.html
|
||||
// [Example bucket policies for S3 Express One Zone]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-express-security-iam-example-bucket-policies.html
|
||||
// [Regional and Zonal endpoints]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-express-Regions-and-Zones.html
|
||||
// [Using Bucket Policies and User Policies]: https://docs.aws.amazon.com/AmazonS3/latest/dev/using-iam-policies.html
|
||||
// [GetObject]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetObject.html
|
||||
// [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
|
||||
func (c *Client) GetBucketPolicy(ctx context.Context, params *GetBucketPolicyInput, optFns ...func(*Options)) (*GetBucketPolicyOutput, error) {
|
||||
if params == nil {
|
||||
params = &GetBucketPolicyInput{}
|
||||
|
|
@ -71,33 +85,42 @@ func (c *Client) GetBucketPolicy(ctx context.Context, params *GetBucketPolicyInp
|
|||
|
||||
type GetBucketPolicyInput struct {
|
||||
|
||||
// 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 .
|
||||
// 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-az2--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
|
||||
// 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]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].
|
||||
//
|
||||
// Access points and Object Lambda access points are not supported by directory
|
||||
// buckets.
|
||||
//
|
||||
// [Directory bucket naming rules]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/directory-bucket-naming-rules.html
|
||||
// [List of Error Codes]: https://docs.aws.amazon.com/AmazonS3/latest/API/ErrorResponses.html#ErrorCodeList
|
||||
//
|
||||
// This member is required.
|
||||
Bucket *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). 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 .
|
||||
// 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
|
||||
|
||||
noSmithyDocumentSerde
|
||||
|
|
@ -141,25 +164,25 @@ func (c *Client) addOperationGetBucketPolicyMiddlewares(stack *middleware.Stack,
|
|||
if err = addSetLoggerMiddleware(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
|
||||
if err = addClientRequestID(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
|
||||
if err = addComputeContentLength(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addResolveEndpointMiddleware(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
|
||||
if err = addComputePayloadSHA256(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addRetryMiddlewares(stack, options); err != nil {
|
||||
if err = addRetry(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
|
||||
if err = addRawResponseToMetadata(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
|
||||
if err = addRecordResponseTiming(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addClientUserAgent(stack, options); err != nil {
|
||||
|
|
@ -177,6 +200,9 @@ func (c *Client) addOperationGetBucketPolicyMiddlewares(stack *middleware.Stack,
|
|||
if err = addPutBucketContextMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addTimeOffsetBuild(stack, c); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addOpGetBucketPolicyValidationMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
|
|
@ -186,7 +212,7 @@ func (c *Client) addOperationGetBucketPolicyMiddlewares(stack *middleware.Stack,
|
|||
if err = addMetadataRetrieverMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = awsmiddleware.AddRecursionDetection(stack); err != nil {
|
||||
if err = addRecursionDetection(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addGetBucketPolicyUpdateEndpoint(stack, options); err != nil {
|
||||
|
|
|
|||
54
vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetBucketPolicyStatus.go
generated
vendored
54
vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetBucketPolicyStatus.go
generated
vendored
|
|
@ -14,18 +14,31 @@ import (
|
|||
smithyhttp "github.com/aws/smithy-go/transport/http"
|
||||
)
|
||||
|
||||
// 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)
|
||||
// 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].
|
||||
//
|
||||
// For more information about when Amazon S3 considers a bucket public, see [The Meaning of "Public"].
|
||||
//
|
||||
// The following operations are related to GetBucketPolicyStatus :
|
||||
//
|
||||
// [Using Amazon S3 Block Public Access]
|
||||
//
|
||||
// [GetPublicAccessBlock]
|
||||
//
|
||||
// [PutPublicAccessBlock]
|
||||
//
|
||||
// [DeletePublicAccessBlock]
|
||||
//
|
||||
// [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
|
||||
// [Using Amazon S3 Block Public Access]: https://docs.aws.amazon.com/AmazonS3/latest/dev/access-control-block-public-access.html
|
||||
// [Specifying Permissions in a Policy]: https://docs.aws.amazon.com/AmazonS3/latest/dev/using-with-s3-actions.html
|
||||
// [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
|
||||
func (c *Client) GetBucketPolicyStatus(ctx context.Context, params *GetBucketPolicyStatusInput, optFns ...func(*Options)) (*GetBucketPolicyStatusOutput, error) {
|
||||
if params == nil {
|
||||
params = &GetBucketPolicyStatusInput{}
|
||||
|
|
@ -94,25 +107,25 @@ func (c *Client) addOperationGetBucketPolicyStatusMiddlewares(stack *middleware.
|
|||
if err = addSetLoggerMiddleware(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
|
||||
if err = addClientRequestID(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
|
||||
if err = addComputeContentLength(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addResolveEndpointMiddleware(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
|
||||
if err = addComputePayloadSHA256(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addRetryMiddlewares(stack, options); err != nil {
|
||||
if err = addRetry(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
|
||||
if err = addRawResponseToMetadata(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
|
||||
if err = addRecordResponseTiming(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addClientUserAgent(stack, options); err != nil {
|
||||
|
|
@ -130,6 +143,9 @@ func (c *Client) addOperationGetBucketPolicyStatusMiddlewares(stack *middleware.
|
|||
if err = addPutBucketContextMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addTimeOffsetBuild(stack, c); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addOpGetBucketPolicyStatusValidationMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
|
|
@ -139,7 +155,7 @@ func (c *Client) addOperationGetBucketPolicyStatusMiddlewares(stack *middleware.
|
|||
if err = addMetadataRetrieverMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = awsmiddleware.AddRecursionDetection(stack); err != nil {
|
||||
if err = addRecursionDetection(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addGetBucketPolicyStatusUpdateEndpoint(stack, options); err != nil {
|
||||
|
|
|
|||
|
|
@ -14,21 +14,37 @@ import (
|
|||
smithyhttp "github.com/aws/smithy-go/transport/http"
|
||||
)
|
||||
|
||||
// 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)
|
||||
// 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] 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].
|
||||
//
|
||||
// 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]
|
||||
//
|
||||
// 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)
|
||||
//
|
||||
// [PutBucketReplication]
|
||||
//
|
||||
// [DeleteBucketReplication]
|
||||
//
|
||||
// [PutBucketReplication]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketReplication.html
|
||||
// [Using Bucket Policies and User Policies]: https://docs.aws.amazon.com/AmazonS3/latest/dev/using-iam-policies.html
|
||||
// [Replication]: https://docs.aws.amazon.com/AmazonS3/latest/dev/replication.html
|
||||
// [List of replication-related error codes]: https://docs.aws.amazon.com/AmazonS3/latest/API/ErrorResponses.html#ReplicationErrorCodeList
|
||||
// [DeleteBucketReplication]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_DeleteBucketReplication.html
|
||||
func (c *Client) GetBucketReplication(ctx context.Context, params *GetBucketReplicationInput, optFns ...func(*Options)) (*GetBucketReplicationOutput, error) {
|
||||
if params == nil {
|
||||
params = &GetBucketReplicationInput{}
|
||||
|
|
@ -98,25 +114,25 @@ func (c *Client) addOperationGetBucketReplicationMiddlewares(stack *middleware.S
|
|||
if err = addSetLoggerMiddleware(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
|
||||
if err = addClientRequestID(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
|
||||
if err = addComputeContentLength(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addResolveEndpointMiddleware(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
|
||||
if err = addComputePayloadSHA256(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addRetryMiddlewares(stack, options); err != nil {
|
||||
if err = addRetry(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
|
||||
if err = addRawResponseToMetadata(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
|
||||
if err = addRecordResponseTiming(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addClientUserAgent(stack, options); err != nil {
|
||||
|
|
@ -134,6 +150,9 @@ func (c *Client) addOperationGetBucketReplicationMiddlewares(stack *middleware.S
|
|||
if err = addPutBucketContextMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addTimeOffsetBuild(stack, c); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addOpGetBucketReplicationValidationMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
|
|
@ -143,7 +162,7 @@ func (c *Client) addOperationGetBucketReplicationMiddlewares(stack *middleware.S
|
|||
if err = addMetadataRetrieverMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = awsmiddleware.AddRecursionDetection(stack); err != nil {
|
||||
if err = addRecursionDetection(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addGetBucketReplicationUpdateEndpoint(stack, options); err != nil {
|
||||
|
|
|
|||
33
vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetBucketRequestPayment.go
generated
vendored
33
vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetBucketRequestPayment.go
generated
vendored
|
|
@ -14,11 +14,17 @@ import (
|
|||
smithyhttp "github.com/aws/smithy-go/transport/http"
|
||||
)
|
||||
|
||||
// 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)
|
||||
// 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].
|
||||
//
|
||||
// The following operations are related to GetBucketRequestPayment :
|
||||
//
|
||||
// [ListObjects]
|
||||
//
|
||||
// [ListObjects]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListObjects.html
|
||||
// [Requester Pays Buckets]: https://docs.aws.amazon.com/AmazonS3/latest/dev/RequesterPaysBuckets.html
|
||||
func (c *Client) GetBucketRequestPayment(ctx context.Context, params *GetBucketRequestPaymentInput, optFns ...func(*Options)) (*GetBucketRequestPaymentOutput, error) {
|
||||
if params == nil {
|
||||
params = &GetBucketRequestPaymentInput{}
|
||||
|
|
@ -87,25 +93,25 @@ func (c *Client) addOperationGetBucketRequestPaymentMiddlewares(stack *middlewar
|
|||
if err = addSetLoggerMiddleware(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
|
||||
if err = addClientRequestID(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
|
||||
if err = addComputeContentLength(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addResolveEndpointMiddleware(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
|
||||
if err = addComputePayloadSHA256(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addRetryMiddlewares(stack, options); err != nil {
|
||||
if err = addRetry(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
|
||||
if err = addRawResponseToMetadata(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
|
||||
if err = addRecordResponseTiming(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addClientUserAgent(stack, options); err != nil {
|
||||
|
|
@ -123,6 +129,9 @@ func (c *Client) addOperationGetBucketRequestPaymentMiddlewares(stack *middlewar
|
|||
if err = addPutBucketContextMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addTimeOffsetBuild(stack, c); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addOpGetBucketRequestPaymentValidationMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
|
|
@ -132,7 +141,7 @@ func (c *Client) addOperationGetBucketRequestPaymentMiddlewares(stack *middlewar
|
|||
if err = addMetadataRetrieverMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = awsmiddleware.AddRecursionDetection(stack); err != nil {
|
||||
if err = addRecursionDetection(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addGetBucketRequestPaymentUpdateEndpoint(stack, options); err != nil {
|
||||
|
|
|
|||
|
|
@ -14,17 +14,28 @@ import (
|
|||
smithyhttp "github.com/aws/smithy-go/transport/http"
|
||||
)
|
||||
|
||||
// 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:
|
||||
// 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)
|
||||
//
|
||||
// [PutBucketTagging]
|
||||
//
|
||||
// [DeleteBucketTagging]
|
||||
//
|
||||
// [PutBucketTagging]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketTagging.html
|
||||
// [DeleteBucketTagging]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_DeleteBucketTagging.html
|
||||
func (c *Client) GetBucketTagging(ctx context.Context, params *GetBucketTaggingInput, optFns ...func(*Options)) (*GetBucketTaggingOutput, error) {
|
||||
if params == nil {
|
||||
params = &GetBucketTaggingInput{}
|
||||
|
|
@ -95,25 +106,25 @@ func (c *Client) addOperationGetBucketTaggingMiddlewares(stack *middleware.Stack
|
|||
if err = addSetLoggerMiddleware(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
|
||||
if err = addClientRequestID(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
|
||||
if err = addComputeContentLength(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addResolveEndpointMiddleware(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
|
||||
if err = addComputePayloadSHA256(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addRetryMiddlewares(stack, options); err != nil {
|
||||
if err = addRetry(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
|
||||
if err = addRawResponseToMetadata(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
|
||||
if err = addRecordResponseTiming(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addClientUserAgent(stack, options); err != nil {
|
||||
|
|
@ -131,6 +142,9 @@ func (c *Client) addOperationGetBucketTaggingMiddlewares(stack *middleware.Stack
|
|||
if err = addPutBucketContextMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addTimeOffsetBuild(stack, c); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addOpGetBucketTaggingValidationMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
|
|
@ -140,7 +154,7 @@ func (c *Client) addOperationGetBucketTaggingMiddlewares(stack *middleware.Stack
|
|||
if err = addMetadataRetrieverMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = awsmiddleware.AddRecursionDetection(stack); err != nil {
|
||||
if err = addRecursionDetection(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addGetBucketTaggingUpdateEndpoint(stack, options); err != nil {
|
||||
|
|
|
|||
|
|
@ -14,15 +14,27 @@ import (
|
|||
smithyhttp "github.com/aws/smithy-go/transport/http"
|
||||
)
|
||||
|
||||
// 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)
|
||||
// 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]
|
||||
//
|
||||
// [PutObject]
|
||||
//
|
||||
// [DeleteObject]
|
||||
//
|
||||
// [DeleteObject]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_DeleteObject.html
|
||||
// [PutObject]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutObject.html
|
||||
// [GetObject]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetObject.html
|
||||
func (c *Client) GetBucketVersioning(ctx context.Context, params *GetBucketVersioningInput, optFns ...func(*Options)) (*GetBucketVersioningOutput, error) {
|
||||
if params == nil {
|
||||
params = &GetBucketVersioningInput{}
|
||||
|
|
@ -96,25 +108,25 @@ func (c *Client) addOperationGetBucketVersioningMiddlewares(stack *middleware.St
|
|||
if err = addSetLoggerMiddleware(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
|
||||
if err = addClientRequestID(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
|
||||
if err = addComputeContentLength(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addResolveEndpointMiddleware(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
|
||||
if err = addComputePayloadSHA256(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addRetryMiddlewares(stack, options); err != nil {
|
||||
if err = addRetry(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
|
||||
if err = addRawResponseToMetadata(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
|
||||
if err = addRecordResponseTiming(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addClientUserAgent(stack, options); err != nil {
|
||||
|
|
@ -132,6 +144,9 @@ func (c *Client) addOperationGetBucketVersioningMiddlewares(stack *middleware.St
|
|||
if err = addPutBucketContextMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addTimeOffsetBuild(stack, c); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addOpGetBucketVersioningValidationMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
|
|
@ -141,7 +156,7 @@ func (c *Client) addOperationGetBucketVersioningMiddlewares(stack *middleware.St
|
|||
if err = addMetadataRetrieverMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = awsmiddleware.AddRecursionDetection(stack); err != nil {
|
||||
if err = addRecursionDetection(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addGetBucketVersioningUpdateEndpoint(stack, options); err != nil {
|
||||
|
|
|
|||
|
|
@ -14,17 +14,26 @@ import (
|
|||
smithyhttp "github.com/aws/smithy-go/transport/http"
|
||||
)
|
||||
|
||||
// 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
|
||||
// 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].
|
||||
//
|
||||
// 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)
|
||||
// bucket policy granting them the S3:GetBucketWebsite permission.
|
||||
//
|
||||
// The following operations are related to GetBucketWebsite :
|
||||
//
|
||||
// [DeleteBucketWebsite]
|
||||
//
|
||||
// [PutBucketWebsite]
|
||||
//
|
||||
// [PutBucketWebsite]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketWebsite.html
|
||||
// [Hosting Websites on Amazon S3]: https://docs.aws.amazon.com/AmazonS3/latest/dev/WebsiteHosting.html
|
||||
// [DeleteBucketWebsite]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_DeleteBucketWebsite.html
|
||||
func (c *Client) GetBucketWebsite(ctx context.Context, params *GetBucketWebsiteInput, optFns ...func(*Options)) (*GetBucketWebsiteOutput, error) {
|
||||
if params == nil {
|
||||
params = &GetBucketWebsiteInput{}
|
||||
|
|
@ -103,25 +112,25 @@ func (c *Client) addOperationGetBucketWebsiteMiddlewares(stack *middleware.Stack
|
|||
if err = addSetLoggerMiddleware(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
|
||||
if err = addClientRequestID(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
|
||||
if err = addComputeContentLength(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addResolveEndpointMiddleware(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
|
||||
if err = addComputePayloadSHA256(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addRetryMiddlewares(stack, options); err != nil {
|
||||
if err = addRetry(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
|
||||
if err = addRawResponseToMetadata(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
|
||||
if err = addRecordResponseTiming(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addClientUserAgent(stack, options); err != nil {
|
||||
|
|
@ -139,6 +148,9 @@ func (c *Client) addOperationGetBucketWebsiteMiddlewares(stack *middleware.Stack
|
|||
if err = addPutBucketContextMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addTimeOffsetBuild(stack, c); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addOpGetBucketWebsiteValidationMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
|
|
@ -148,7 +160,7 @@ func (c *Client) addOperationGetBucketWebsiteMiddlewares(stack *middleware.Stack
|
|||
if err = addMetadataRetrieverMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = awsmiddleware.AddRecursionDetection(stack); err != nil {
|
||||
if err = addRecursionDetection(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addGetBucketWebsiteUpdateEndpoint(stack, options); err != nil {
|
||||
|
|
|
|||
|
|
@ -16,100 +16,141 @@ import (
|
|||
"time"
|
||||
)
|
||||
|
||||
// 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
|
||||
// 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]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
|
||||
// requests are not supported. For more information, see [Regional and Zonal endpoints]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)
|
||||
// .
|
||||
// information, see [Specifying permissions in a policy]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]CreateSession 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]CreateSession .
|
||||
//
|
||||
// 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.
|
||||
// copy using [RestoreObject]. Otherwise, this operation returns an InvalidObjectState error. For
|
||||
// information about restoring archived objects, see [Restoring Archived Objects]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 .
|
||||
// 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)
|
||||
//
|
||||
// [ListBuckets]
|
||||
//
|
||||
// [GetObjectAcl]
|
||||
//
|
||||
// [RestoreObject]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_RestoreObject.html
|
||||
// [Regional and Zonal endpoints]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-express-Regions-and-Zones.html
|
||||
// [ListBuckets]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListBuckets.html
|
||||
// [HTTP Host Header Bucket Specification]: https://docs.aws.amazon.com/AmazonS3/latest/dev/VirtualHosting.html#VirtualHostingSpecifyBucket
|
||||
// [Restoring Archived Objects]: https://docs.aws.amazon.com/AmazonS3/latest/dev/restoring-objects.html
|
||||
// [GetObjectAcl]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetObjectAcl.html
|
||||
// [Specifying permissions in a policy]: https://docs.aws.amazon.com/AmazonS3/latest/dev/using-with-s3-actions.html
|
||||
//
|
||||
// [CreateSession]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_CreateSession.html
|
||||
func (c *Client) GetObject(ctx context.Context, params *GetObjectInput, optFns ...func(*Options)) (*GetObjectOutput, error) {
|
||||
if params == nil {
|
||||
params = &GetObjectInput{}
|
||||
|
|
@ -127,35 +168,44 @@ func (c *Client) GetObject(ctx context.Context, params *GetObjectInput, optFns .
|
|||
|
||||
type GetObjectInput struct {
|
||||
|
||||
// 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-az2--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.
|
||||
// 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]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]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
|
||||
// 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.
|
||||
// information about S3 on Outposts ARNs, see [What is S3 on Outposts?]in the Amazon S3 User Guide.
|
||||
//
|
||||
// [Directory bucket naming rules]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/directory-bucket-naming-rules.html
|
||||
// [What is S3 on Outposts?]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/S3onOutposts.html
|
||||
// [Using access points]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/using-access-points.html
|
||||
//
|
||||
// This member is required.
|
||||
Bucket *string
|
||||
|
|
@ -174,37 +224,55 @@ type GetObjectInput struct {
|
|||
ExpectedBucketOwner *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)
|
||||
// .
|
||||
// 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].
|
||||
//
|
||||
// [RFC 7232]: https://tools.ietf.org/html/rfc7232
|
||||
IfMatch *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) .
|
||||
// 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].
|
||||
//
|
||||
// [RFC 7232]: https://tools.ietf.org/html/rfc7232
|
||||
IfModifiedSince *time.Time
|
||||
|
||||
// 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)
|
||||
// .
|
||||
// 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].
|
||||
//
|
||||
// [RFC 7232]: https://tools.ietf.org/html/rfc7232
|
||||
IfNoneMatch *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) .
|
||||
// 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].
|
||||
//
|
||||
// [RFC 7232]: https://tools.ietf.org/html/rfc7232
|
||||
IfUnmodifiedSince *time.Time
|
||||
|
||||
// Part number of the object being read. This is a positive integer between 1 and
|
||||
|
|
@ -213,18 +281,23 @@ type GetObjectInput struct {
|
|||
PartNumber *int32
|
||||
|
||||
// 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.
|
||||
// HTTP Range header, see [https://www.rfc-editor.org/rfc/rfc9110.html#name-range].
|
||||
//
|
||||
// Amazon S3 doesn't support retrieving multiple ranges of data per GET request.
|
||||
//
|
||||
// [https://www.rfc-editor.org/rfc/rfc9110.html#name-range]: https://www.rfc-editor.org/rfc/rfc9110.html#name-range
|
||||
Range *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.
|
||||
// downloading objects from Requester Pays buckets, see [Downloading Objects in Requester Pays Buckets]in the Amazon S3 User
|
||||
// Guide.
|
||||
//
|
||||
// This functionality is not supported for directory buckets.
|
||||
//
|
||||
// [Downloading Objects in Requester Pays Buckets]: https://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html
|
||||
RequestPayer types.RequestPayer
|
||||
|
||||
// Sets the Cache-Control header of the response.
|
||||
|
|
@ -245,66 +318,90 @@ type GetObjectInput struct {
|
|||
// Sets the Expires header of the response.
|
||||
ResponseExpires *time.Time
|
||||
|
||||
// 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:
|
||||
// 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.
|
||||
//
|
||||
// For more information about SSE-C, see [Server-Side Encryption (Using Customer-Provided Encryption Keys)] in the Amazon S3 User Guide.
|
||||
//
|
||||
// This functionality is not supported for directory buckets.
|
||||
//
|
||||
// [Server-Side Encryption (Using Customer-Provided Encryption Keys)]: https://docs.aws.amazon.com/AmazonS3/latest/dev/ServerSideEncryptionCustomerKeys.html
|
||||
SSECustomerAlgorithm *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 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.
|
||||
//
|
||||
// For more information about SSE-C, see [Server-Side Encryption (Using Customer-Provided Encryption Keys)] in the Amazon S3 User Guide.
|
||||
//
|
||||
// This functionality is not supported for directory buckets.
|
||||
//
|
||||
// [Server-Side Encryption (Using Customer-Provided Encryption Keys)]: https://docs.aws.amazon.com/AmazonS3/latest/dev/ServerSideEncryptionCustomerKeys.html
|
||||
SSECustomerKey *string
|
||||
|
||||
// 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:
|
||||
// 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.
|
||||
//
|
||||
// For more information about SSE-C, see [Server-Side Encryption (Using Customer-Provided Encryption Keys)] in the Amazon S3 User Guide.
|
||||
//
|
||||
// This functionality is not supported for directory buckets.
|
||||
//
|
||||
// [Server-Side Encryption (Using Customer-Provided Encryption Keys)]: https://docs.aws.amazon.com/AmazonS3/latest/dev/ServerSideEncryptionCustomerKeys.html
|
||||
SSECustomerKeyMD5 *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.
|
||||
// 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)
|
||||
// .
|
||||
//
|
||||
// For more information about versioning, see [PutBucketVersioning].
|
||||
//
|
||||
// [PutBucketVersioning]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketVersioning.html
|
||||
VersionId *string
|
||||
|
||||
noSmithyDocumentSerde
|
||||
|
|
@ -325,35 +422,40 @@ type GetObjectOutput struct {
|
|||
Body io.ReadCloser
|
||||
|
||||
// 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.
|
||||
// with Key Management Service (KMS) keys (SSE-KMS).
|
||||
//
|
||||
// This functionality is not supported for directory buckets.
|
||||
BucketKeyEnabled *bool
|
||||
|
||||
// Specifies caching behavior along the request/reply chain.
|
||||
CacheControl *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.
|
||||
// present if it was uploaded with the object. For more information, see [Checking object integrity]in the
|
||||
// Amazon S3 User Guide.
|
||||
//
|
||||
// [Checking object integrity]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html
|
||||
ChecksumCRC32 *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.
|
||||
// present if it was uploaded with the object. For more information, see [Checking object integrity]in the
|
||||
// Amazon S3 User Guide.
|
||||
//
|
||||
// [Checking object integrity]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html
|
||||
ChecksumCRC32C *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.
|
||||
// present if it was uploaded with the object. For more information, see [Checking object integrity]in the
|
||||
// Amazon S3 User Guide.
|
||||
//
|
||||
// [Checking object integrity]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html
|
||||
ChecksumSHA1 *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.
|
||||
// present if it was uploaded with the object. For more information, see [Checking object integrity]in the
|
||||
// Amazon S3 User Guide.
|
||||
//
|
||||
// [Checking object integrity]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html
|
||||
ChecksumSHA256 *string
|
||||
|
||||
// Specifies presentational information for the object.
|
||||
|
|
@ -378,9 +480,11 @@ type GetObjectOutput struct {
|
|||
|
||||
// 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.
|
||||
|
|
@ -390,20 +494,33 @@ type GetObjectOutput struct {
|
|||
// specific version of a resource found at a URL.
|
||||
ETag *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
|
||||
// If the object expiration is configured (see [PutBucketLifecycleConfiguration]PutBucketLifecycleConfiguration ),
|
||||
// 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.
|
||||
// rule-id is URL-encoded.
|
||||
//
|
||||
// This functionality is not supported for directory buckets.
|
||||
//
|
||||
// [PutBucketLifecycleConfiguration]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketLifecycleConfiguration.html
|
||||
Expiration *string
|
||||
|
||||
// The date and time at which the object is no longer cacheable.
|
||||
//
|
||||
// Deprecated: This field is handled inconsistently across AWS SDKs. Prefer using
|
||||
// the ExpiresString field which contains the unparsed value from the service
|
||||
// response.
|
||||
Expires *time.Time
|
||||
|
||||
// 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.
|
||||
// The unparsed value of the Expires field from the service response. Prefer use
|
||||
// of this value over the normal Expires response field where possible.
|
||||
ExpiresString *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
|
||||
|
||||
// A map of metadata to store with the object in S3.
|
||||
|
|
@ -415,20 +532,25 @@ type GetObjectOutput struct {
|
|||
// 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.
|
||||
// headers.
|
||||
//
|
||||
// This functionality is not supported for directory buckets.
|
||||
MissingMeta *int32
|
||||
|
||||
// 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.
|
||||
// returned if you have permission to view an object's legal hold status.
|
||||
//
|
||||
// This functionality is not supported for directory buckets.
|
||||
ObjectLockLegalHoldStatus types.ObjectLockLegalHoldStatus
|
||||
|
||||
// The Object Lock mode that's currently in place for this object. This
|
||||
// functionality is not supported for directory buckets.
|
||||
// The Object Lock mode that's currently in place for this object.
|
||||
//
|
||||
// This functionality is not supported for directory buckets.
|
||||
ObjectLockMode types.ObjectLockMode
|
||||
|
||||
// The date and time when this object's Object Lock will expire. This
|
||||
// functionality is not supported for directory buckets.
|
||||
// The date and time when this object's Object Lock will expire.
|
||||
//
|
||||
// This functionality is not supported for directory buckets.
|
||||
ObjectLockRetainUntilDate *time.Time
|
||||
|
||||
// The count of parts this object has. This value is only returned if you specify
|
||||
|
|
@ -436,63 +558,78 @@ type GetObjectOutput struct {
|
|||
PartsCount *int32
|
||||
|
||||
// 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.
|
||||
// source or destination in a replication rule.
|
||||
//
|
||||
// This functionality is not supported for directory buckets.
|
||||
ReplicationStatus types.ReplicationStatus
|
||||
|
||||
// If present, indicates that the requester was successfully charged for the
|
||||
// request. This functionality is not supported for directory buckets.
|
||||
// request.
|
||||
//
|
||||
// This functionality is not supported for directory buckets.
|
||||
RequestCharged types.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.
|
||||
// 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
|
||||
|
||||
// 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.
|
||||
// algorithm that's used.
|
||||
//
|
||||
// This functionality is not supported for directory buckets.
|
||||
SSECustomerAlgorithm *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.
|
||||
// message integrity verification of the customer-provided encryption key.
|
||||
//
|
||||
// This functionality is not supported for directory buckets.
|
||||
SSECustomerKeyMD5 *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.
|
||||
// encryption customer managed key that was used for the object.
|
||||
//
|
||||
// This functionality is not supported for directory buckets.
|
||||
SSEKMSKeyId *string
|
||||
|
||||
// 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.
|
||||
// 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 types.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.
|
||||
// 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 types.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.
|
||||
// permission to read object tags.
|
||||
//
|
||||
// You can use [GetObjectTagging] to retrieve the tag set associated with an object.
|
||||
//
|
||||
// This functionality is not supported for directory buckets.
|
||||
//
|
||||
// [GetObjectTagging]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetObjectTagging.html
|
||||
TagCount *int32
|
||||
|
||||
// Version ID of the object. This functionality is not supported for directory
|
||||
// buckets.
|
||||
// Version ID of the object.
|
||||
//
|
||||
// This functionality is not supported for directory buckets.
|
||||
VersionId *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.
|
||||
// value of this header in the object metadata.
|
||||
//
|
||||
// This functionality is not supported for directory buckets.
|
||||
WebsiteRedirectLocation *string
|
||||
|
||||
// Metadata pertaining to the operation's result.
|
||||
|
|
@ -523,25 +660,25 @@ func (c *Client) addOperationGetObjectMiddlewares(stack *middleware.Stack, optio
|
|||
if err = addSetLoggerMiddleware(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
|
||||
if err = addClientRequestID(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
|
||||
if err = addComputeContentLength(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addResolveEndpointMiddleware(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
|
||||
if err = addComputePayloadSHA256(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addRetryMiddlewares(stack, options); err != nil {
|
||||
if err = addRetry(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
|
||||
if err = addRawResponseToMetadata(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
|
||||
if err = addRecordResponseTiming(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addClientUserAgent(stack, options); err != nil {
|
||||
|
|
@ -556,6 +693,9 @@ func (c *Client) addOperationGetObjectMiddlewares(stack *middleware.Stack, optio
|
|||
if err = addPutBucketContextMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addTimeOffsetBuild(stack, c); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addOpGetObjectValidationMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
|
|
@ -565,7 +705,7 @@ func (c *Client) addOperationGetObjectMiddlewares(stack *middleware.Stack, optio
|
|||
if err = addMetadataRetrieverMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = awsmiddleware.AddRecursionDetection(stack); err != nil {
|
||||
if err = addRecursionDetection(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addGetObjectOutputChecksumMiddlewares(stack, options); err != nil {
|
||||
|
|
|
|||
|
|
@ -13,24 +13,39 @@ import (
|
|||
smithyhttp "github.com/aws/smithy-go/transport/http"
|
||||
)
|
||||
|
||||
// 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
|
||||
// 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]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)
|
||||
// bucket. For more information, see [Controlling object ownership and disabling ACLs]in the Amazon S3 User Guide.
|
||||
//
|
||||
// The following operations are related to GetObjectAcl :
|
||||
//
|
||||
// [GetObject]
|
||||
//
|
||||
// [GetObjectAttributes]
|
||||
//
|
||||
// [DeleteObject]
|
||||
//
|
||||
// [PutObject]
|
||||
//
|
||||
// [DeleteObject]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_DeleteObject.html
|
||||
// [Mapping of ACL permissions and access policy permissions]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/acl-overview.html#acl-access-policy-permission-mapping
|
||||
// [GetObjectAttributes]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetObjectAttributes.html
|
||||
// [PutObject]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutObject.html
|
||||
// [GetObject]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetObject.html
|
||||
// [Controlling object ownership and disabling ACLs]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/about-object-ownership.html
|
||||
func (c *Client) GetObjectAcl(ctx context.Context, params *GetObjectAclInput, optFns ...func(*Options)) (*GetObjectAclOutput, error) {
|
||||
if params == nil {
|
||||
params = &GetObjectAclInput{}
|
||||
|
|
@ -49,6 +64,7 @@ func (c *Client) GetObjectAcl(ctx context.Context, params *GetObjectAclInput, op
|
|||
type GetObjectAclInput struct {
|
||||
|
||||
// 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
|
||||
|
|
@ -56,8 +72,9 @@ type GetObjectAclInput struct {
|
|||
// 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 point ARNs, see [Using access points]in the Amazon S3 User Guide.
|
||||
//
|
||||
// [Using access points]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/using-access-points.html
|
||||
//
|
||||
// This member is required.
|
||||
Bucket *string
|
||||
|
|
@ -76,14 +93,17 @@ type GetObjectAclInput struct {
|
|||
// 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.
|
||||
// downloading objects from Requester Pays buckets, see [Downloading Objects in Requester Pays Buckets]in the Amazon S3 User
|
||||
// Guide.
|
||||
//
|
||||
// This functionality is not supported for directory buckets.
|
||||
//
|
||||
// [Downloading Objects in Requester Pays Buckets]: https://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html
|
||||
RequestPayer types.RequestPayer
|
||||
|
||||
// Version ID used to reference a specific version of the object. This
|
||||
// functionality is not supported for directory buckets.
|
||||
// Version ID used to reference a specific version of the object.
|
||||
//
|
||||
// This functionality is not supported for directory buckets.
|
||||
VersionId *string
|
||||
|
||||
noSmithyDocumentSerde
|
||||
|
|
@ -100,11 +120,13 @@ type GetObjectAclOutput struct {
|
|||
// A list of grants.
|
||||
Grants []types.Grant
|
||||
|
||||
// Container for the bucket owner's display name and ID.
|
||||
// Container for the bucket owner's display name and ID.
|
||||
Owner *types.Owner
|
||||
|
||||
// If present, indicates that the requester was successfully charged for the
|
||||
// request. This functionality is not supported for directory buckets.
|
||||
// request.
|
||||
//
|
||||
// This functionality is not supported for directory buckets.
|
||||
RequestCharged types.RequestCharged
|
||||
|
||||
// Metadata pertaining to the operation's result.
|
||||
|
|
@ -135,25 +157,25 @@ func (c *Client) addOperationGetObjectAclMiddlewares(stack *middleware.Stack, op
|
|||
if err = addSetLoggerMiddleware(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
|
||||
if err = addClientRequestID(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
|
||||
if err = addComputeContentLength(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addResolveEndpointMiddleware(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
|
||||
if err = addComputePayloadSHA256(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addRetryMiddlewares(stack, options); err != nil {
|
||||
if err = addRetry(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
|
||||
if err = addRawResponseToMetadata(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
|
||||
if err = addRecordResponseTiming(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addClientUserAgent(stack, options); err != nil {
|
||||
|
|
@ -171,6 +193,9 @@ func (c *Client) addOperationGetObjectAclMiddlewares(stack *middleware.Stack, op
|
|||
if err = addPutBucketContextMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addTimeOffsetBuild(stack, c); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addOpGetObjectAclValidationMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
|
|
@ -180,7 +205,7 @@ func (c *Client) addOperationGetObjectAclMiddlewares(stack *middleware.Stack, op
|
|||
if err = addMetadataRetrieverMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = awsmiddleware.AddRecursionDetection(stack); err != nil {
|
||||
if err = addRecursionDetection(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addGetObjectAclUpdateEndpoint(stack, options); err != nil {
|
||||
|
|
|
|||
|
|
@ -16,32 +16,39 @@ import (
|
|||
|
||||
// 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
|
||||
// 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
|
||||
// requests are not supported. For more information, see [Regional and Zonal endpoints]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.
|
||||
// permissions. For more information, see [Specifying Permissions in a Policy]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
|
||||
// directory bucket, we recommend that you use the [CreateSession]CreateSession 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
|
||||
|
|
@ -49,8 +56,7 @@ import (
|
|||
// 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)
|
||||
// .
|
||||
// expires. For more information about authorization, see [CreateSession]CreateSession .
|
||||
//
|
||||
// Encryption Encryption request headers, like x-amz-server-side-encryption ,
|
||||
// should not be sent for HEAD requests if your object uses server-side encryption
|
||||
|
|
@ -61,49 +67,86 @@ import (
|
|||
// 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:
|
||||
// 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:
|
||||
// For more information about SSE-C, see [Server-Side Encryption (Using Customer-Provided Encryption Keys)] 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-Unmodified-Since condition evaluates to false .
|
||||
//
|
||||
// For more information about conditional requests, see [RFC 7232].
|
||||
//
|
||||
// - 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)
|
||||
// - If-None-Match condition evaluates to false .
|
||||
//
|
||||
// - If-Modified-Since condition evaluates to true .
|
||||
//
|
||||
// For more information about conditional requests, see [RFC 7232].
|
||||
//
|
||||
// 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]
|
||||
//
|
||||
// [GetObjectAcl]
|
||||
//
|
||||
// [GetObjectLegalHold]
|
||||
//
|
||||
// [GetObjectLockConfiguration]
|
||||
//
|
||||
// [GetObjectRetention]
|
||||
//
|
||||
// [GetObjectTagging]
|
||||
//
|
||||
// [HeadObject]
|
||||
//
|
||||
// [ListParts]
|
||||
//
|
||||
// [GetObjectLegalHold]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetObjectLegalHold.html
|
||||
// [ListParts]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListParts.html
|
||||
// [Server-Side Encryption (Using Customer-Provided Encryption Keys)]: https://docs.aws.amazon.com/AmazonS3/latest/dev/ServerSideEncryptionCustomerKeys.html
|
||||
// [Regional and Zonal endpoints]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-express-Regions-and-Zones.html
|
||||
// [CreateSession]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_CreateSession.html
|
||||
// [GetObjectTagging]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetObjectTagging.html
|
||||
// [Specifying Permissions in a Policy]: https://docs.aws.amazon.com/AmazonS3/latest/dev/using-with-s3-actions.html
|
||||
// [RFC 7232]: https://tools.ietf.org/html/rfc7232
|
||||
// [HeadObject]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_HeadObject.html
|
||||
// [GetObjectLockConfiguration]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetObjectLockConfiguration.html
|
||||
// [GetObjectAcl]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetObjectAcl.html
|
||||
// [GetObjectRetention]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetObjectRetention.html
|
||||
// [GetObject]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetObject.html
|
||||
func (c *Client) GetObjectAttributes(ctx context.Context, params *GetObjectAttributesInput, optFns ...func(*Options)) (*GetObjectAttributesOutput, error) {
|
||||
if params == nil {
|
||||
params = &GetObjectAttributesInput{}
|
||||
|
|
@ -121,31 +164,39 @@ func (c *Client) GetObjectAttributes(ctx context.Context, params *GetObjectAttri
|
|||
|
||||
type GetObjectAttributesInput struct {
|
||||
|
||||
// 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-az2--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
|
||||
// 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]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]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.
|
||||
// information about S3 on Outposts ARNs, see [What is S3 on Outposts?]in the Amazon S3 User Guide.
|
||||
//
|
||||
// [Directory bucket naming rules]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/directory-bucket-naming-rules.html
|
||||
// [What is S3 on Outposts?]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/S3onOutposts.html
|
||||
// [Using access points]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/using-access-points.html
|
||||
//
|
||||
// This member is required.
|
||||
Bucket *string
|
||||
|
|
@ -177,32 +228,38 @@ type GetObjectAttributesInput struct {
|
|||
// 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.
|
||||
// downloading objects from Requester Pays buckets, see [Downloading Objects in Requester Pays Buckets]in the Amazon S3 User
|
||||
// Guide.
|
||||
//
|
||||
// This functionality is not supported for directory buckets.
|
||||
//
|
||||
// [Downloading Objects in Requester Pays Buckets]: https://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html
|
||||
RequestPayer types.RequestPayer
|
||||
|
||||
// Specifies the algorithm to use when encrypting the object (for example,
|
||||
// AES256). This functionality is not supported for directory buckets.
|
||||
// Specifies the algorithm to use when encrypting the object (for example, AES256).
|
||||
//
|
||||
// This functionality is not supported for directory buckets.
|
||||
SSECustomerAlgorithm *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.
|
||||
// x-amz-server-side-encryption-customer-algorithm header.
|
||||
//
|
||||
// This functionality is not supported for directory buckets.
|
||||
SSECustomerKey *string
|
||||
|
||||
// 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.
|
||||
// encryption key was transmitted without error.
|
||||
//
|
||||
// This functionality is not supported for directory buckets.
|
||||
SSECustomerKeyMD5 *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
|
||||
// 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.
|
||||
|
|
@ -223,6 +280,7 @@ type GetObjectAttributesOutput struct {
|
|||
|
||||
// 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
|
||||
|
||||
|
|
@ -240,18 +298,25 @@ type GetObjectAttributesOutput struct {
|
|||
ObjectSize *int64
|
||||
|
||||
// If present, indicates that the requester was successfully charged for the
|
||||
// request. This functionality is not supported for directory buckets.
|
||||
// request.
|
||||
//
|
||||
// This functionality is not supported for directory buckets.
|
||||
RequestCharged types.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
|
||||
// header for all objects except for S3 Standard storage class objects.
|
||||
//
|
||||
// For more information, see [Storage Classes].
|
||||
//
|
||||
// Directory buckets - Only the S3 Express One Zone storage class is supported by
|
||||
// directory buckets to store objects.
|
||||
//
|
||||
// [Storage Classes]: https://docs.aws.amazon.com/AmazonS3/latest/dev/storage-class-intro.html
|
||||
StorageClass types.StorageClass
|
||||
|
||||
// The version ID of the object. This functionality is not supported for directory
|
||||
// buckets.
|
||||
// The version ID of the object.
|
||||
//
|
||||
// This functionality is not supported for directory buckets.
|
||||
VersionId *string
|
||||
|
||||
// Metadata pertaining to the operation's result.
|
||||
|
|
@ -282,25 +347,25 @@ func (c *Client) addOperationGetObjectAttributesMiddlewares(stack *middleware.St
|
|||
if err = addSetLoggerMiddleware(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
|
||||
if err = addClientRequestID(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
|
||||
if err = addComputeContentLength(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addResolveEndpointMiddleware(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
|
||||
if err = addComputePayloadSHA256(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addRetryMiddlewares(stack, options); err != nil {
|
||||
if err = addRetry(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
|
||||
if err = addRawResponseToMetadata(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
|
||||
if err = addRecordResponseTiming(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addClientUserAgent(stack, options); err != nil {
|
||||
|
|
@ -318,6 +383,9 @@ func (c *Client) addOperationGetObjectAttributesMiddlewares(stack *middleware.St
|
|||
if err = addPutBucketContextMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addTimeOffsetBuild(stack, c); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addOpGetObjectAttributesValidationMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
|
|
@ -327,7 +395,7 @@ func (c *Client) addOperationGetObjectAttributesMiddlewares(stack *middleware.St
|
|||
if err = addMetadataRetrieverMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = awsmiddleware.AddRecursionDetection(stack); err != nil {
|
||||
if err = addRecursionDetection(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addGetObjectAttributesUpdateEndpoint(stack, options); err != nil {
|
||||
|
|
|
|||
|
|
@ -13,11 +13,18 @@ import (
|
|||
smithyhttp "github.com/aws/smithy-go/transport/http"
|
||||
)
|
||||
|
||||
// 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)
|
||||
// This operation is not supported by directory buckets.
|
||||
//
|
||||
// Gets an object's current legal hold status. For more information, see [Locking Objects].
|
||||
//
|
||||
// This functionality is not supported for Amazon S3 on Outposts.
|
||||
//
|
||||
// The following action is related to GetObjectLegalHold :
|
||||
//
|
||||
// [GetObjectAttributes]
|
||||
//
|
||||
// [GetObjectAttributes]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetObjectAttributes.html
|
||||
// [Locking Objects]: https://docs.aws.amazon.com/AmazonS3/latest/dev/object-lock.html
|
||||
func (c *Client) GetObjectLegalHold(ctx context.Context, params *GetObjectLegalHoldInput, optFns ...func(*Options)) (*GetObjectLegalHoldOutput, error) {
|
||||
if params == nil {
|
||||
params = &GetObjectLegalHoldInput{}
|
||||
|
|
@ -36,15 +43,18 @@ func (c *Client) GetObjectLegalHold(ctx context.Context, params *GetObjectLegalH
|
|||
type GetObjectLegalHoldInput struct {
|
||||
|
||||
// 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
|
||||
// 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.
|
||||
// access point ARNs, see [Using access points]in the Amazon S3 User Guide.
|
||||
//
|
||||
// [Using access points]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/using-access-points.html
|
||||
//
|
||||
// This member is required.
|
||||
Bucket *string
|
||||
|
|
@ -63,10 +73,12 @@ type GetObjectLegalHoldInput struct {
|
|||
// 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.
|
||||
// downloading objects from Requester Pays buckets, see [Downloading Objects in Requester Pays Buckets]in the Amazon S3 User
|
||||
// Guide.
|
||||
//
|
||||
// This functionality is not supported for directory buckets.
|
||||
//
|
||||
// [Downloading Objects in Requester Pays Buckets]: https://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html
|
||||
RequestPayer types.RequestPayer
|
||||
|
||||
// The version ID of the object whose legal hold status you want to retrieve.
|
||||
|
|
@ -113,25 +125,25 @@ func (c *Client) addOperationGetObjectLegalHoldMiddlewares(stack *middleware.Sta
|
|||
if err = addSetLoggerMiddleware(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
|
||||
if err = addClientRequestID(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
|
||||
if err = addComputeContentLength(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addResolveEndpointMiddleware(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
|
||||
if err = addComputePayloadSHA256(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addRetryMiddlewares(stack, options); err != nil {
|
||||
if err = addRetry(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
|
||||
if err = addRawResponseToMetadata(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
|
||||
if err = addRecordResponseTiming(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addClientUserAgent(stack, options); err != nil {
|
||||
|
|
@ -149,6 +161,9 @@ func (c *Client) addOperationGetObjectLegalHoldMiddlewares(stack *middleware.Sta
|
|||
if err = addPutBucketContextMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addTimeOffsetBuild(stack, c); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addOpGetObjectLegalHoldValidationMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
|
|
@ -158,7 +173,7 @@ func (c *Client) addOperationGetObjectLegalHoldMiddlewares(stack *middleware.Sta
|
|||
if err = addMetadataRetrieverMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = awsmiddleware.AddRecursionDetection(stack); err != nil {
|
||||
if err = addRecursionDetection(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addGetObjectLegalHoldUpdateEndpoint(stack, options); err != nil {
|
||||
|
|
|
|||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue