mirror of
https://github.com/GoogleContainerTools/kaniko
synced 2026-10-19 21:11:28 +02:00
fix: resolve aws-sdk-go-v2 lib compat issues causing ECR failures (#2885)
This commit is contained in:
@@ -10,10 +10,10 @@ require (
|
||||
// To update run: go get github.com/GoogleCloudPlatform/docker-credential-gcr@<commit-sha>
|
||||
// The version string is a side-effect of Go module version numbering rules. Functionality is otherwise unchanged.
|
||||
github.com/GoogleCloudPlatform/docker-credential-gcr v1.5.1-0.20230328182921-62afb2723512
|
||||
github.com/aws/aws-sdk-go-v2 v1.23.2
|
||||
github.com/aws/aws-sdk-go-v2/config v1.25.8
|
||||
github.com/aws/aws-sdk-go-v2/feature/s3/manager v1.14.3
|
||||
github.com/aws/aws-sdk-go-v2/service/s3 v1.45.0
|
||||
github.com/aws/aws-sdk-go-v2 v1.23.4
|
||||
github.com/aws/aws-sdk-go-v2/config v1.25.10
|
||||
github.com/aws/aws-sdk-go-v2/feature/s3/manager v1.15.3
|
||||
github.com/aws/aws-sdk-go-v2/service/s3 v1.47.1
|
||||
github.com/awslabs/amazon-ecr-credential-helper/ecr-login v0.0.0-20230522190001-adf1bafd791a
|
||||
github.com/chrismellard/docker-credential-acr-env v0.0.0-20230304212654-82a0ddb27589
|
||||
github.com/containerd/cgroups v1.1.0 // indirect
|
||||
@@ -66,21 +66,21 @@ require (
|
||||
github.com/ProtonMail/go-crypto v0.0.0-20230828082145-3c4c8a2d2371 // indirect
|
||||
github.com/acomagu/bufpipe v1.0.4 // indirect
|
||||
github.com/agext/levenshtein v1.2.3 // indirect
|
||||
github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.5.1 // indirect
|
||||
github.com/aws/aws-sdk-go-v2/credentials v1.16.6 // indirect
|
||||
github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.14.6 // indirect
|
||||
github.com/aws/aws-sdk-go-v2/internal/configsources v1.2.5 // indirect
|
||||
github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.5.5 // indirect
|
||||
github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.5.3 // indirect
|
||||
github.com/aws/aws-sdk-go-v2/credentials v1.16.8 // indirect
|
||||
github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.14.8 // indirect
|
||||
github.com/aws/aws-sdk-go-v2/internal/configsources v1.2.7 // indirect
|
||||
github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.5.7 // indirect
|
||||
github.com/aws/aws-sdk-go-v2/internal/ini v1.7.1 // indirect
|
||||
github.com/aws/aws-sdk-go-v2/internal/v4a v1.2.4 // indirect
|
||||
github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.10.1 // indirect
|
||||
github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.2.4 // indirect
|
||||
github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.10.5 // indirect
|
||||
github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.16.4 // indirect
|
||||
github.com/aws/aws-sdk-go-v2/service/sso v1.17.5 // indirect
|
||||
github.com/aws/aws-sdk-go-v2/service/ssooidc v1.20.3 // indirect
|
||||
github.com/aws/aws-sdk-go-v2/service/sts v1.25.6 // indirect
|
||||
github.com/aws/smithy-go v1.17.0 // indirect
|
||||
github.com/aws/aws-sdk-go-v2/internal/v4a v1.2.7 // indirect
|
||||
github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.10.3 // indirect
|
||||
github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.2.7 // indirect
|
||||
github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.10.7 // indirect
|
||||
github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.16.7 // indirect
|
||||
github.com/aws/aws-sdk-go-v2/service/sso v1.18.1 // indirect
|
||||
github.com/aws/aws-sdk-go-v2/service/ssooidc v1.21.1 // indirect
|
||||
github.com/aws/aws-sdk-go-v2/service/sts v1.26.1 // indirect
|
||||
github.com/aws/smithy-go v1.18.1 // indirect
|
||||
github.com/beorn7/perks v1.0.1 // indirect
|
||||
github.com/cespare/xxhash/v2 v2.2.0 // indirect
|
||||
github.com/cilium/ebpf v0.9.1 // indirect
|
||||
|
||||
@@ -109,57 +109,93 @@ github.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5 h1:0CwZNZbxp69SHPd
|
||||
github.com/aws/aws-sdk-go-v2 v1.18.0/go.mod h1:uzbQtefpm44goOPmdKyAlXSNcwlRgF3ePWVW6EtJvvw=
|
||||
github.com/aws/aws-sdk-go-v2 v1.23.2 h1:UoTll1Y5b88x8h53OlsJGgOHwpggdMr7UVnLjMb3XYg=
|
||||
github.com/aws/aws-sdk-go-v2 v1.23.2/go.mod h1:i1XDttT4rnf6vxc9AuskLc6s7XBee8rlLilKlc03uAA=
|
||||
github.com/aws/aws-sdk-go-v2 v1.23.4 h1:2P20ZjH0ouSAu/6yZep8oCmTReathLuEu6dwoqEgjts=
|
||||
github.com/aws/aws-sdk-go-v2 v1.23.4/go.mod h1:t3szzKfP0NeRU27uBFczDivYJjsmSnqI8kIvKyWb9ds=
|
||||
github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.5.1 h1:ZY3108YtBNq96jNZTICHxN1gSBSbnvIdYwwqnvCV4Mc=
|
||||
github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.5.1/go.mod h1:t8PYl/6LzdAqsU4/9tz28V/kU+asFePvpOMkdul0gEQ=
|
||||
github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.5.3 h1:Zx9+31KyB8wQna6SXFWOewlgoY5uGdDAu6PTOEU3OQI=
|
||||
github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.5.3/go.mod h1:zxbEJhRdKTH1nqS2qu6UJ7zGe25xaHxZXaC2CvuQFnA=
|
||||
github.com/aws/aws-sdk-go-v2/config v1.18.22/go.mod h1:mN7Li1wxaPxSSy4Xkr6stFuinJGf3VZW3ZSNvO0q6sI=
|
||||
github.com/aws/aws-sdk-go-v2/config v1.25.8 h1:CHr7PIzyfevjNiqL9rU6xoqHZKCO2ldY6LmvRDfpRuI=
|
||||
github.com/aws/aws-sdk-go-v2/config v1.25.8/go.mod h1:zefIy117FDPOVU0xSOFG8mx9kJunuVopzI639tjYXc0=
|
||||
github.com/aws/aws-sdk-go-v2/config v1.25.10 h1:qw/e8emDtNufTkrAU86DlQ18DruMyyM7ttW6Lgwp4v0=
|
||||
github.com/aws/aws-sdk-go-v2/config v1.25.10/go.mod h1:203YiAtb6XyoGxXMPsUVwEcuxCiTQY/r8P27IDjfvMc=
|
||||
github.com/aws/aws-sdk-go-v2/credentials v1.13.21/go.mod h1:90Dk1lJoMyspa/EDUrldTxsPns0wn6+KpRKpdAWc0uA=
|
||||
github.com/aws/aws-sdk-go-v2/credentials v1.16.6 h1:TimIpn1p4v44i0sJMKsnpby1P9sP1ByKLsdm7bvOmwM=
|
||||
github.com/aws/aws-sdk-go-v2/credentials v1.16.6/go.mod h1:+CLPlYf9FQLeXD8etOYiZxpLQqc3GL4EikxjkFFp1KA=
|
||||
github.com/aws/aws-sdk-go-v2/credentials v1.16.8 h1:phw9nRLy/77bPk6Mfu2SHCOnHwfVB7WWrOa5rZIY2Fc=
|
||||
github.com/aws/aws-sdk-go-v2/credentials v1.16.8/go.mod h1:MrS4SOin6adbO6wgWhdifyPiq+TX7fPPwyA/ZLC1F5M=
|
||||
github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.13.3/go.mod h1:4Q0UFP0YJf0NrsEuEYHpM9fTSEVnD16Z3uyEF7J9JGM=
|
||||
github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.14.6 h1:pPs23/JLSOlwnmSRNkdbt3upmBeF6QL/3MHEb6KzTyo=
|
||||
github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.14.6/go.mod h1:jsoDHV44SxWv00wlbx0yA5M7n5rmE5rGk+OGA0suXSw=
|
||||
github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.14.8 h1:tQZLSPC2Zj2CqZHonLmWEvCsbpMX5tQvaYJWHadcPek=
|
||||
github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.14.8/go.mod h1:5+YpvTHDFffykWr5qAGjqwoh8oVYZOddL3sSrEN7lws=
|
||||
github.com/aws/aws-sdk-go-v2/feature/s3/manager v1.14.3 h1:edTeIcLVO/gefaQ4VdKeFaI4ygdSZ7s/eCWYo0kBxAc=
|
||||
github.com/aws/aws-sdk-go-v2/feature/s3/manager v1.14.3/go.mod h1:3rp61zCDi1E//0vHdx2ULc5eLlo0JOqVd1hxmks6S84=
|
||||
github.com/aws/aws-sdk-go-v2/feature/s3/manager v1.15.3 h1:0Pw2ku539I0EugduMpJ+579WRc+38nv8rZhThWjsuYQ=
|
||||
github.com/aws/aws-sdk-go-v2/feature/s3/manager v1.15.3/go.mod h1:vQtGu6huTQkoEhNgkDeijtYm9Y8HgpQqvGeKUPoEunY=
|
||||
github.com/aws/aws-sdk-go-v2/internal/configsources v1.1.33/go.mod h1:7i0PF1ME/2eUPFcjkVIwq+DOygHEoK92t5cDqNgYbIw=
|
||||
github.com/aws/aws-sdk-go-v2/internal/configsources v1.2.5 h1:16Z1XuMUv63fcyW5bIUno6AFcX4drsrE0gof+xue6g4=
|
||||
github.com/aws/aws-sdk-go-v2/internal/configsources v1.2.5/go.mod h1:pRvFacV2qbRKy34ZFptHZW4wpauJA445bqFbvA6ikSo=
|
||||
github.com/aws/aws-sdk-go-v2/internal/configsources v1.2.7 h1:eMqD7ku6WGdmcWWXPYun9m6yk6feSULLhJlAtN6rYG4=
|
||||
github.com/aws/aws-sdk-go-v2/internal/configsources v1.2.7/go.mod h1:0oBIfcDV6LScxEW0VgOqxT3e4aqKRp+SYhB9wAd5E3Q=
|
||||
github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.4.27/go.mod h1:UrHnn3QV/d0pBZ6QBAEQcqFLf8FAzLmoUfPVIueOvoM=
|
||||
github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.5.5 h1:RxpMuBgzP3Dj1n5CZY6droLFcsn5gc7QsrIcaGQoeCs=
|
||||
github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.5.5/go.mod h1:dO8Js7ym4Jzg/wcjTgCRVln/jFn3nI82XNhsG2lWbDI=
|
||||
github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.5.7 h1:+XYhWhgWs5F3Zx8oa49CXzNvfXrItaDjZB/M172fcHQ=
|
||||
github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.5.7/go.mod h1:L6tcSRyCGxcKfDWUrmv2jv8G1cLDU7d0FUpEFpG9bVE=
|
||||
github.com/aws/aws-sdk-go-v2/internal/ini v1.3.34/go.mod h1:Etz2dj6UHYuw+Xw830KfzCfWGMzqvUTCjUj5b76GVDc=
|
||||
github.com/aws/aws-sdk-go-v2/internal/ini v1.7.1 h1:uR9lXYjdPX0xY+NhvaJ4dD8rpSRz5VY81ccIIoNG+lw=
|
||||
github.com/aws/aws-sdk-go-v2/internal/ini v1.7.1/go.mod h1:6fQQgfuGmw8Al/3M2IgIllycxV7ZW7WCdVSqfBeUiCY=
|
||||
github.com/aws/aws-sdk-go-v2/internal/v4a v1.2.4 h1:40Q4X5ebZruRtknEZH/bg91sT5pR853F7/1X9QRbI54=
|
||||
github.com/aws/aws-sdk-go-v2/internal/v4a v1.2.4/go.mod h1:u77N7eEECzUv7F0xl2gcfK/vzc8wcjWobpy+DcrLJ5E=
|
||||
github.com/aws/aws-sdk-go-v2/internal/v4a v1.2.7 h1:3VaUNB1LclLomv82VnP5QnxAfowG+Ro4m82+af9wjZ4=
|
||||
github.com/aws/aws-sdk-go-v2/internal/v4a v1.2.7/go.mod h1:D5i0c+qvEY0LV5F4elFZd+mYnvHQbufCLHNHoBfQR2g=
|
||||
github.com/aws/aws-sdk-go-v2/service/ecr v1.18.10 h1:3s6Jg0xx6U/wDVgZy8exuZoGlsL/6tYcItAaXg9vMSA=
|
||||
github.com/aws/aws-sdk-go-v2/service/ecr v1.18.10/go.mod h1:Ce1q2jlNm8BVpjLaOnwnm5v2RClAbK6txwPljFzyW6c=
|
||||
github.com/aws/aws-sdk-go-v2/service/ecrpublic v1.16.1 h1:iqooVPD/xAM5SCTbrFsBeuiQ2o0D9wdqlHcUBTDxJPA=
|
||||
github.com/aws/aws-sdk-go-v2/service/ecrpublic v1.16.1/go.mod h1:uHtRE7aqXNmpeYL+7Ec7LacH5zC9+w2T5MBOeEKDdu0=
|
||||
github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.10.1 h1:rpkF4n0CyFcrJUG/rNNohoTmhtWlFTRI4BsZOh9PvLs=
|
||||
github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.10.1/go.mod h1:l9ymW25HOqymeU2m1gbUQ3rUIsTwKs8gYHXkqDQUhiI=
|
||||
github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.10.3 h1:e3PCNeEaev/ZF01cQyNZgmYE9oYYePIMJs2mWSKG514=
|
||||
github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.10.3/go.mod h1:gIeeNyaL8tIEqZrzAnTeyhHcE0yysCtcaP+N9kxLZ+E=
|
||||
github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.2.4 h1:6DRKQc+9cChgzL5gplRGusI5dBGeiEod4m/pmGbcX48=
|
||||
github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.2.4/go.mod h1:s8ORvrW4g4v7IvYKIAoBg17w3GQ+XuwXDXYrQ5SkzU0=
|
||||
github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.2.7 h1:Mft1tmIK1fkFS9l9sYVYiN+OdgXeOcQ9ZS3SxKOh3A4=
|
||||
github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.2.7/go.mod h1:QWI83fhocxDaN3b74N8rrvET60CBaike5lQ+5sm3OcE=
|
||||
github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.9.27/go.mod h1:EOwBD4J4S5qYszS5/3DpkejfuK+Z5/1uzICfPaZLtqw=
|
||||
github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.10.5 h1:F+XafeiK7Uf4YwTZfe/JLt+3cB6je9sI7l0TY4f2CkY=
|
||||
github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.10.5/go.mod h1:NlZuvlkyu6l/F3+qIBsGGtYLL2Z71tCf5NFoNAaG1NY=
|
||||
github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.10.7 h1:dU+ZyhvqMB/T/TxjGagHMCdyUiqaThRIaMu3YvKiSQI=
|
||||
github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.10.7/go.mod h1:SGORuNqoXyWfTvTp/gBGJfv8jRvW/+nha0XhnIXVI+o=
|
||||
github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.16.4 h1:o3DcfCxGDIT20pTbVKVhp3vWXOj/VvgazNJvumWeYW0=
|
||||
github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.16.4/go.mod h1:Uy0KVOxuTK2ne+/PKQ+VvEeWmjMMksE17k/2RK/r5oM=
|
||||
github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.16.7 h1:ybtGXm0qFVFi0hFUF7eFAVnL3ntl9MO7lrxhhGP7KYU=
|
||||
github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.16.7/go.mod h1:BUyWJUKAnNqoEq1LfyQxy+Eh4U8Y3c5w2C6m21f3yvI=
|
||||
github.com/aws/aws-sdk-go-v2/service/s3 v1.45.0 h1:qm5f24B6bg3BsVdbMd8ODEfKeadBmYlwUi9erqRfv6s=
|
||||
github.com/aws/aws-sdk-go-v2/service/s3 v1.45.0/go.mod h1:dqJ5JBL0clzgHriH35Amx3LRFY6wNIPUX7QO/BerSBo=
|
||||
github.com/aws/aws-sdk-go-v2/service/s3 v1.47.1 h1:0/W5F+LlXzKZ7KTsRcD8pugasVnsrjUWmhOsN/LdSFY=
|
||||
github.com/aws/aws-sdk-go-v2/service/s3 v1.47.1/go.mod h1:TqThLn4bRCn/UYf960hNZgPPjmxc17fQcwmjfuG6D5k=
|
||||
github.com/aws/aws-sdk-go-v2/service/sso v1.12.9/go.mod h1:ouy2P4z6sJN70fR3ka3wD3Ro3KezSxU6eKGQI2+2fjI=
|
||||
github.com/aws/aws-sdk-go-v2/service/sso v1.17.5 h1:kuK22ZsITfzaZEkxEl5H/lhy2k3G4clBtcQBI93RbIc=
|
||||
github.com/aws/aws-sdk-go-v2/service/sso v1.17.5/go.mod h1:/tLqstwPfJLHYGBB5/c8P1ITI82pcGs7cJQuXku2pOg=
|
||||
github.com/aws/aws-sdk-go-v2/service/sso v1.18.1 h1:V40g2daNO3l1J94JYwqfkyvQMYXi5I25fs3fNQW8iDs=
|
||||
github.com/aws/aws-sdk-go-v2/service/sso v1.18.1/go.mod h1:0ZWQJP/mBOUxkCvZKybZNz1XmdUKSBxoF0dzgfxtvDs=
|
||||
github.com/aws/aws-sdk-go-v2/service/ssooidc v1.14.9/go.mod h1:AFvkxc8xfBe8XA+5St5XIHHrQQtkxqrRincx4hmMHOk=
|
||||
github.com/aws/aws-sdk-go-v2/service/ssooidc v1.20.3 h1:l5d5nrTFMhiUWNoLnV7QNI4m42/3WVSXqSyqVy+elGk=
|
||||
github.com/aws/aws-sdk-go-v2/service/ssooidc v1.20.3/go.mod h1:30gKZp2pHQJq3yTmVy+hJKDFynSoYzVqYaxe4yPi+xI=
|
||||
github.com/aws/aws-sdk-go-v2/service/ssooidc v1.21.1 h1:uQrj7SpUNC3r55vc1CDh3qV9wJC66lz546xM9dhSo5s=
|
||||
github.com/aws/aws-sdk-go-v2/service/ssooidc v1.21.1/go.mod h1:oyaTk5xEAOuPXX1kCD7HmIeuLqdj3Bk5yGkqGXtGi14=
|
||||
github.com/aws/aws-sdk-go-v2/service/sts v1.18.10/go.mod h1:BgQOMsg8av8jset59jelyPW7NoZcZXLVpDsXunGDrk8=
|
||||
github.com/aws/aws-sdk-go-v2/service/sts v1.25.6 h1:39dJNBt35p8dFSnQdoy+QbDaPenTxFqqDQFOb1GDYpE=
|
||||
github.com/aws/aws-sdk-go-v2/service/sts v1.25.6/go.mod h1:6DKEi+8OnUrqEEh6OCam16AYQHWAOyNgRiUGnHoh7Cg=
|
||||
github.com/aws/aws-sdk-go-v2/service/sts v1.26.1 h1:K33V7L0XDdb23FMOZySr8bon1jou5SHn1fiv7NJ1SUg=
|
||||
github.com/aws/aws-sdk-go-v2/service/sts v1.26.1/go.mod h1:YtXUl/sfnS06VksYhr855hTQf2HphfT1Xv/EwuzbPjg=
|
||||
github.com/aws/smithy-go v1.13.5/go.mod h1:Tg+OJXh4MB2R/uN61Ko2f6hTZwB/ZYGOtib8J3gBHzA=
|
||||
github.com/aws/smithy-go v1.17.0 h1:wWJD7LX6PBV6etBUwO0zElG0nWN9rUhp0WdYeHSHAaI=
|
||||
github.com/aws/smithy-go v1.17.0/go.mod h1:NukqUGpCZIILqqiV0NIjeFh24kd/FAa4beRb6nbIUPE=
|
||||
github.com/aws/smithy-go v1.18.1 h1:pOdBTUfXNazOlxLrgeYalVnuTpKreACHtc62xLwIB3c=
|
||||
github.com/aws/smithy-go v1.18.1/go.mod h1:NukqUGpCZIILqqiV0NIjeFh24kd/FAa4beRb6nbIUPE=
|
||||
github.com/awslabs/amazon-ecr-credential-helper/ecr-login v0.0.0-20230522190001-adf1bafd791a h1:rW+dV12c0WD3+O4Zs8Qt4+oqnr8ecXeyg8g3yB73ZKA=
|
||||
github.com/awslabs/amazon-ecr-credential-helper/ecr-login v0.0.0-20230522190001-adf1bafd791a/go.mod h1:1mvdZLjy932pV2fhj1jjwUSHaF5Ogq2gk5bvi/6ngEU=
|
||||
github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q=
|
||||
|
||||
+1
-1
@@ -3,4 +3,4 @@
|
||||
package aws
|
||||
|
||||
// goModuleVersion is the tagged release for this module
|
||||
const goModuleVersion = "1.23.2"
|
||||
const goModuleVersion = "1.23.4"
|
||||
|
||||
+8
@@ -1,3 +1,11 @@
|
||||
# v1.5.3 (2023-11-30)
|
||||
|
||||
* No change notes available for this release.
|
||||
|
||||
# v1.5.2 (2023-11-29)
|
||||
|
||||
* No change notes available for this release.
|
||||
|
||||
# v1.5.1 (2023-11-15)
|
||||
|
||||
* No change notes available for this release.
|
||||
|
||||
Generated
Vendored
+1
-1
@@ -3,4 +3,4 @@
|
||||
package eventstream
|
||||
|
||||
// goModuleVersion is the tagged release for this module
|
||||
const goModuleVersion = "1.5.1"
|
||||
const goModuleVersion = "1.5.3"
|
||||
|
||||
+8
@@ -1,3 +1,11 @@
|
||||
# v1.25.10 (2023-11-30)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.25.9 (2023-11-29)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.25.8 (2023-11-28.3)
|
||||
|
||||
* **Bug Fix**: Correct resolution of S3Express auth disable toggle.
|
||||
|
||||
+1
-1
@@ -3,4 +3,4 @@
|
||||
package config
|
||||
|
||||
// goModuleVersion is the tagged release for this module
|
||||
const goModuleVersion = "1.25.8"
|
||||
const goModuleVersion = "1.25.10"
|
||||
|
||||
+8
@@ -1,3 +1,11 @@
|
||||
# v1.16.8 (2023-11-30)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.16.7 (2023-11-29)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.16.6 (2023-11-28.2)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
+1
-1
@@ -3,4 +3,4 @@
|
||||
package credentials
|
||||
|
||||
// goModuleVersion is the tagged release for this module
|
||||
const goModuleVersion = "1.16.6"
|
||||
const goModuleVersion = "1.16.8"
|
||||
|
||||
+8
@@ -1,3 +1,11 @@
|
||||
# v1.14.8 (2023-11-30)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.14.7 (2023-11-29)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.14.6 (2023-11-28.2)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
+1
-1
@@ -3,4 +3,4 @@
|
||||
package imds
|
||||
|
||||
// goModuleVersion is the tagged release for this module
|
||||
const goModuleVersion = "1.14.6"
|
||||
const goModuleVersion = "1.14.8"
|
||||
|
||||
+21
@@ -1,3 +1,24 @@
|
||||
# v1.15.3 (2023-11-30)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.15.2 (2023-11-29)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.15.1 (2023-11-28.3)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.15.0 (2023-11-28.2)
|
||||
|
||||
* **Feature**: Add S3Express support.
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.14.4 (2023-11-28)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.14.3 (2023-11-27)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
+1
-1
@@ -3,4 +3,4 @@
|
||||
package manager
|
||||
|
||||
// goModuleVersion is the tagged release for this module
|
||||
const goModuleVersion = "1.14.3"
|
||||
const goModuleVersion = "1.15.3"
|
||||
|
||||
+45
@@ -13,8 +13,11 @@ import (
|
||||
|
||||
"github.com/aws/aws-sdk-go-v2/aws/middleware"
|
||||
"github.com/aws/aws-sdk-go-v2/internal/awsutil"
|
||||
internalcontext "github.com/aws/aws-sdk-go-v2/internal/context"
|
||||
"github.com/aws/aws-sdk-go-v2/service/s3"
|
||||
"github.com/aws/aws-sdk-go-v2/service/s3/types"
|
||||
smithymiddleware "github.com/aws/smithy-go/middleware"
|
||||
smithyhttp "github.com/aws/smithy-go/transport/http"
|
||||
)
|
||||
|
||||
// MaxUploadParts is the maximum allowed number of parts in a multi-part upload
|
||||
@@ -308,6 +311,9 @@ func (u Uploader) Upload(ctx context.Context, input *s3.PutObjectInput, opts ...
|
||||
clientOptions = append(clientOptions, func(o *s3.Options) {
|
||||
o.APIOptions = append(o.APIOptions,
|
||||
middleware.AddSDKAgentKey(middleware.FeatureMetadata, userAgentKey),
|
||||
func(s *smithymiddleware.Stack) error {
|
||||
return s.Finalize.Insert(&setS3ExpressDefaultChecksum{}, "ResolveEndpointV2", smithymiddleware.After)
|
||||
},
|
||||
)
|
||||
})
|
||||
clientOptions = append(clientOptions, i.cfg.ClientOptions...)
|
||||
@@ -808,3 +814,42 @@ type readerAtSeeker interface {
|
||||
io.ReaderAt
|
||||
io.ReadSeeker
|
||||
}
|
||||
|
||||
// setS3ExpressDefaultChecksum defaults to CRC32 for S3Express buckets,
|
||||
// which is required when uploading to those through transfer manager.
|
||||
type setS3ExpressDefaultChecksum struct{}
|
||||
|
||||
func (*setS3ExpressDefaultChecksum) ID() string {
|
||||
return "setS3ExpressDefaultChecksum"
|
||||
}
|
||||
|
||||
func (*setS3ExpressDefaultChecksum) HandleFinalize(
|
||||
ctx context.Context, in smithymiddleware.FinalizeInput, next smithymiddleware.FinalizeHandler,
|
||||
) (
|
||||
out smithymiddleware.FinalizeOutput, metadata smithymiddleware.Metadata, err error,
|
||||
) {
|
||||
const checksumHeader = "x-amz-checksum-algorithm"
|
||||
|
||||
if internalcontext.GetS3Backend(ctx) != internalcontext.S3BackendS3Express {
|
||||
return next.HandleFinalize(ctx, in)
|
||||
}
|
||||
|
||||
// If this is CreateMultipartUpload we need to ensure the checksum
|
||||
// algorithm header is present. Otherwise everything is driven off the
|
||||
// context setting and we can let it flow from there.
|
||||
if middleware.GetOperationName(ctx) == "CreateMultipartUpload" {
|
||||
r, ok := in.Request.(*smithyhttp.Request)
|
||||
if !ok {
|
||||
return out, metadata, fmt.Errorf("unknown transport type %T", in.Request)
|
||||
}
|
||||
|
||||
if internalcontext.GetChecksumInputAlgorithm(ctx) == "" {
|
||||
r.Header.Set(checksumHeader, "CRC32")
|
||||
}
|
||||
return next.HandleFinalize(ctx, in)
|
||||
} else if internalcontext.GetChecksumInputAlgorithm(ctx) == "" {
|
||||
ctx = internalcontext.SetChecksumInputAlgorithm(ctx, string(types.ChecksumAlgorithmCrc32))
|
||||
}
|
||||
|
||||
return next.HandleFinalize(ctx, in)
|
||||
}
|
||||
|
||||
+8
@@ -1,3 +1,11 @@
|
||||
# v1.2.7 (2023-11-30)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.2.6 (2023-11-29)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.2.5 (2023-11-28.2)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
+1
-1
@@ -3,4 +3,4 @@
|
||||
package configsources
|
||||
|
||||
// goModuleVersion is the tagged release for this module
|
||||
const goModuleVersion = "1.2.5"
|
||||
const goModuleVersion = "1.2.7"
|
||||
|
||||
+39
@@ -0,0 +1,39 @@
|
||||
package context
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
"github.com/aws/smithy-go/middleware"
|
||||
)
|
||||
|
||||
type s3BackendKey struct{}
|
||||
type checksumInputAlgorithmKey struct{}
|
||||
|
||||
const (
|
||||
// S3BackendS3Express identifies the S3Express backend
|
||||
S3BackendS3Express = "S3Express"
|
||||
)
|
||||
|
||||
// SetS3Backend stores the resolved endpoint backend within the request
|
||||
// context, which is required for a variety of custom S3 behaviors.
|
||||
func SetS3Backend(ctx context.Context, typ string) context.Context {
|
||||
return middleware.WithStackValue(ctx, s3BackendKey{}, typ)
|
||||
}
|
||||
|
||||
// GetS3Backend retrieves the stored endpoint backend within the context.
|
||||
func GetS3Backend(ctx context.Context) string {
|
||||
v, _ := middleware.GetStackValue(ctx, s3BackendKey{}).(string)
|
||||
return v
|
||||
}
|
||||
|
||||
// SetChecksumInputAlgorithm sets the request checksum algorithm on the
|
||||
// context.
|
||||
func SetChecksumInputAlgorithm(ctx context.Context, value string) context.Context {
|
||||
return middleware.WithStackValue(ctx, checksumInputAlgorithmKey{}, value)
|
||||
}
|
||||
|
||||
// GetChecksumInputAlgorithm returns the checksum algorithm from the context.
|
||||
func GetChecksumInputAlgorithm(ctx context.Context) string {
|
||||
v, _ := middleware.GetStackValue(ctx, checksumInputAlgorithmKey{}).(string)
|
||||
return v
|
||||
}
|
||||
+8
@@ -1,3 +1,11 @@
|
||||
# v2.5.7 (2023-11-30)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v2.5.6 (2023-11-29)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v2.5.5 (2023-11-28.2)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
+1
-1
@@ -3,4 +3,4 @@
|
||||
package endpoints
|
||||
|
||||
// goModuleVersion is the tagged release for this module
|
||||
const goModuleVersion = "2.5.5"
|
||||
const goModuleVersion = "2.5.7"
|
||||
|
||||
+12
@@ -1,3 +1,15 @@
|
||||
# v1.2.7 (2023-11-30)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.2.6 (2023-11-29)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.2.5 (2023-11-28.2)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.2.4 (2023-11-20)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
+1
-1
@@ -3,4 +3,4 @@
|
||||
package v4a
|
||||
|
||||
// goModuleVersion is the tagged release for this module
|
||||
const goModuleVersion = "1.2.4"
|
||||
const goModuleVersion = "1.2.7"
|
||||
|
||||
Generated
Vendored
+8
@@ -1,3 +1,11 @@
|
||||
# v1.10.3 (2023-11-30)
|
||||
|
||||
* No change notes available for this release.
|
||||
|
||||
# v1.10.2 (2023-11-29)
|
||||
|
||||
* No change notes available for this release.
|
||||
|
||||
# v1.10.1 (2023-11-15)
|
||||
|
||||
* No change notes available for this release.
|
||||
|
||||
Generated
Vendored
+1
-1
@@ -3,4 +3,4 @@
|
||||
package acceptencoding
|
||||
|
||||
// goModuleVersion is the tagged release for this module
|
||||
const goModuleVersion = "1.10.1"
|
||||
const goModuleVersion = "1.10.3"
|
||||
|
||||
+12
@@ -1,3 +1,15 @@
|
||||
# v1.2.7 (2023-11-30)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.2.6 (2023-11-29)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.2.5 (2023-11-28.2)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.2.4 (2023-11-20)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
Generated
Vendored
+1
-1
@@ -3,4 +3,4 @@
|
||||
package checksum
|
||||
|
||||
// goModuleVersion is the tagged release for this module
|
||||
const goModuleVersion = "1.2.4"
|
||||
const goModuleVersion = "1.2.7"
|
||||
|
||||
Generated
Vendored
+2
-1
@@ -9,6 +9,7 @@ import (
|
||||
"strconv"
|
||||
|
||||
v4 "github.com/aws/aws-sdk-go-v2/aws/signer/v4"
|
||||
internalcontext "github.com/aws/aws-sdk-go-v2/internal/context"
|
||||
presignedurlcust "github.com/aws/aws-sdk-go-v2/service/internal/presigned-url"
|
||||
"github.com/aws/smithy-go/middleware"
|
||||
smithyhttp "github.com/aws/smithy-go/transport/http"
|
||||
@@ -377,7 +378,7 @@ func (m *addInputChecksumTrailer) HandleFinalize(
|
||||
}
|
||||
|
||||
func getInputAlgorithm(ctx context.Context) (Algorithm, bool, error) {
|
||||
ctxAlgorithm := getContextInputAlgorithm(ctx)
|
||||
ctxAlgorithm := internalcontext.GetChecksumInputAlgorithm(ctx)
|
||||
if ctxAlgorithm == "" {
|
||||
return "", false, nil
|
||||
}
|
||||
|
||||
Generated
Vendored
+2
-21
@@ -3,6 +3,7 @@ package checksum
|
||||
import (
|
||||
"context"
|
||||
|
||||
internalcontext "github.com/aws/aws-sdk-go-v2/internal/context"
|
||||
"github.com/aws/smithy-go/middleware"
|
||||
)
|
||||
|
||||
@@ -35,33 +36,13 @@ func (m *setupInputContext) HandleInitialize(
|
||||
// check is input resource has a checksum algorithm
|
||||
algorithm, ok := m.GetAlgorithm(in.Parameters)
|
||||
if ok && len(algorithm) != 0 {
|
||||
ctx = setContextInputAlgorithm(ctx, algorithm)
|
||||
ctx = internalcontext.SetChecksumInputAlgorithm(ctx, algorithm)
|
||||
}
|
||||
}
|
||||
|
||||
return next.HandleInitialize(ctx, in)
|
||||
}
|
||||
|
||||
// inputAlgorithmKey is the key set on context used to identify, retrieves the
|
||||
// request checksum algorithm if present on the context.
|
||||
type inputAlgorithmKey struct{}
|
||||
|
||||
// setContextInputAlgorithm sets the request checksum algorithm on the context.
|
||||
//
|
||||
// Scoped to stack values.
|
||||
func setContextInputAlgorithm(ctx context.Context, value string) context.Context {
|
||||
return middleware.WithStackValue(ctx, inputAlgorithmKey{}, value)
|
||||
}
|
||||
|
||||
// getContextInputAlgorithm returns the checksum algorithm from the context if
|
||||
// one was specified. Empty string is returned if one is not specified.
|
||||
//
|
||||
// Scoped to stack values.
|
||||
func getContextInputAlgorithm(ctx context.Context) (v string) {
|
||||
v, _ = middleware.GetStackValue(ctx, inputAlgorithmKey{}).(string)
|
||||
return v
|
||||
}
|
||||
|
||||
type setupOutputContext struct {
|
||||
// GetValidationMode is a function to get the checksum validation
|
||||
// mode of the output payload from the input parameters.
|
||||
|
||||
+8
@@ -1,3 +1,11 @@
|
||||
# v1.10.7 (2023-11-30)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.10.6 (2023-11-29)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.10.5 (2023-11-28.2)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
Generated
Vendored
+1
-1
@@ -3,4 +3,4 @@
|
||||
package presignedurl
|
||||
|
||||
// goModuleVersion is the tagged release for this module
|
||||
const goModuleVersion = "1.10.5"
|
||||
const goModuleVersion = "1.10.7"
|
||||
|
||||
+12
@@ -1,3 +1,15 @@
|
||||
# v1.16.7 (2023-11-30)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.16.6 (2023-11-29)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.16.5 (2023-11-28.2)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.16.4 (2023-11-20)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
Generated
Vendored
+1
-1
@@ -3,4 +3,4 @@
|
||||
package s3shared
|
||||
|
||||
// goModuleVersion is the tagged release for this module
|
||||
const goModuleVersion = "1.16.4"
|
||||
const goModuleVersion = "1.16.7"
|
||||
|
||||
+19
@@ -1,3 +1,22 @@
|
||||
# v1.47.1 (2023-11-30)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.47.0 (2023-11-29)
|
||||
|
||||
* **Feature**: Expose Options() accessor on service clients.
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.46.0 (2023-11-28.2)
|
||||
|
||||
* **Feature**: Add S3Express support.
|
||||
* **Feature**: Adds support for S3 Express One Zone.
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.45.1 (2023-11-28)
|
||||
|
||||
* **Bug Fix**: Respect setting RetryMaxAttempts in functional options at client construction.
|
||||
|
||||
# v1.45.0 (2023-11-27)
|
||||
|
||||
* **Feature**: Adding new params - Key and Prefix, to S3 API operations for supporting S3 Access Grants. Note - These updates will not change any of the existing S3 API functionality.
|
||||
|
||||
+24
-4
@@ -50,8 +50,6 @@ func New(options Options, optFns ...func(*Options)) *Client {
|
||||
|
||||
setResolvedDefaultsMode(&options)
|
||||
|
||||
resolveRetryer(&options)
|
||||
|
||||
resolveHTTPClient(&options)
|
||||
|
||||
resolveHTTPSignerV4(&options)
|
||||
@@ -66,10 +64,14 @@ func New(options Options, optFns ...func(*Options)) *Client {
|
||||
fn(&options)
|
||||
}
|
||||
|
||||
resolveRetryer(&options)
|
||||
|
||||
resolveCredentialProvider(&options)
|
||||
|
||||
ignoreAnonymousAuth(&options)
|
||||
|
||||
resolveExpressCredentials(&options)
|
||||
|
||||
finalizeServiceEndpointAuthResolver(&options)
|
||||
|
||||
resolveAuthSchemes(&options)
|
||||
@@ -78,9 +80,20 @@ func New(options Options, optFns ...func(*Options)) *Client {
|
||||
options: options,
|
||||
}
|
||||
|
||||
finalizeExpressCredentials(&options, client)
|
||||
|
||||
return client
|
||||
}
|
||||
|
||||
// Options returns a copy of the client configuration.
|
||||
//
|
||||
// Callers SHOULD NOT perform mutations on any inner structures within client
|
||||
// config. Config overrides should instead be made on a per-operation basis through
|
||||
// functional options.
|
||||
func (c *Client) Options() Options {
|
||||
return c.options.Copy()
|
||||
}
|
||||
|
||||
func (c *Client) invokeOperation(ctx context.Context, opID string, params interface{}, optFns []func(*Options), stackFns ...func(*middleware.Stack, Options) error) (result interface{}, metadata middleware.Metadata, err error) {
|
||||
ctx = middleware.ClearStackValues(ctx)
|
||||
stack := middleware.NewStack(opID, smithyhttp.NewStackRequest)
|
||||
@@ -177,6 +190,11 @@ func resolveAuthSchemes(options *Options) {
|
||||
Logger: options.Logger,
|
||||
LogSigning: options.ClientLogMode.IsSigning(),
|
||||
}),
|
||||
internalauth.NewHTTPAuthScheme("com.amazonaws.s3#sigv4express", &s3cust.ExpressSigner{
|
||||
Signer: options.HTTPSignerV4,
|
||||
Logger: options.Logger,
|
||||
LogSigning: options.ClientLogMode.IsSigning(),
|
||||
}),
|
||||
internalauth.NewHTTPAuthScheme("aws.auth#sigv4a", &v4a.SignerAdapter{
|
||||
Signer: options.httpSignerV4a,
|
||||
Logger: options.Logger,
|
||||
@@ -257,6 +275,7 @@ func NewFromConfig(cfg aws.Config, optFns ...func(*Options)) *Client {
|
||||
resolveAWSEndpointResolver(cfg, &opts)
|
||||
resolveUseARNRegion(cfg, &opts)
|
||||
resolveDisableMultiRegionAccessPoints(cfg, &opts)
|
||||
resolveDisableExpressAuth(cfg, &opts)
|
||||
resolveUseDualStackEndpoint(cfg, &opts)
|
||||
resolveUseFIPSEndpoint(cfg, &opts)
|
||||
resolveBaseEndpoint(cfg, &opts)
|
||||
@@ -721,7 +740,7 @@ func (m *presignContextPolyfillMiddleware) HandleFinalize(ctx context.Context, i
|
||||
|
||||
schemeID := rscheme.Scheme.SchemeID()
|
||||
ctx = s3cust.SetSignerVersion(ctx, schemeID)
|
||||
if schemeID == "aws.auth#sigv4" {
|
||||
if schemeID == "aws.auth#sigv4" || schemeID == "com.amazonaws.s3#sigv4express" {
|
||||
if sn, ok := smithyhttp.GetSigV4SigningName(&rscheme.SignerProperties); ok {
|
||||
ctx = awsmiddleware.SetSigningName(ctx, sn)
|
||||
}
|
||||
@@ -765,9 +784,10 @@ func (c presignConverter) convertToPresignMiddleware(stack *middleware.Stack, op
|
||||
return err
|
||||
}
|
||||
|
||||
// add multi-region access point presigner
|
||||
// extended s3 presigning
|
||||
signermv := s3cust.NewPresignHTTPRequestMiddleware(s3cust.PresignHTTPRequestMiddlewareOptions{
|
||||
CredentialsProvider: options.Credentials,
|
||||
ExpressCredentials: options.ExpressCredentials,
|
||||
V4Presigner: c.Presigner,
|
||||
V4aPresigner: c.presignerV4a,
|
||||
LogSigning: options.ClientLogMode.IsSigning(),
|
||||
|
||||
+62
-26
@@ -13,18 +13,40 @@ import (
|
||||
smithyhttp "github.com/aws/smithy-go/transport/http"
|
||||
)
|
||||
|
||||
// This action aborts a multipart upload. After a multipart upload is aborted, no
|
||||
// additional parts can be uploaded using that upload ID. The storage consumed by
|
||||
// any previously uploaded parts will be freed. However, if any part uploads are
|
||||
// This operation aborts a multipart upload. After a multipart upload is aborted,
|
||||
// no additional parts can be uploaded using that upload ID. The storage consumed
|
||||
// by any previously uploaded parts will be freed. However, if any part uploads are
|
||||
// currently in progress, those part uploads might or might not succeed. As a
|
||||
// result, it might be necessary to abort a given multipart upload multiple times
|
||||
// in order to completely free all storage consumed by all parts. To verify that
|
||||
// all parts have been removed, so you don't get charged for the part storage, you
|
||||
// should call the ListParts (https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListParts.html)
|
||||
// action and ensure that the parts list is empty. 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)
|
||||
// . The following operations are related to AbortMultipartUpload :
|
||||
// all parts have been removed and prevent getting charged for the part storage,
|
||||
// you should call the ListParts (https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListParts.html)
|
||||
// API operation and ensure that the parts list is empty. Directory buckets - For
|
||||
// directory buckets, you must make requests for this API operation to the Zonal
|
||||
// endpoint. These endpoints support virtual-hosted-style requests in the format
|
||||
// https://bucket_name.s3express-az_id.region.amazonaws.com/key-name . Path-style
|
||||
// requests are not supported. For more information, see Regional and Zonal
|
||||
// endpoints (https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-express-Regions-and-Zones.html)
|
||||
// in the Amazon S3 User Guide. Permissions
|
||||
// - General purpose bucket permissions - For information about permissions
|
||||
// required to use the multipart upload, see Multipart Upload and Permissions (https://docs.aws.amazon.com/AmazonS3/latest/dev/mpuAndPermissions.html)
|
||||
// in the Amazon S3 User Guide.
|
||||
// - Directory bucket permissions - To grant access to this API operation on a
|
||||
// directory bucket, we recommend that you use the CreateSession (https://docs.aws.amazon.com/AmazonS3/latest/API/API_CreateSession.html)
|
||||
// API operation for session-based authorization. Specifically, you grant the
|
||||
// s3express:CreateSession permission to the directory bucket in a bucket policy
|
||||
// or an IAM identity-based policy. Then, you make the CreateSession API call on
|
||||
// the bucket to obtain a session token. With the session token in your request
|
||||
// header, you can make API requests to this operation. After the session token
|
||||
// expires, you make another CreateSession API call to generate a new session
|
||||
// token for use. Amazon Web Services CLI or SDKs create session and refresh the
|
||||
// session token automatically to avoid service interruptions when a session
|
||||
// expires. For more information about authorization, see CreateSession (https://docs.aws.amazon.com/AmazonS3/latest/API/API_CreateSession.html)
|
||||
// .
|
||||
//
|
||||
// HTTP Host header syntax Directory buckets - The HTTP Host header syntax is
|
||||
// Bucket_name.s3express-az_id.region.amazonaws.com . The following operations are
|
||||
// related to AbortMultipartUpload :
|
||||
// - CreateMultipartUpload (https://docs.aws.amazon.com/AmazonS3/latest/API/API_CreateMultipartUpload.html)
|
||||
// - UploadPart (https://docs.aws.amazon.com/AmazonS3/latest/API/API_UploadPart.html)
|
||||
// - CompleteMultipartUpload (https://docs.aws.amazon.com/AmazonS3/latest/API/API_CompleteMultipartUpload.html)
|
||||
@@ -47,16 +69,26 @@ func (c *Client) AbortMultipartUpload(ctx context.Context, params *AbortMultipar
|
||||
|
||||
type AbortMultipartUploadInput struct {
|
||||
|
||||
// The bucket name to which the upload was taking place. When using this action
|
||||
// with an access point, 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. 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 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
|
||||
// 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
|
||||
@@ -76,18 +108,19 @@ type AbortMultipartUploadInput struct {
|
||||
// This member is required.
|
||||
UploadId *string
|
||||
|
||||
// The account ID of the expected bucket owner. If the bucket is owned by a
|
||||
// different account, the request fails with the HTTP status code 403 Forbidden
|
||||
// (access denied).
|
||||
// The account ID of the expected bucket owner. If the account ID that you provide
|
||||
// does not match the actual owner of the bucket, the request fails with the HTTP
|
||||
// status code 403 Forbidden (access denied).
|
||||
ExpectedBucketOwner *string
|
||||
|
||||
// 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 Amazon S3 bucket has Requester Pays enabled, the requester
|
||||
// will pay for corresponding charges to copy the object. For information about
|
||||
// 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.
|
||||
// in the Amazon S3 User Guide. This functionality is not supported for directory
|
||||
// buckets.
|
||||
RequestPayer types.RequestPayer
|
||||
|
||||
noSmithyDocumentSerde
|
||||
@@ -102,7 +135,7 @@ func (in *AbortMultipartUploadInput) bindEndpointParams(p *EndpointParameters) {
|
||||
type AbortMultipartUploadOutput struct {
|
||||
|
||||
// If present, indicates that the requester was successfully charged for the
|
||||
// request.
|
||||
// request. This functionality is not supported for directory buckets.
|
||||
RequestCharged types.RequestCharged
|
||||
|
||||
// Metadata pertaining to the operation's result.
|
||||
@@ -166,6 +199,9 @@ func (c *Client) addOperationAbortMultipartUploadMiddlewares(stack *middleware.S
|
||||
if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addPutBucketContextMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addOpAbortMultipartUploadValidationMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
+134
-91
@@ -15,54 +15,81 @@ import (
|
||||
|
||||
// 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 action 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 Complete Multipart Upload request, you must provide the parts
|
||||
// list. You must ensure that the parts list is complete. This action concatenates
|
||||
// the parts that you provide in the list. For each part in the list, you must
|
||||
// provide the part number and the ETag value, returned after that part was
|
||||
// uploaded. Processing of a Complete Multipart Upload request could take several
|
||||
// minutes to complete. 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. If you call the S3 API 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 throws an exception (or, for the SDKs that don't use
|
||||
// exceptions, they return the 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 cannot use Content-Type: application/x-www-form-urlencoded with Complete
|
||||
// Multipart Upload requests. Also, if you do not provide a Content-Type header,
|
||||
// CompleteMultipartUpload returns 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)
|
||||
// . 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)
|
||||
// . CompleteMultipartUpload has the following special errors:
|
||||
// - Error code: EntityTooSmall
|
||||
// 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
|
||||
// CompleteMultipartUpload requests. Also, if you don't provide a Content-Type
|
||||
// header, CompleteMultipartUpload can still return a 200 OK response. For more
|
||||
// information about multipart uploads, see Uploading Objects Using Multipart
|
||||
// Upload (https://docs.aws.amazon.com/AmazonS3/latest/dev/uploadobjusingmpu.html)
|
||||
// in the Amazon S3 User Guide. Directory buckets - For directory buckets, you must
|
||||
// make requests for this API operation to the Zonal endpoint. These endpoints
|
||||
// support virtual-hosted-style requests in the format
|
||||
// https://bucket_name.s3express-az_id.region.amazonaws.com/key-name . Path-style
|
||||
// requests are not supported. For more information, see Regional and Zonal
|
||||
// endpoints (https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-express-Regions-and-Zones.html)
|
||||
// in the Amazon S3 User Guide. Permissions
|
||||
// - General purpose bucket permissions - For information about permissions
|
||||
// required to use the multipart upload API, see Multipart Upload and Permissions (https://docs.aws.amazon.com/AmazonS3/latest/dev/mpuAndPermissions.html)
|
||||
// in the Amazon S3 User Guide.
|
||||
// - Directory bucket permissions - To grant access to this API operation on a
|
||||
// directory bucket, we recommend that you use the CreateSession (https://docs.aws.amazon.com/AmazonS3/latest/API/API_CreateSession.html)
|
||||
// API operation for session-based authorization. Specifically, you grant the
|
||||
// s3express:CreateSession permission to the directory bucket in a bucket policy
|
||||
// or an IAM identity-based policy. Then, you make the CreateSession API call on
|
||||
// the bucket to obtain a session token. With the session token in your request
|
||||
// header, you can make API requests to this operation. After the session token
|
||||
// expires, you make another CreateSession API call to generate a new session
|
||||
// token for use. Amazon Web Services CLI or SDKs create session and refresh the
|
||||
// session token automatically to avoid service interruptions when a session
|
||||
// expires. For more information about authorization, see CreateSession (https://docs.aws.amazon.com/AmazonS3/latest/API/API_CreateSession.html)
|
||||
// .
|
||||
//
|
||||
// Special errors
|
||||
// - Error Code: EntityTooSmall
|
||||
// - Description: Your proposed upload is smaller than the minimum allowed
|
||||
// object size. Each part must be at least 5 MB in size, except the last part.
|
||||
// - 400 Bad Request
|
||||
// - Error code: InvalidPart
|
||||
// - 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 entity tag might not have
|
||||
// matched the part's entity tag.
|
||||
// - 400 Bad Request
|
||||
// - Error code: InvalidPartOrder
|
||||
// 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.
|
||||
// - 400 Bad Request
|
||||
// - Error code: NoSuchUpload
|
||||
// - 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.
|
||||
// - 404 Not Found
|
||||
// - HTTP Status Code: 404 Not Found
|
||||
//
|
||||
// The following operations are related to CompleteMultipartUpload :
|
||||
// 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)
|
||||
@@ -85,16 +112,26 @@ func (c *Client) CompleteMultipartUpload(ctx context.Context, params *CompleteMu
|
||||
|
||||
type CompleteMultipartUploadInput struct {
|
||||
|
||||
// Name of the bucket to which the multipart upload was initiated. When using this
|
||||
// action with an access point, 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. 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
|
||||
// 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
|
||||
// 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
|
||||
@@ -142,9 +179,9 @@ type CompleteMultipartUploadInput struct {
|
||||
// in the Amazon S3 User Guide.
|
||||
ChecksumSHA256 *string
|
||||
|
||||
// The account ID of the expected bucket owner. If the bucket is owned by a
|
||||
// different account, the request fails with the HTTP status code 403 Forbidden
|
||||
// (access denied).
|
||||
// The account ID of the expected bucket owner. If the account ID that you provide
|
||||
// does not match the actual owner of the bucket, the request fails with the HTTP
|
||||
// status code 403 Forbidden (access denied).
|
||||
ExpectedBucketOwner *string
|
||||
|
||||
// The container for the multipart upload request information.
|
||||
@@ -152,30 +189,34 @@ type CompleteMultipartUploadInput struct {
|
||||
|
||||
// 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 Amazon S3 bucket has Requester Pays enabled, the requester
|
||||
// will pay for corresponding charges to copy the object. For information about
|
||||
// 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.
|
||||
// in the Amazon S3 User Guide. This functionality is not supported for directory
|
||||
// buckets.
|
||||
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.
|
||||
// in the Amazon S3 User Guide. This functionality is not supported for directory
|
||||
// buckets.
|
||||
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.
|
||||
// in the Amazon S3 User Guide. This functionality is not supported for directory
|
||||
// buckets.
|
||||
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.
|
||||
// in the Amazon S3 User Guide. This functionality is not supported for directory
|
||||
// buckets.
|
||||
SSECustomerKeyMD5 *string
|
||||
|
||||
noSmithyDocumentSerde
|
||||
@@ -190,52 +231,48 @@ 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. When using this action with
|
||||
// an access point, 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. 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.
|
||||
// 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).
|
||||
// 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
|
||||
// present if it was uploaded with the object. With multipart uploads, this may not
|
||||
// be a checksum value of the object. 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)
|
||||
// present if it was uploaded with the object. When you use an API operation on an
|
||||
// object that was uploaded using multipart uploads, this value may not be a direct
|
||||
// checksum value of the full object. Instead, it's a calculation based on the
|
||||
// checksum values of each individual part. For more information about how
|
||||
// checksums are calculated with multipart uploads, see Checking object integrity (https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html#large-object-checksums)
|
||||
// in the Amazon S3 User Guide.
|
||||
ChecksumCRC32 *string
|
||||
|
||||
// The base64-encoded, 32-bit CRC32C checksum of the object. This will only be
|
||||
// present if it was uploaded with the object. With multipart uploads, this may not
|
||||
// be a checksum value of the object. 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)
|
||||
// present if it was uploaded with the object. When you use an API operation on an
|
||||
// object that was uploaded using multipart uploads, this value may not be a direct
|
||||
// checksum value of the full object. Instead, it's a calculation based on the
|
||||
// checksum values of each individual part. For more information about how
|
||||
// checksums are calculated with multipart uploads, see Checking object integrity (https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html#large-object-checksums)
|
||||
// in the Amazon S3 User Guide.
|
||||
ChecksumCRC32C *string
|
||||
|
||||
// The base64-encoded, 160-bit SHA-1 digest of the object. This will only be
|
||||
// present if it was uploaded with the object. With multipart uploads, this may not
|
||||
// be a checksum value of the object. 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)
|
||||
// present if it was uploaded with the object. When you use the API operation on an
|
||||
// object that was uploaded using multipart uploads, this value may not be a direct
|
||||
// checksum value of the full object. Instead, it's a calculation based on the
|
||||
// checksum values of each individual part. For more information about how
|
||||
// checksums are calculated with multipart uploads, see Checking object integrity (https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html#large-object-checksums)
|
||||
// in the Amazon S3 User Guide.
|
||||
ChecksumSHA1 *string
|
||||
|
||||
// The base64-encoded, 256-bit SHA-256 digest of the object. This will only be
|
||||
// present if it was uploaded with the object. With multipart uploads, this may not
|
||||
// be a checksum value of the object. 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)
|
||||
// present if it was uploaded with the object. When you use an API operation on an
|
||||
// object that was uploaded using multipart uploads, this value may not be a direct
|
||||
// checksum value of the full object. Instead, it's a calculation based on the
|
||||
// checksum values of each individual part. For more information about how
|
||||
// checksums are calculated with multipart uploads, see Checking object integrity (https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html#large-object-checksums)
|
||||
// in the Amazon S3 User Guide.
|
||||
ChecksumSHA256 *string
|
||||
|
||||
@@ -251,6 +288,7 @@ type CompleteMultipartUploadOutput struct {
|
||||
|
||||
// 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
|
||||
|
||||
// The object key of the newly created object.
|
||||
@@ -260,19 +298,21 @@ type CompleteMultipartUploadOutput struct {
|
||||
Location *string
|
||||
|
||||
// If present, indicates that the requester was successfully charged for the
|
||||
// request.
|
||||
// request. This functionality is not supported for directory buckets.
|
||||
RequestCharged types.RequestCharged
|
||||
|
||||
// If present, specifies the ID of the Key Management Service (KMS) symmetric
|
||||
// encryption customer managed key that was used for the object.
|
||||
// If present, indicates the ID of the Key Management Service (KMS) symmetric
|
||||
// encryption customer managed key that was used for the object. This functionality
|
||||
// is not supported for directory buckets.
|
||||
SSEKMSKeyId *string
|
||||
|
||||
// The server-side encryption algorithm used when storing this object in Amazon S3
|
||||
// (for example, AES256 , aws:kms ).
|
||||
// (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.
|
||||
// turned on. This functionality is not supported for directory buckets.
|
||||
VersionId *string
|
||||
|
||||
// Metadata pertaining to the operation's result.
|
||||
@@ -336,6 +376,9 @@ func (c *Client) addOperationCompleteMultipartUploadMiddlewares(stack *middlewar
|
||||
if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addPutBucketContextMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addOpCompleteMultipartUploadValidationMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
+411
-228
@@ -10,6 +10,7 @@ import (
|
||||
s3cust "github.com/aws/aws-sdk-go-v2/service/s3/internal/customizations"
|
||||
"github.com/aws/aws-sdk-go-v2/service/s3/types"
|
||||
"github.com/aws/smithy-go/middleware"
|
||||
"github.com/aws/smithy-go/ptr"
|
||||
smithyhttp "github.com/aws/smithy-go/transport/http"
|
||||
"time"
|
||||
)
|
||||
@@ -20,135 +21,89 @@ import (
|
||||
// object greater than 5 GB, you must use the multipart upload Upload Part - Copy
|
||||
// (UploadPartCopy) API. For more information, see Copy Object Using the REST
|
||||
// Multipart Upload API (https://docs.aws.amazon.com/AmazonS3/latest/dev/CopyingObjctsUsingRESTMPUapi.html)
|
||||
// . All copy requests must be authenticated. Additionally, you must have read
|
||||
// access to the source object and write access to the destination bucket. For more
|
||||
// information, see REST Authentication (https://docs.aws.amazon.com/AmazonS3/latest/dev/RESTAuthentication.html)
|
||||
// . Both the Region that you want to copy the object from and the Region that you
|
||||
// want to copy the object to must be enabled for your account. A copy request
|
||||
// might return an error when Amazon S3 receives the copy request or while Amazon
|
||||
// S3 is copying the files. If the error occurs before the copy action starts, you
|
||||
// receive a standard Amazon S3 error. If the error occurs during the copy
|
||||
// operation, the error response is embedded in the 200 OK response. This means
|
||||
// that a 200 OK response can contain either a success or an error. If you call
|
||||
// the S3 API 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 throws an
|
||||
// exception (or, for the SDKs that don't use exceptions, they return the error).
|
||||
// If the copy is successful, you receive a response with information about the
|
||||
// copied object. If the request is an HTTP 1.1 request, the response is chunk
|
||||
// encoded. If it were not, it would not contain the content-length, and you would
|
||||
// need to read the entire body. The copy request charge is based on the storage
|
||||
// class and Region that you specify for the destination object. The request can
|
||||
// also result in a data retrieval charge for the source if the source storage
|
||||
// class bills for data retrieval. For pricing information, see Amazon S3 pricing (http://aws.amazon.com/s3/pricing/)
|
||||
// . Amazon S3 transfer acceleration does not support cross-Region copies. If you
|
||||
// request a cross-Region copy using a transfer acceleration endpoint, you get a
|
||||
// 400 Bad Request error. For more information, see Transfer Acceleration (https://docs.aws.amazon.com/AmazonS3/latest/dev/transfer-acceleration.html)
|
||||
// . Metadata When copying an object, you can preserve all metadata (the default)
|
||||
// or specify new metadata. However, the access control list (ACL) is not preserved
|
||||
// and is set to private for the user making the request. To override the default
|
||||
// ACL setting, specify a new ACL when generating a copy request. For more
|
||||
// information, see Using ACLs (https://docs.aws.amazon.com/AmazonS3/latest/dev/S3_ACLs_UsingACLs.html)
|
||||
// . To specify whether you want the object metadata copied from the source object
|
||||
// or replaced with metadata provided in the request, you can optionally add the
|
||||
// x-amz-metadata-directive header. When you grant permissions, you can use the
|
||||
// s3:x-amz-metadata-directive condition key to enforce certain metadata behavior
|
||||
// when objects are uploaded. For more information, see Specifying Conditions in a
|
||||
// Policy (https://docs.aws.amazon.com/AmazonS3/latest/dev/amazon-s3-policy-keys.html)
|
||||
// in the Amazon S3 User Guide. For a complete list of Amazon S3-specific condition
|
||||
// keys, see Actions, Resources, and Condition Keys for Amazon S3 (https://docs.aws.amazon.com/AmazonS3/latest/dev/list_amazons3.html)
|
||||
// . x-amz-website-redirect-location is unique to each object and must be
|
||||
// specified in the request headers to copy the value. x-amz-copy-source-if Headers
|
||||
// To only copy an object under certain conditions, such as whether the Etag
|
||||
// matches or whether the object was modified before or after a specified date, use
|
||||
// the following request parameters:
|
||||
// - x-amz-copy-source-if-match
|
||||
// - x-amz-copy-source-if-none-match
|
||||
// - x-amz-copy-source-if-unmodified-since
|
||||
// - x-amz-copy-source-if-modified-since
|
||||
// . You can copy individual objects between general purpose buckets, between
|
||||
// directory buckets, and between general purpose buckets and directory buckets.
|
||||
// Directory buckets - For directory buckets, you must make requests for this API
|
||||
// operation to the Zonal endpoint. These endpoints support virtual-hosted-style
|
||||
// requests in the format
|
||||
// https://bucket_name.s3express-az_id.region.amazonaws.com/key-name . Path-style
|
||||
// requests are not supported. For more information, see Regional and Zonal
|
||||
// endpoints (https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-express-Regions-and-Zones.html)
|
||||
// in the Amazon S3 User Guide. Both the Region that you want to copy the object
|
||||
// from and the Region that you want to copy the object to must be enabled for your
|
||||
// account. Amazon S3 transfer acceleration does not support cross-Region copies.
|
||||
// If you request a cross-Region copy using a transfer acceleration endpoint, you
|
||||
// get a 400 Bad Request error. For more information, see Transfer Acceleration (https://docs.aws.amazon.com/AmazonS3/latest/dev/transfer-acceleration.html)
|
||||
// . Authentication and authorization All CopyObject requests must be
|
||||
// authenticated and signed by using IAM credentials (access key ID and secret
|
||||
// access key for the IAM identities). All headers with the x-amz- prefix,
|
||||
// including x-amz-copy-source , must be signed. For more information, see REST
|
||||
// Authentication (https://docs.aws.amazon.com/AmazonS3/latest/dev/RESTAuthentication.html)
|
||||
// . Directory buckets - You must use the IAM credentials to authenticate and
|
||||
// authorize your access to the CopyObject API operation, instead of using the
|
||||
// temporary security credentials through the CreateSession API operation. Amazon
|
||||
// Web Services CLI or SDKs handles authentication and authorization on your
|
||||
// behalf. Permissions You must have read access to the source object and write
|
||||
// access to the destination bucket.
|
||||
// - General purpose bucket permissions - You must have permissions in an IAM
|
||||
// policy based on the source and destination bucket types in a CopyObject
|
||||
// operation.
|
||||
// - If the source object is in a general purpose bucket, you must have
|
||||
// s3:GetObject permission to read the source object that is being copied.
|
||||
// - If the destination bucket is a general purpose bucket, you must have
|
||||
// s3:PubObject permission to write the object copy to the destination bucket.
|
||||
// - Directory bucket permissions - You must have permissions in a bucket policy
|
||||
// or an IAM identity-based policy based on the source and destination bucket types
|
||||
// in a CopyObject operation.
|
||||
// - If the source object that you want to copy is in a directory bucket, you
|
||||
// must have the s3express:CreateSession permission in the Action element of a
|
||||
// policy to read the object. By default, the session is in the ReadWrite mode.
|
||||
// If you want to restrict the access, you can explicitly set the
|
||||
// s3express:SessionMode condition key to ReadOnly on the copy source bucket.
|
||||
// - If the copy destination is a directory bucket, you must have the
|
||||
// s3express:CreateSession permission in the Action element of a policy to write
|
||||
// the object to the destination. The s3express:SessionMode condition key can't
|
||||
// be set to ReadOnly on the copy destination bucket. For example policies, see
|
||||
// Example bucket policies for S3 Express One Zone (https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-express-security-iam-example-bucket-policies.html)
|
||||
// and Amazon Web Services Identity and Access Management (IAM) identity-based
|
||||
// policies for S3 Express One Zone (https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-express-security-iam-identity-policies.html)
|
||||
// in the Amazon S3 User Guide.
|
||||
//
|
||||
// If both the x-amz-copy-source-if-match and x-amz-copy-source-if-unmodified-since
|
||||
// headers are present in the request and evaluate as follows, Amazon S3 returns
|
||||
// 200 OK and copies the data:
|
||||
// - x-amz-copy-source-if-match condition evaluates to true
|
||||
// - x-amz-copy-source-if-unmodified-since condition evaluates to false
|
||||
// Response and special errors When the request is an HTTP 1.1 request, the
|
||||
// response is chunk encoded. When the request is not an HTTP 1.1 request, the
|
||||
// response would not contain the Content-Length . You always need to read the
|
||||
// entire response body to check if the copy succeeds. to keep the connection alive
|
||||
// while we copy the data.
|
||||
// - If the copy is successful, you receive a response with information about
|
||||
// the copied object.
|
||||
// - A copy request might return an error when Amazon S3 receives the copy
|
||||
// request or while Amazon S3 is copying the files. A 200 OK response can contain
|
||||
// either a success or an error.
|
||||
// - If the error occurs before the copy action starts, you receive a standard
|
||||
// Amazon S3 error.
|
||||
// - If the error occurs during the copy operation, the error response is
|
||||
// embedded in the 200 OK response. For example, in a cross-region copy, you may
|
||||
// encounter throttling and receive a 200 OK response. For more information, see
|
||||
// Resolve the Error 200 response when copying objects to Amazon S3 . The 200 OK
|
||||
// status code means the copy was accepted, but it doesn't mean the copy is
|
||||
// complete. Another example is when you disconnect from Amazon S3 before the copy
|
||||
// is complete, Amazon S3 might cancel the copy and you may receive a 200 OK
|
||||
// response. You must stay connected to Amazon S3 until the entire response is
|
||||
// successfully received and processed. If you call this API operation directly,
|
||||
// make sure to design your application to parse the content of the response and
|
||||
// handle it appropriately. If you use Amazon Web Services SDKs, SDKs handle this
|
||||
// condition. The SDKs detect the embedded error and apply error handling per your
|
||||
// configuration settings (including automatically retrying the request as
|
||||
// appropriate). If the condition persists, the SDKs throw an exception (or, for
|
||||
// the SDKs that don't use exceptions, they return an error).
|
||||
//
|
||||
// If both the x-amz-copy-source-if-none-match and
|
||||
// x-amz-copy-source-if-modified-since headers are present in the request and
|
||||
// evaluate as follows, Amazon S3 returns the 412 Precondition Failed response
|
||||
// code:
|
||||
// - x-amz-copy-source-if-none-match condition evaluates to false
|
||||
// - x-amz-copy-source-if-modified-since condition evaluates to true
|
||||
//
|
||||
// All headers with the x-amz- prefix, including x-amz-copy-source , must be
|
||||
// signed. Server-side encryption Amazon S3 automatically encrypts all new objects
|
||||
// that are copied to an S3 bucket. When copying an object, if you don't specify
|
||||
// encryption information in your copy request, the encryption setting of the
|
||||
// target object is set to the default encryption configuration of the destination
|
||||
// bucket. By default, all buckets have a base level of encryption configuration
|
||||
// that uses server-side encryption with Amazon S3 managed keys (SSE-S3). If the
|
||||
// destination bucket has a default encryption configuration that uses server-side
|
||||
// encryption with Key Management Service (KMS) keys (SSE-KMS), dual-layer
|
||||
// server-side encryption with Amazon Web Services KMS keys (DSSE-KMS), or
|
||||
// server-side encryption with customer-provided encryption keys (SSE-C), Amazon S3
|
||||
// uses the corresponding KMS key, or a customer-provided key to encrypt the target
|
||||
// object copy. When you perform a CopyObject operation, if you want to use a
|
||||
// different type of encryption setting for the target object, you can use other
|
||||
// appropriate encryption-related headers to encrypt the target object with a KMS
|
||||
// key, an Amazon S3 managed key, or a customer-provided key. With server-side
|
||||
// encryption, Amazon S3 encrypts your data as it writes your data to disks in its
|
||||
// data centers and decrypts the data when you access it. If the encryption setting
|
||||
// in your request is different from the default encryption configuration of the
|
||||
// destination bucket, the encryption setting in your request takes precedence. If
|
||||
// the source object for the copy is stored in Amazon S3 using SSE-C, you must
|
||||
// provide the necessary encryption information in your request so that Amazon S3
|
||||
// can decrypt the object for copying. For more information about server-side
|
||||
// encryption, see Using Server-Side Encryption (https://docs.aws.amazon.com/AmazonS3/latest/dev/serv-side-encryption.html)
|
||||
// . If a target object uses SSE-KMS, you can enable an S3 Bucket Key for the
|
||||
// object. For more information, see Amazon S3 Bucket Keys (https://docs.aws.amazon.com/AmazonS3/latest/dev/bucket-key.html)
|
||||
// in the Amazon S3 User Guide. Access Control List (ACL)-Specific Request Headers
|
||||
// When copying an object, you can optionally use headers to grant ACL-based
|
||||
// permissions. By default, all objects are private. Only the owner has full access
|
||||
// control. When adding a new object, you can grant permissions to individual
|
||||
// Amazon Web Services accounts or to predefined groups that are defined by Amazon
|
||||
// S3. These permissions are then added to the ACL on the object. For more
|
||||
// information, see Access Control List (ACL) Overview (https://docs.aws.amazon.com/AmazonS3/latest/dev/acl-overview.html)
|
||||
// and Managing ACLs Using the REST API (https://docs.aws.amazon.com/AmazonS3/latest/dev/acl-using-rest-api.html)
|
||||
// . If the bucket that you're copying objects to uses the bucket owner enforced
|
||||
// setting for S3 Object Ownership, ACLs are disabled and no longer affect
|
||||
// permissions. Buckets that use this setting only accept PUT requests that don't
|
||||
// specify an ACL or PUT requests that specify bucket owner full control ACLs,
|
||||
// such as the bucket-owner-full-control canned ACL or an equivalent form of this
|
||||
// ACL expressed in the XML format. For more information, see Controlling
|
||||
// ownership of objects and disabling ACLs (https://docs.aws.amazon.com/AmazonS3/latest/userguide/about-object-ownership.html)
|
||||
// in the Amazon S3 User Guide. If your bucket uses the bucket owner enforced
|
||||
// setting for Object Ownership, all objects written to the bucket by any account
|
||||
// will be owned by the bucket owner. Checksums When copying an object, if it has a
|
||||
// checksum, that checksum will be copied to the new object by default. When you
|
||||
// copy the object over, you can optionally specify a different checksum algorithm
|
||||
// to use with the x-amz-checksum-algorithm header. Storage Class Options You can
|
||||
// use the CopyObject action to change the storage class of an object that is
|
||||
// already stored in Amazon S3 by using the StorageClass parameter. For more
|
||||
// information, see Storage Classes (https://docs.aws.amazon.com/AmazonS3/latest/dev/storage-class-intro.html)
|
||||
// in the Amazon S3 User Guide. If the source object's storage class is GLACIER or
|
||||
// DEEP_ARCHIVE, or the object's storage class is INTELLIGENT_TIERING and it's S3
|
||||
// Intelligent-Tiering access tier (https://docs.aws.amazon.com/AmazonS3/latest/userguide/intelligent-tiering-overview.html#intel-tiering-tier-definition)
|
||||
// is Archive Access or Deep Archive Access, you must restore a copy of this object
|
||||
// before you can use it as a source object for the copy operation. For more
|
||||
// information, see RestoreObject (https://docs.aws.amazon.com/AmazonS3/latest/API/API_RestoreObject.html)
|
||||
// . For more information, see Copying Objects (https://docs.aws.amazon.com/AmazonS3/latest/dev/CopyingObjectsExamples.html)
|
||||
// . Versioning By default, x-amz-copy-source header identifies the current
|
||||
// version of an object to copy. If the current version is a delete marker, Amazon
|
||||
// S3 behaves as if the object was deleted. To copy a different version, use the
|
||||
// versionId subresource. If you enable versioning on the target bucket, Amazon S3
|
||||
// generates a unique version ID for the object being copied. This version ID is
|
||||
// different from the version ID of the source object. Amazon S3 returns the
|
||||
// version ID of the copied object in the x-amz-version-id response header in the
|
||||
// response. If you do not enable versioning or suspend it on the target bucket,
|
||||
// the version ID that Amazon S3 generates is always null. The following operations
|
||||
// are related to CopyObject :
|
||||
// Charge The copy request charge is based on the storage class and Region that
|
||||
// you specify for the destination object. The request can also result in a data
|
||||
// retrieval charge for the source if the source storage class bills for data
|
||||
// retrieval. For pricing information, see Amazon S3 pricing (http://aws.amazon.com/s3/pricing/)
|
||||
// . HTTP Host header syntax Directory buckets - The HTTP Host header syntax is
|
||||
// Bucket_name.s3express-az_id.region.amazonaws.com . The following operations are
|
||||
// related to CopyObject :
|
||||
// - PutObject (https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutObject.html)
|
||||
// - GetObject (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetObject.html)
|
||||
func (c *Client) CopyObject(ctx context.Context, params *CopyObjectInput, optFns ...func(*Options)) (*CopyObjectOutput, error) {
|
||||
@@ -168,16 +123,26 @@ func (c *Client) CopyObject(ctx context.Context, params *CopyObjectInput, optFns
|
||||
|
||||
type CopyObjectInput struct {
|
||||
|
||||
// The name of the destination bucket. When using this action with an access
|
||||
// point, 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. 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 destination bucket. Directory buckets - When you use this
|
||||
// operation with a directory bucket, you must use virtual-hosted-style requests in
|
||||
// the format Bucket_name.s3express-az_id.region.amazonaws.com . Path-style
|
||||
// requests are not supported. Directory bucket names must be unique in the chosen
|
||||
// Availability Zone. Bucket names must follow the format
|
||||
// bucket_base_name--az-id--x-s3 (for example, DOC-EXAMPLE-BUCKET--usw2-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
|
||||
// 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
|
||||
@@ -187,35 +152,52 @@ type CopyObjectInput struct {
|
||||
// This member is required.
|
||||
Bucket *string
|
||||
|
||||
// Specifies the source object for the copy operation. You specify the value in
|
||||
// one of two formats, depending on whether you want to access the source object
|
||||
// through an access point (https://docs.aws.amazon.com/AmazonS3/latest/userguide/access-points.html)
|
||||
// Specifies the source object for the copy operation. The source object can be up
|
||||
// to 5 GB. If the source object is an object that was uploaded by using a
|
||||
// multipart upload, the object copy will be a single part object after the source
|
||||
// object is copied to the destination bucket. You specify the value of the copy
|
||||
// source in one of two formats, depending on whether you want to access the source
|
||||
// object through an access point (https://docs.aws.amazon.com/AmazonS3/latest/userguide/access-points.html)
|
||||
// :
|
||||
// - For objects not accessed through an access point, specify the name of the
|
||||
// source bucket and the key of the source object, separated by a slash (/). For
|
||||
// example, to copy the object reports/january.pdf from the bucket
|
||||
// awsexamplebucket , use awsexamplebucket/reports/january.pdf . The value must
|
||||
// be URL-encoded.
|
||||
// example, to copy the object reports/january.pdf from the general purpose
|
||||
// bucket awsexamplebucket , use awsexamplebucket/reports/january.pdf . The value
|
||||
// must be URL-encoded. To copy the object reports/january.pdf from the directory
|
||||
// bucket awsexamplebucket--use1-az5--x-s3 , use
|
||||
// awsexamplebucket--use1-az5--x-s3/reports/january.pdf . The value must be
|
||||
// URL-encoded.
|
||||
// - For objects accessed through access points, specify the Amazon Resource
|
||||
// Name (ARN) of the object as accessed through the access point, in the format
|
||||
// arn:aws:s3:::accesspoint//object/ . For example, to copy the object
|
||||
// reports/january.pdf through access point my-access-point owned by account
|
||||
// 123456789012 in Region us-west-2 , use the URL encoding of
|
||||
// arn:aws:s3:us-west-2:123456789012:accesspoint/my-access-point/object/reports/january.pdf
|
||||
// . The value must be URL encoded. Amazon S3 supports copy operations using access
|
||||
// points only when the source and destination buckets are in the same Amazon Web
|
||||
// Services Region. Alternatively, for objects accessed through Amazon S3 on
|
||||
// Outposts, specify the ARN of the object as accessed in the format
|
||||
// arn:aws:s3-outposts:::outpost//object/ . For example, to copy the object
|
||||
// reports/january.pdf through outpost my-outpost owned by account 123456789012
|
||||
// in Region us-west-2 , use the URL encoding of
|
||||
// . The value must be URL encoded.
|
||||
// - Amazon S3 supports copy operations using Access points only when the source
|
||||
// and destination buckets are in the same Amazon Web Services Region.
|
||||
// - Access points are not supported by directory buckets. Alternatively, for
|
||||
// objects accessed through Amazon S3 on Outposts, specify the ARN of the object as
|
||||
// accessed in the format arn:aws:s3-outposts:::outpost//object/ . For example,
|
||||
// to copy the object reports/january.pdf through outpost my-outpost owned by
|
||||
// account 123456789012 in Region us-west-2 , use the URL encoding of
|
||||
// arn:aws:s3-outposts:us-west-2:123456789012:outpost/my-outpost/object/reports/january.pdf
|
||||
// . The value must be URL-encoded.
|
||||
// To copy a specific version of an object, append ?versionId= to the value (for
|
||||
// example,
|
||||
// If your source bucket versioning is enabled, the x-amz-copy-source header by
|
||||
// default identifies the current version of an object to copy. If the current
|
||||
// version is a delete marker, Amazon S3 behaves as if the object was deleted. To
|
||||
// copy a different version, use the versionId query parameter. Specifically,
|
||||
// append ?versionId= to the value (for example,
|
||||
// awsexamplebucket/reports/january.pdf?versionId=QUpfdndhfd8438MNFDN93jdnJFkdmqnh893
|
||||
// ). If you don't specify a version ID, Amazon S3 copies the latest version of the
|
||||
// source object.
|
||||
// source object. If you enable versioning on the destination bucket, Amazon S3
|
||||
// generates a unique version ID for the copied object. This version ID is
|
||||
// different from the version ID of the source object. Amazon S3 returns the
|
||||
// version ID of the copied object in the x-amz-version-id response header in the
|
||||
// response. If you do not enable versioning or suspend it on the destination
|
||||
// bucket, the version ID that Amazon S3 generates in the x-amz-version-id
|
||||
// response header is always null. Directory buckets - S3 Versioning isn't enabled
|
||||
// and supported for directory buckets.
|
||||
//
|
||||
// This member is required.
|
||||
CopySource *string
|
||||
@@ -225,139 +207,230 @@ type CopyObjectInput struct {
|
||||
// This member is required.
|
||||
Key *string
|
||||
|
||||
// The canned ACL to apply to the object. This action is not supported by Amazon
|
||||
// S3 on Outposts.
|
||||
// The canned access control list (ACL) to apply to the object. When you copy an
|
||||
// object, the ACL metadata is not preserved and is set to private by default.
|
||||
// Only the owner has full access control. To override the default ACL setting,
|
||||
// specify a new ACL when you generate a copy request. For more information, see
|
||||
// Using ACLs (https://docs.aws.amazon.com/AmazonS3/latest/dev/S3_ACLs_UsingACLs.html)
|
||||
// . If the destination bucket that you're copying objects to uses the bucket owner
|
||||
// enforced setting for S3 Object Ownership, ACLs are disabled and no longer affect
|
||||
// permissions. Buckets that use this setting only accept PUT requests that don't
|
||||
// specify an ACL or PUT requests that specify bucket owner full control ACLs,
|
||||
// such as the bucket-owner-full-control canned ACL or an equivalent form of this
|
||||
// ACL expressed in the XML format. For more information, see Controlling
|
||||
// ownership of objects and disabling ACLs (https://docs.aws.amazon.com/AmazonS3/latest/userguide/about-object-ownership.html)
|
||||
// in the Amazon S3 User Guide.
|
||||
// - If your destination bucket uses the bucket owner enforced setting for
|
||||
// Object Ownership, all objects written to the bucket by any account will be owned
|
||||
// by the bucket owner.
|
||||
// - This functionality is not supported for directory buckets.
|
||||
// - This functionality is not supported for Amazon S3 on Outposts.
|
||||
ACL 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).
|
||||
// If a target object uses SSE-KMS, you can enable an S3 Bucket Key for the object.
|
||||
// Setting this header to true causes Amazon S3 to use an S3 Bucket Key for object
|
||||
// encryption with SSE-KMS. Specifying this header with a COPY action doesn’t
|
||||
// affect bucket-level settings for S3 Bucket Key.
|
||||
// affect bucket-level settings for S3 Bucket Key. For more information, see
|
||||
// Amazon S3 Bucket Keys (https://docs.aws.amazon.com/AmazonS3/latest/dev/bucket-key.html)
|
||||
// in the Amazon S3 User Guide. This functionality is not supported when the
|
||||
// destination bucket is a directory bucket.
|
||||
BucketKeyEnabled *bool
|
||||
|
||||
// Specifies caching behavior along the request/reply chain.
|
||||
// Specifies the caching behavior along the request/reply chain.
|
||||
CacheControl *string
|
||||
|
||||
// Indicates the algorithm 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.
|
||||
// Indicates the algorithm that you want Amazon S3 to use to create the checksum
|
||||
// for the object. For more information, see Checking object integrity (https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html)
|
||||
// in the Amazon S3 User Guide. When you copy an object, if the source object has a
|
||||
// checksum, that checksum value will be copied to the new object by default. If
|
||||
// the CopyObject request does not include this x-amz-checksum-algorithm header,
|
||||
// the checksum algorithm will be copied from the source object to the destination
|
||||
// object (if it's present on the source object). You can optionally specify a
|
||||
// different checksum algorithm to use with the x-amz-checksum-algorithm header.
|
||||
// Unrecognized or unsupported values will respond with the HTTP status code 400
|
||||
// Bad Request . For directory buckets, when you use Amazon Web Services SDKs,
|
||||
// CRC32 is the default checksum algorithm that's used for performance.
|
||||
ChecksumAlgorithm types.ChecksumAlgorithm
|
||||
|
||||
// Specifies presentational information for the object.
|
||||
// Specifies presentational information for the object. Indicates whether an
|
||||
// object should be displayed in a web browser or downloaded as a file. It allows
|
||||
// specifying the desired filename for the downloaded file.
|
||||
ContentDisposition *string
|
||||
|
||||
// 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.
|
||||
// Content-Type header field. For directory buckets, only the aws-chunked value is
|
||||
// supported in this header field.
|
||||
ContentEncoding *string
|
||||
|
||||
// The language the content is in.
|
||||
ContentLanguage *string
|
||||
|
||||
// A standard MIME type describing the format of the object data.
|
||||
// A standard MIME type that describes the format of the object data.
|
||||
ContentType *string
|
||||
|
||||
// Copies the object if its entity tag (ETag) matches the specified tag.
|
||||
// Copies the object if its entity tag (ETag) matches the specified tag. If both
|
||||
// the x-amz-copy-source-if-match and x-amz-copy-source-if-unmodified-since
|
||||
// headers are present in the request and evaluate as follows, Amazon S3 returns
|
||||
// 200 OK and copies the data:
|
||||
// - x-amz-copy-source-if-match condition evaluates to true
|
||||
// - x-amz-copy-source-if-unmodified-since condition evaluates to false
|
||||
CopySourceIfMatch *string
|
||||
|
||||
// Copies the object if it has been modified since the specified time.
|
||||
// Copies the object if it has been modified since the specified time. If both the
|
||||
// x-amz-copy-source-if-none-match and x-amz-copy-source-if-modified-since headers
|
||||
// are present in the request and evaluate as follows, Amazon S3 returns the 412
|
||||
// Precondition Failed response code:
|
||||
// - x-amz-copy-source-if-none-match condition evaluates to false
|
||||
// - x-amz-copy-source-if-modified-since condition evaluates to true
|
||||
CopySourceIfModifiedSince *time.Time
|
||||
|
||||
// Copies the object if its entity tag (ETag) is different than the specified ETag.
|
||||
// Copies the object if its entity tag (ETag) is different than the specified
|
||||
// ETag. If both the x-amz-copy-source-if-none-match and
|
||||
// x-amz-copy-source-if-modified-since headers are present in the request and
|
||||
// evaluate as follows, Amazon S3 returns the 412 Precondition Failed response
|
||||
// code:
|
||||
// - x-amz-copy-source-if-none-match condition evaluates to false
|
||||
// - x-amz-copy-source-if-modified-since condition evaluates to true
|
||||
CopySourceIfNoneMatch *string
|
||||
|
||||
// Copies the object if it hasn't been modified since the specified time.
|
||||
// Copies the object if it hasn't been modified since the specified time. If both
|
||||
// the x-amz-copy-source-if-match and x-amz-copy-source-if-unmodified-since
|
||||
// headers are present in the request and evaluate as follows, Amazon S3 returns
|
||||
// 200 OK and copies the data:
|
||||
// - x-amz-copy-source-if-match condition evaluates to true
|
||||
// - x-amz-copy-source-if-unmodified-since condition evaluates to false
|
||||
CopySourceIfUnmodifiedSince *time.Time
|
||||
|
||||
// Specifies the algorithm to use when decrypting the source object (for example,
|
||||
// AES256).
|
||||
// AES256 ). If the source object for the copy is stored in Amazon S3 using SSE-C,
|
||||
// you must provide the necessary encryption information in your request so that
|
||||
// Amazon S3 can decrypt the object for copying. This functionality is not
|
||||
// supported when the source object is in a directory bucket.
|
||||
CopySourceSSECustomerAlgorithm *string
|
||||
|
||||
// Specifies the customer-provided encryption key for Amazon S3 to use to decrypt
|
||||
// the source object. The encryption key provided in this header must be one that
|
||||
// was used when the source object was created.
|
||||
// the source object. The encryption key provided in this header must be the same
|
||||
// one that was used when the source object was created. If the source object for
|
||||
// the copy is stored in Amazon S3 using SSE-C, you must provide the necessary
|
||||
// encryption information in your request so that Amazon S3 can decrypt the object
|
||||
// for copying. This functionality is not supported when the source object is in a
|
||||
// directory bucket.
|
||||
CopySourceSSECustomerKey *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.
|
||||
// encryption key was transmitted without error. If the source object for the copy
|
||||
// is stored in Amazon S3 using SSE-C, you must provide the necessary encryption
|
||||
// information in your request so that Amazon S3 can decrypt the object for
|
||||
// copying. This functionality is not supported when the source object is in a
|
||||
// directory bucket.
|
||||
CopySourceSSECustomerKeyMD5 *string
|
||||
|
||||
// The account ID of the expected destination bucket owner. If the destination
|
||||
// bucket is owned by a different account, the request fails with the HTTP status
|
||||
// code 403 Forbidden (access denied).
|
||||
// The account ID of the expected destination bucket owner. If the account ID that
|
||||
// you provide does not match the actual owner of the destination bucket, the
|
||||
// request fails with the HTTP status code 403 Forbidden (access denied).
|
||||
ExpectedBucketOwner *string
|
||||
|
||||
// The account ID of the expected source bucket owner. If the source bucket is
|
||||
// owned by a different account, the request fails with the HTTP status code 403
|
||||
// Forbidden (access denied).
|
||||
// The account ID of the expected source bucket owner. If the account ID that you
|
||||
// provide does not match the actual owner of the source bucket, the request fails
|
||||
// with the HTTP status code 403 Forbidden (access denied).
|
||||
ExpectedSourceBucketOwner *string
|
||||
|
||||
// The date and time at which the object is no longer cacheable.
|
||||
Expires *time.Time
|
||||
|
||||
// Gives the grantee READ, READ_ACP, and WRITE_ACP permissions on the object. This
|
||||
// action is not supported by Amazon S3 on Outposts.
|
||||
// Gives the grantee READ, READ_ACP, and WRITE_ACP permissions on the object.
|
||||
// - This functionality is not supported for directory buckets.
|
||||
// - This functionality is not supported for Amazon S3 on Outposts.
|
||||
GrantFullControl *string
|
||||
|
||||
// Allows grantee to read the object data and its metadata. This action is not
|
||||
// supported by Amazon S3 on Outposts.
|
||||
// Allows grantee to read the object data and its metadata.
|
||||
// - This functionality is not supported for directory buckets.
|
||||
// - This functionality is not supported for Amazon S3 on Outposts.
|
||||
GrantRead *string
|
||||
|
||||
// Allows grantee to read the object ACL. This action is not supported by Amazon
|
||||
// S3 on Outposts.
|
||||
// Allows grantee to read the object ACL.
|
||||
// - This functionality is not supported for directory buckets.
|
||||
// - This functionality is not supported for Amazon S3 on Outposts.
|
||||
GrantReadACP *string
|
||||
|
||||
// Allows grantee to write the ACL for the applicable object. This action is not
|
||||
// supported by Amazon S3 on Outposts.
|
||||
// Allows grantee to write the ACL for the applicable object.
|
||||
// - This functionality is not supported for directory buckets.
|
||||
// - This functionality is not supported for Amazon S3 on Outposts.
|
||||
GrantWriteACP *string
|
||||
|
||||
// A map of metadata to store with the object in S3.
|
||||
Metadata map[string]string
|
||||
|
||||
// Specifies whether the metadata is copied from the source object or replaced
|
||||
// with metadata provided in the request.
|
||||
// with metadata that's provided in the request. When copying an object, you can
|
||||
// preserve all metadata (the default) or specify new metadata. If this header
|
||||
// isn’t specified, COPY is the default behavior. General purpose bucket - For
|
||||
// general purpose buckets, when you grant permissions, you can use the
|
||||
// s3:x-amz-metadata-directive condition key to enforce certain metadata behavior
|
||||
// when objects are uploaded. For more information, see Amazon S3 condition key
|
||||
// examples (https://docs.aws.amazon.com/AmazonS3/latest/dev/amazon-s3-policy-keys.html)
|
||||
// in the Amazon S3 User Guide. x-amz-website-redirect-location is unique to each
|
||||
// object and is not copied when using the x-amz-metadata-directive header. To
|
||||
// copy the value, you must specify x-amz-website-redirect-location in the request
|
||||
// header.
|
||||
MetadataDirective types.MetadataDirective
|
||||
|
||||
// Specifies whether you want to apply a legal hold to the copied object.
|
||||
// Specifies whether you want to apply a legal hold to the object copy. This
|
||||
// functionality is not supported for directory buckets.
|
||||
ObjectLockLegalHoldStatus types.ObjectLockLegalHoldStatus
|
||||
|
||||
// The Object Lock mode that you want to apply to the copied object.
|
||||
// The Object Lock mode that you want to apply to the object copy. This
|
||||
// functionality is not supported for directory buckets.
|
||||
ObjectLockMode types.ObjectLockMode
|
||||
|
||||
// The date and time when you want the copied object's Object Lock to expire.
|
||||
// The date and time when you want the Object Lock of the object copy to expire.
|
||||
// This functionality is not supported for directory buckets.
|
||||
ObjectLockRetainUntilDate *time.Time
|
||||
|
||||
// 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 Amazon S3 bucket has Requester Pays enabled, the requester
|
||||
// will pay for corresponding charges to copy the object. For information about
|
||||
// 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.
|
||||
// in the Amazon S3 User Guide. This functionality is not supported for directory
|
||||
// buckets.
|
||||
RequestPayer types.RequestPayer
|
||||
|
||||
// Specifies the algorithm to use to when encrypting the object (for example,
|
||||
// AES256).
|
||||
// Specifies the algorithm to use when encrypting the object (for example, AES256
|
||||
// ). When you perform a CopyObject operation, if you want to use a different type
|
||||
// of encryption setting for the target object, you can specify appropriate
|
||||
// encryption-related headers to encrypt the target object with an Amazon S3
|
||||
// managed key, a KMS key, or a customer-provided key. If the encryption setting in
|
||||
// your request is different from the default encryption configuration of the
|
||||
// destination bucket, the encryption setting in your request takes precedence.
|
||||
// This functionality is not supported when the destination bucket is a directory
|
||||
// bucket.
|
||||
SSECustomerAlgorithm *string
|
||||
|
||||
// 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
|
||||
// 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.
|
||||
// x-amz-server-side-encryption-customer-algorithm header. This functionality is
|
||||
// not supported when the destination bucket is a directory bucket.
|
||||
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.
|
||||
// encryption key was transmitted without error. This functionality is not
|
||||
// supported when the destination bucket is a directory bucket.
|
||||
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 value must be explicitly
|
||||
// added to specify encryption context for CopyObject requests.
|
||||
// added to specify encryption context for CopyObject requests. This functionality
|
||||
// is not supported when the destination bucket is a directory bucket.
|
||||
SSEKMSEncryptionContext *string
|
||||
|
||||
// Specifies the KMS ID (Key ID, Key ARN, or Key Alias) to use for object
|
||||
@@ -365,35 +438,132 @@ type CopyObjectInput struct {
|
||||
// they're not made via SSL or using SigV4. For information about configuring any
|
||||
// of the officially supported Amazon Web Services SDKs and Amazon Web Services
|
||||
// CLI, see Specifying the Signature Version in Request Authentication (https://docs.aws.amazon.com/AmazonS3/latest/dev/UsingAWSSDK.html#specify-signature-version)
|
||||
// in the Amazon S3 User Guide.
|
||||
// in the Amazon S3 User Guide. This functionality is not supported when the
|
||||
// destination bucket is a directory bucket.
|
||||
SSEKMSKeyId *string
|
||||
|
||||
// The server-side encryption algorithm used when storing this object in Amazon S3
|
||||
// (for example, AES256 , aws:kms , aws:kms:dsse ).
|
||||
// (for example, AES256 , aws:kms , aws:kms:dsse ). Unrecognized or unsupported
|
||||
// values won’t write a destination object and will receive a 400 Bad Request
|
||||
// response. Amazon S3 automatically encrypts all new objects that are copied to an
|
||||
// S3 bucket. When copying an object, if you don't specify encryption information
|
||||
// in your copy request, the encryption setting of the target object is set to the
|
||||
// default encryption configuration of the destination bucket. By default, all
|
||||
// buckets have a base level of encryption configuration that uses server-side
|
||||
// encryption with Amazon S3 managed keys (SSE-S3). If the destination bucket has a
|
||||
// default encryption configuration that uses server-side encryption with Key
|
||||
// Management Service (KMS) keys (SSE-KMS), dual-layer server-side encryption with
|
||||
// Amazon Web Services KMS keys (DSSE-KMS), or server-side encryption with
|
||||
// customer-provided encryption keys (SSE-C), Amazon S3 uses the corresponding KMS
|
||||
// key, or a customer-provided key to encrypt the target object copy. When you
|
||||
// perform a CopyObject operation, if you want to use a different type of
|
||||
// encryption setting for the target object, you can specify appropriate
|
||||
// encryption-related headers to encrypt the target object with an Amazon S3
|
||||
// managed key, a KMS key, or a customer-provided key. If the encryption setting in
|
||||
// your request is different from the default encryption configuration of the
|
||||
// destination bucket, the encryption setting in your request takes precedence.
|
||||
// With server-side encryption, Amazon S3 encrypts your data as it writes your data
|
||||
// to disks in its data centers and decrypts the data when you access it. For more
|
||||
// information about server-side encryption, see Using Server-Side Encryption (https://docs.aws.amazon.com/AmazonS3/latest/dev/serv-side-encryption.html)
|
||||
// in the Amazon S3 User Guide. For directory buckets, only server-side encryption
|
||||
// with Amazon S3 managed keys (SSE-S3) ( AES256 ) is supported.
|
||||
ServerSideEncryption types.ServerSideEncryption
|
||||
|
||||
// If the x-amz-storage-class header is not used, the copied object will be stored
|
||||
// in the STANDARD Storage Class by default. The STANDARD storage class provides
|
||||
// high durability and high availability. Depending on performance needs, you can
|
||||
// specify a different Storage Class. Amazon S3 on Outposts only uses the OUTPOSTS
|
||||
// Storage Class. For more information, see Storage Classes (https://docs.aws.amazon.com/AmazonS3/latest/dev/storage-class-intro.html)
|
||||
// specify a different Storage Class.
|
||||
// - Directory buckets - For directory buckets, only the S3 Express One Zone
|
||||
// storage class is supported to store newly created objects. Unsupported storage
|
||||
// class values won't write a destination object and will respond with the HTTP
|
||||
// status code 400 Bad Request .
|
||||
// - Amazon S3 on Outposts - S3 on Outposts only uses the OUTPOSTS Storage Class.
|
||||
// You can use the CopyObject action to change the storage class of an object that
|
||||
// is already stored in Amazon S3 by using the x-amz-storage-class header. For
|
||||
// more information, see Storage Classes (https://docs.aws.amazon.com/AmazonS3/latest/dev/storage-class-intro.html)
|
||||
// in the Amazon S3 User Guide. Before using an object as a source object for the
|
||||
// copy operation, you must restore a copy of it if it meets any of the following
|
||||
// conditions:
|
||||
// - The storage class of the source object is GLACIER or DEEP_ARCHIVE .
|
||||
// - The storage class of the source object is INTELLIGENT_TIERING and it's S3
|
||||
// Intelligent-Tiering access tier (https://docs.aws.amazon.com/AmazonS3/latest/userguide/intelligent-tiering-overview.html#intel-tiering-tier-definition)
|
||||
// is Archive Access or Deep Archive Access .
|
||||
// For more information, see RestoreObject (https://docs.aws.amazon.com/AmazonS3/latest/API/API_RestoreObject.html)
|
||||
// and Copying Objects (https://docs.aws.amazon.com/AmazonS3/latest/dev/CopyingObjectsExamples.html)
|
||||
// in the Amazon S3 User Guide.
|
||||
StorageClass types.StorageClass
|
||||
|
||||
// The tag-set for the object destination object this value must be used in
|
||||
// conjunction with the TaggingDirective . The tag-set must be encoded as URL Query
|
||||
// parameters.
|
||||
// The tag-set for the object copy in the destination bucket. This value must be
|
||||
// used in conjunction with the x-amz-tagging-directive if you choose REPLACE for
|
||||
// the x-amz-tagging-directive . If you choose COPY for the x-amz-tagging-directive
|
||||
// , you don't need to set the x-amz-tagging header, because the tag-set will be
|
||||
// copied from the source object directly. The tag-set must be encoded as URL Query
|
||||
// parameters. The default value is the empty value. Directory buckets - For
|
||||
// directory buckets in a CopyObject operation, only the empty tag-set is
|
||||
// supported. Any requests that attempt to write non-empty tags into directory
|
||||
// buckets will receive a 501 Not Implemented status code. When the destination
|
||||
// bucket is a directory bucket, you will receive a 501 Not Implemented response
|
||||
// in any of the following situations:
|
||||
// - When you attempt to COPY the tag-set from an S3 source object that has
|
||||
// non-empty tags.
|
||||
// - When you attempt to REPLACE the tag-set of a source object and set a
|
||||
// non-empty value to x-amz-tagging .
|
||||
// - When you don't set the x-amz-tagging-directive header and the source object
|
||||
// has non-empty tags. This is because the default value of
|
||||
// x-amz-tagging-directive is COPY .
|
||||
// Because only the empty tag-set is supported for directory buckets in a
|
||||
// CopyObject operation, the following situations are allowed:
|
||||
// - When you attempt to COPY the tag-set from a directory bucket source object
|
||||
// that has no tags to a general purpose bucket. It copies an empty tag-set to the
|
||||
// destination object.
|
||||
// - When you attempt to REPLACE the tag-set of a directory bucket source object
|
||||
// and set the x-amz-tagging value of the directory bucket destination object to
|
||||
// empty.
|
||||
// - When you attempt to REPLACE the tag-set of a general purpose bucket source
|
||||
// object that has non-empty tags and set the x-amz-tagging value of the
|
||||
// directory bucket destination object to empty.
|
||||
// - When you attempt to REPLACE the tag-set of a directory bucket source object
|
||||
// and don't set the x-amz-tagging value of the directory bucket destination
|
||||
// object. This is because the default value of x-amz-tagging is the empty value.
|
||||
Tagging *string
|
||||
|
||||
// Specifies whether the object tag-set are copied from the source object or
|
||||
// replaced with tag-set provided in the request.
|
||||
// Specifies whether the object tag-set is copied from the source object or
|
||||
// replaced with the tag-set that's provided in the request. The default value is
|
||||
// COPY . Directory buckets - For directory buckets in a CopyObject operation,
|
||||
// only the empty tag-set is supported. Any requests that attempt to write
|
||||
// non-empty tags into directory buckets will receive a 501 Not Implemented status
|
||||
// code. When the destination bucket is a directory bucket, you will receive a 501
|
||||
// Not Implemented response in any of the following situations:
|
||||
// - When you attempt to COPY the tag-set from an S3 source object that has
|
||||
// non-empty tags.
|
||||
// - When you attempt to REPLACE the tag-set of a source object and set a
|
||||
// non-empty value to x-amz-tagging .
|
||||
// - When you don't set the x-amz-tagging-directive header and the source object
|
||||
// has non-empty tags. This is because the default value of
|
||||
// x-amz-tagging-directive is COPY .
|
||||
// Because only the empty tag-set is supported for directory buckets in a
|
||||
// CopyObject operation, the following situations are allowed:
|
||||
// - When you attempt to COPY the tag-set from a directory bucket source object
|
||||
// that has no tags to a general purpose bucket. It copies an empty tag-set to the
|
||||
// destination object.
|
||||
// - When you attempt to REPLACE the tag-set of a directory bucket source object
|
||||
// and set the x-amz-tagging value of the directory bucket destination object to
|
||||
// empty.
|
||||
// - When you attempt to REPLACE the tag-set of a general purpose bucket source
|
||||
// object that has non-empty tags and set the x-amz-tagging value of the
|
||||
// directory bucket destination object to empty.
|
||||
// - When you attempt to REPLACE the tag-set of a directory bucket source object
|
||||
// and don't set the x-amz-tagging value of the directory bucket destination
|
||||
// object. This is because the default value of x-amz-tagging is the empty value.
|
||||
TaggingDirective types.TaggingDirective
|
||||
|
||||
// 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 value is unique to each object
|
||||
// and is not copied when using the x-amz-metadata-directive header. Instead, you
|
||||
// may opt to provide this header in combination with the directive.
|
||||
// If the destination bucket is configured as a website, redirects requests for
|
||||
// this object copy to another object in the same bucket or to an external URL.
|
||||
// Amazon S3 stores the value of this header in the object metadata. This value is
|
||||
// unique to each object and is not copied when using the x-amz-metadata-directive
|
||||
// header. Instead, you may opt to provide this header in combination with the
|
||||
// x-amz-metadata-directive header. This functionality is not supported for
|
||||
// directory buckets.
|
||||
WebsiteRedirectLocation *string
|
||||
|
||||
noSmithyDocumentSerde
|
||||
@@ -401,52 +571,62 @@ type CopyObjectInput struct {
|
||||
|
||||
func (in *CopyObjectInput) bindEndpointParams(p *EndpointParameters) {
|
||||
p.Bucket = in.Bucket
|
||||
|
||||
p.DisableS3ExpressSessionAuth = ptr.Bool(true)
|
||||
}
|
||||
|
||||
type CopyObjectOutput struct {
|
||||
|
||||
// Indicates whether the copied object uses an S3 Bucket Key for server-side
|
||||
// encryption with Key Management Service (KMS) keys (SSE-KMS).
|
||||
// encryption with Key Management Service (KMS) keys (SSE-KMS). This functionality
|
||||
// is not supported for directory buckets.
|
||||
BucketKeyEnabled *bool
|
||||
|
||||
// Container for all response elements.
|
||||
CopyObjectResult *types.CopyObjectResult
|
||||
|
||||
// Version of the copied object in the destination bucket.
|
||||
// Version ID of the source object that was copied. This functionality is not
|
||||
// supported when the source object is in a directory bucket.
|
||||
CopySourceVersionId *string
|
||||
|
||||
// If the object expiration is configured, the response includes this header.
|
||||
// If the object expiration is configured, the response includes this header. This
|
||||
// functionality is not supported for directory buckets.
|
||||
Expiration *string
|
||||
|
||||
// If present, indicates that the requester was successfully charged for the
|
||||
// request.
|
||||
// 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 confirming the encryption
|
||||
// algorithm used.
|
||||
// requested, the response will include this header to confirm the encryption
|
||||
// algorithm that's used. This functionality is not supported for directory
|
||||
// buckets.
|
||||
SSECustomerAlgorithm *string
|
||||
|
||||
// If server-side encryption with a customer-provided encryption key was
|
||||
// requested, the response will include this header to provide round-trip message
|
||||
// integrity verification of the customer-provided encryption key.
|
||||
// requested, the response will include this header to provide the round-trip
|
||||
// message integrity verification of the customer-provided encryption key. This
|
||||
// functionality is not supported for directory buckets.
|
||||
SSECustomerKeyMD5 *string
|
||||
|
||||
// If present, specifies the Amazon Web Services KMS Encryption Context to use for
|
||||
// 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.
|
||||
// holding JSON with the encryption context key-value pairs. This functionality is
|
||||
// not supported for directory buckets.
|
||||
SSEKMSEncryptionContext *string
|
||||
|
||||
// If present, specifies the ID of the Key Management Service (KMS) symmetric
|
||||
// encryption customer managed key that was used for the object.
|
||||
// If present, indicates the ID of the Key Management Service (KMS) symmetric
|
||||
// encryption customer managed key that was used for the object. This functionality
|
||||
// is not supported for directory buckets.
|
||||
SSEKMSKeyId *string
|
||||
|
||||
// The server-side encryption algorithm used when storing this object in Amazon S3
|
||||
// (for example, AES256 , aws:kms , aws:kms:dsse ).
|
||||
// The server-side encryption algorithm used when you store this object in Amazon
|
||||
// S3 (for example, AES256 , aws:kms , aws:kms:dsse ). For directory buckets, only
|
||||
// server-side encryption with Amazon S3 managed keys (SSE-S3) ( AES256 ) is
|
||||
// supported.
|
||||
ServerSideEncryption types.ServerSideEncryption
|
||||
|
||||
// Version ID of the newly created copy.
|
||||
// Version ID of the newly created copy. This functionality is not supported for
|
||||
// directory buckets.
|
||||
VersionId *string
|
||||
|
||||
// Metadata pertaining to the operation's result.
|
||||
@@ -510,6 +690,9 @@ func (c *Client) addOperationCopyObjectMiddlewares(stack *middleware.Stack, opti
|
||||
if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addPutBucketContextMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addOpCopyObjectValidationMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
+106
-64
@@ -14,64 +14,80 @@ import (
|
||||
smithyhttp "github.com/aws/smithy-go/transport/http"
|
||||
)
|
||||
|
||||
// Creates a new S3 bucket. To create a bucket, you must register with Amazon S3
|
||||
// and have a valid Amazon Web Services Access Key ID to authenticate requests.
|
||||
// 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. Not every string is an acceptable bucket name. For
|
||||
// information about bucket naming restrictions, see Bucket naming rules (https://docs.aws.amazon.com/AmazonS3/latest/userguide/bucketnamingrules.html)
|
||||
// . If you want to create an Amazon S3 on Outposts bucket, see Create Bucket (https://docs.aws.amazon.com/AmazonS3/latest/API/API_control_CreateBucket.html)
|
||||
// . By default, the bucket is created in the US East (N. Virginia) Region. You can
|
||||
// optionally specify a Region in the request body. To constrain the bucket
|
||||
// creation to a specific Region, you can use LocationConstraint (https://docs.aws.amazon.com/AmazonS3/latest/API/API_CreateBucketConfiguration.html)
|
||||
// condition key. You might choose a Region to optimize latency, minimize costs, or
|
||||
// address regulatory requirements. For example, if you reside in Europe, you will
|
||||
// probably find it advantageous to create buckets in the Europe (Ireland) Region.
|
||||
// For more information, see Accessing a bucket (https://docs.aws.amazon.com/AmazonS3/latest/dev/UsingBucket.html#access-bucket-intro)
|
||||
// . If you send your create bucket request to the s3.amazonaws.com endpoint, the
|
||||
// request goes to the us-east-1 Region. Accordingly, 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)
|
||||
// . Permissions In addition to s3:CreateBucket , the following permissions are
|
||||
// required when your CreateBucket request includes specific headers:
|
||||
// - Access control lists (ACLs) - If your CreateBucket request specifies access
|
||||
// control list (ACL) permissions and the ACL is public-read, public-read-write,
|
||||
// authenticated-read, or if you specify access permissions explicitly through any
|
||||
// other ACL, both s3:CreateBucket and s3:PutBucketAcl permissions are needed. If
|
||||
// the ACL for the CreateBucket request is private or if the request doesn't
|
||||
// specify any ACLs, only s3:CreateBucket permission is needed.
|
||||
// - Object Lock - If ObjectLockEnabledForBucket is set to true in your
|
||||
// CreateBucket request, 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. 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. If you want to change the ObjectOwnership setting, you can use
|
||||
// the x-amz-object-ownership header in your CreateBucket request to set the
|
||||
// ObjectOwnership setting of your choice. For more information about S3 Object
|
||||
// Ownership, see Controlling object ownership (https://docs.aws.amazon.com/AmazonS3/latest/userguide/about-object-ownership.html)
|
||||
// you become the bucket owner. There are two types of buckets: general purpose
|
||||
// buckets and directory buckets. For more information about these bucket types,
|
||||
// see Creating, configuring, and working with Amazon S3 buckets (https://docs.aws.amazon.com/AmazonS3/latest/userguide/creating-buckets-s3.html)
|
||||
// in the Amazon S3 User Guide.
|
||||
// - General purpose buckets - If you send your CreateBucket request to the
|
||||
// s3.amazonaws.com global endpoint, the request goes to the us-east-1 Region. So
|
||||
// the signature calculations in Signature Version 4 must use us-east-1 as the
|
||||
// Region, even if the location constraint in the request specifies another Region
|
||||
// where the bucket is to be created. If you create a bucket in a Region other than
|
||||
// US East (N. Virginia), your application must be able to handle 307 redirect. For
|
||||
// more information, see Virtual hosting of buckets (https://docs.aws.amazon.com/AmazonS3/latest/dev/VirtualHosting.html)
|
||||
// in the Amazon S3 User Guide.
|
||||
// - S3 Block Public Access - If your specific use case requires granting public
|
||||
// access to your S3 resources, you can disable Block Public Access. 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. By default, all Block Public Access settings are enabled for new
|
||||
// buckets. To avoid inadvertent exposure of your resources, we recommend keeping
|
||||
// the S3 Block Public Access settings enabled. 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/about-object-ownership.html)
|
||||
// - 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.
|
||||
//
|
||||
// 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. The following operations are related to
|
||||
// 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.
|
||||
//
|
||||
// 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)
|
||||
@@ -92,36 +108,51 @@ func (c *Client) CreateBucket(ctx context.Context, params *CreateBucketInput, op
|
||||
|
||||
type CreateBucketInput struct {
|
||||
|
||||
// The name of the bucket to create.
|
||||
// The name of the bucket to create. General purpose buckets - For information
|
||||
// about bucket naming restrictions, see Bucket naming rules (https://docs.aws.amazon.com/AmazonS3/latest/userguide/bucketnamingrules.html)
|
||||
// in the Amazon S3 User Guide. Directory buckets - When you use this operation
|
||||
// with a directory bucket, you must use path-style requests in the format
|
||||
// https://s3express-control.region_code.amazonaws.com/bucket-name .
|
||||
// Virtual-hosted-style requests aren't supported. Directory bucket names must be
|
||||
// unique in the chosen Availability Zone. Bucket names must also follow the format
|
||||
// bucket_base_name--az_id--x-s3 (for example, DOC-EXAMPLE-BUCKET--usw2-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
|
||||
//
|
||||
// This member is required.
|
||||
Bucket *string
|
||||
|
||||
// The canned ACL to apply to the bucket.
|
||||
// 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.
|
||||
// bucket. This functionality is not supported for directory buckets.
|
||||
GrantFullControl *string
|
||||
|
||||
// Allows grantee to list the objects in the bucket.
|
||||
// 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.
|
||||
// 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.
|
||||
// objects. This functionality is not supported for directory buckets.
|
||||
GrantWrite *string
|
||||
|
||||
// Allows grantee to write the ACL for the applicable bucket.
|
||||
// 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.
|
||||
@@ -132,9 +163,16 @@ type CreateBucketInput struct {
|
||||
// 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 bucket owner full control ACLs, such as the
|
||||
// bucket-owner-full-control canned ACL or an equivalent form of this ACL expressed
|
||||
// in the XML format.
|
||||
// specify an ACL or specify bucket owner full control ACLs (such as the predefined
|
||||
// bucket-owner-full-control canned ACL or a custom ACL in XML format that grants
|
||||
// the same permissions). By default, ObjectOwnership is set to BucketOwnerEnforced
|
||||
// and ACLs are disabled. We recommend keeping ACLs disabled, except in uncommon
|
||||
// use cases where you must control access for each object individually. For more
|
||||
// information about S3 Object Ownership, see Controlling ownership of objects and
|
||||
// disabling ACLs for your bucket (https://docs.aws.amazon.com/AmazonS3/latest/userguide/about-object-ownership.html)
|
||||
// in the Amazon S3 User Guide. This functionality is not supported for directory
|
||||
// buckets. Directory buckets use the bucket owner enforced setting for S3 Object
|
||||
// Ownership.
|
||||
ObjectOwnership types.ObjectOwnership
|
||||
|
||||
noSmithyDocumentSerde
|
||||
@@ -142,6 +180,7 @@ type CreateBucketInput struct {
|
||||
|
||||
func (in *CreateBucketInput) bindEndpointParams(p *EndpointParameters) {
|
||||
p.Bucket = in.Bucket
|
||||
p.UseS3ExpressControlEndpoint = ptr.Bool(true)
|
||||
p.DisableAccessPoints = ptr.Bool(true)
|
||||
}
|
||||
|
||||
@@ -211,6 +250,9 @@ func (c *Client) addOperationCreateBucketMiddlewares(stack *middleware.Stack, op
|
||||
if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addPutBucketContextMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addOpCreateBucketValidationMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
+324
-212
@@ -21,97 +21,111 @@ import (
|
||||
// ). 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)
|
||||
// . If you have configured a lifecycle rule to abort incomplete multipart uploads,
|
||||
// the upload must complete 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)
|
||||
// . 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)
|
||||
// . 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)
|
||||
// . 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
|
||||
// stop charging you for storing them only after you either complete or abort a
|
||||
// multipart upload. Server-side encryption is for data encryption at rest. Amazon
|
||||
// S3 encrypts your data as it writes it to disks in its data centers and decrypts
|
||||
// it when you access it. Amazon S3 automatically encrypts all new objects that are
|
||||
// uploaded to an S3 bucket. When doing a multipart upload, if you don't specify
|
||||
// encryption information in your request, the encryption setting of the uploaded
|
||||
// parts is set to the default encryption configuration of the destination bucket.
|
||||
// By default, all buckets have a base level of encryption configuration that uses
|
||||
// server-side encryption with Amazon S3 managed keys (SSE-S3). If the destination
|
||||
// bucket has a default encryption configuration that uses server-side encryption
|
||||
// with an Key Management Service (KMS) key (SSE-KMS), or a customer-provided
|
||||
// encryption key (SSE-C), Amazon S3 uses the corresponding KMS key, or a
|
||||
// customer-provided key to encrypt the uploaded parts. When you perform a
|
||||
// CreateMultipartUpload operation, if you want to use a different type of
|
||||
// encryption setting for the uploaded parts, you can request that Amazon S3
|
||||
// encrypts the object with a KMS key, an Amazon S3 managed key, or a
|
||||
// customer-provided key. If the encryption setting in your request is different
|
||||
// from the default encryption configuration of the destination bucket, the
|
||||
// encryption setting in your request takes precedence. 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 request to initiate the upload
|
||||
// by using CreateMultipartUpload . You can request that Amazon S3 save the
|
||||
// uploaded parts encrypted with server-side encryption with an Amazon S3 managed
|
||||
// key (SSE-S3), an Key Management Service (KMS) key (SSE-KMS), or a
|
||||
// customer-provided encryption key (SSE-C). To perform a multipart upload with
|
||||
// encryption by using an Amazon Web Services KMS key, the requester must have
|
||||
// permission to the kms:Decrypt and kms:GenerateDataKey* actions on the key.
|
||||
// These permissions are required because Amazon S3 must decrypt and read data from
|
||||
// the encrypted file parts before it completes the multipart upload. For more
|
||||
// information, see Multipart upload API and permissions (https://docs.aws.amazon.com/AmazonS3/latest/userguide/mpuoverview.html#mpuAndPermissions)
|
||||
// and Protecting data using server-side encryption with Amazon Web Services KMS (https://docs.aws.amazon.com/AmazonS3/latest/userguide/UsingKMSEncryption.html)
|
||||
// in the Amazon S3 User Guide. If your Identity and Access Management (IAM) user
|
||||
// or role is in the same Amazon Web Services account as the KMS key, then you must
|
||||
// have these permissions on the key policy. If your IAM user or role belongs to a
|
||||
// different account than the key, then you must have the permissions on both the
|
||||
// key policy and your IAM user or role. For more information, see Protecting Data
|
||||
// Using Server-Side Encryption (https://docs.aws.amazon.com/AmazonS3/latest/dev/serv-side-encryption.html)
|
||||
// . Access Permissions When copying an object, you can optionally specify the
|
||||
// accounts or groups that should be granted specific permissions on the new
|
||||
// object. There are two ways to grant the permissions using the request headers:
|
||||
// - Specify a canned ACL with the x-amz-acl request header. For more
|
||||
// information, see Canned ACL (https://docs.aws.amazon.com/AmazonS3/latest/dev/acl-overview.html#CannedACL)
|
||||
// .
|
||||
// - Specify access permissions explicitly with the x-amz-grant-read ,
|
||||
// x-amz-grant-read-acp , x-amz-grant-write-acp , and x-amz-grant-full-control
|
||||
// headers. These parameters map to the set of permissions that Amazon S3 supports
|
||||
// in an ACL. For more information, see Access Control List (ACL) Overview (https://docs.aws.amazon.com/AmazonS3/latest/dev/acl-overview.html)
|
||||
// in the Amazon S3 User Guide. After you initiate a multipart upload and upload
|
||||
// one or more parts, to stop being charged for storing the uploaded parts, you
|
||||
// must either complete or abort the multipart upload. Amazon S3 frees up the space
|
||||
// used to store the parts and stops charging you for storing them only after you
|
||||
// either complete or abort a multipart upload. If you have configured a lifecycle
|
||||
// rule to abort incomplete multipart uploads, the created multipart upload must be
|
||||
// completed within the number of days specified in the bucket lifecycle
|
||||
// configuration. Otherwise, the incomplete multipart upload becomes eligible for
|
||||
// an abort action and Amazon S3 aborts the multipart upload. For more information,
|
||||
// see Aborting Incomplete Multipart Uploads Using a Bucket Lifecycle Configuration (https://docs.aws.amazon.com/AmazonS3/latest/dev/mpuoverview.html#mpu-abort-incomplete-mpu-lifecycle-config)
|
||||
// .
|
||||
// - Directory buckets - S3 Lifecycle is not supported by directory buckets.
|
||||
// - Directory buckets - For directory buckets, you must make requests for this
|
||||
// API operation to the Zonal endpoint. These endpoints support
|
||||
// virtual-hosted-style requests in the format
|
||||
// https://bucket_name.s3express-az_id.region.amazonaws.com/key-name .
|
||||
// Path-style requests are not supported. For more information, see Regional and
|
||||
// Zonal endpoints (https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-express-Regions-and-Zones.html)
|
||||
// in the Amazon S3 User Guide.
|
||||
//
|
||||
// Request signing For request signing, multipart upload is just a series of
|
||||
// regular requests. You initiate a multipart upload, send one or more requests to
|
||||
// upload parts, and then complete the multipart upload process. You sign each
|
||||
// request individually. There is nothing special about signing multipart upload
|
||||
// requests. For more information about signing, see Authenticating Requests
|
||||
// (Amazon Web Services Signature Version 4) (https://docs.aws.amazon.com/AmazonS3/latest/API/sig-v4-authenticating-requests.html)
|
||||
// in the Amazon S3 User Guide. Permissions
|
||||
// - General purpose bucket permissions - For information about the permissions
|
||||
// required to use the multipart upload API, see Multipart upload and permissions (https://docs.aws.amazon.com/AmazonS3/latest/dev/mpuAndPermissions.html)
|
||||
// in the Amazon S3 User Guide. To perform a multipart upload with encryption by
|
||||
// using an Amazon Web Services KMS key, the requester must have permission to the
|
||||
// kms:Decrypt and kms:GenerateDataKey* actions on the key. These permissions are
|
||||
// required because Amazon S3 must decrypt and read data from the encrypted file
|
||||
// parts before it completes the multipart upload. For more information, see
|
||||
// Multipart upload API and permissions (https://docs.aws.amazon.com/AmazonS3/latest/userguide/mpuoverview.html#mpuAndPermissions)
|
||||
// and Protecting data using server-side encryption with Amazon Web Services KMS (https://docs.aws.amazon.com/AmazonS3/latest/userguide/UsingKMSEncryption.html)
|
||||
// in the Amazon S3 User Guide.
|
||||
// - Directory bucket permissions - To grant access to this API operation on a
|
||||
// directory bucket, we recommend that you use the CreateSession (https://docs.aws.amazon.com/AmazonS3/latest/API/API_CreateSession.html)
|
||||
// API operation for session-based authorization. Specifically, you grant the
|
||||
// s3express:CreateSession permission to the directory bucket in a bucket policy
|
||||
// or an IAM identity-based policy. Then, you make the CreateSession API call on
|
||||
// the bucket to obtain a session token. With the session token in your request
|
||||
// header, you can make API requests to this operation. After the session token
|
||||
// expires, you make another CreateSession API call to generate a new session
|
||||
// token for use. Amazon Web Services CLI or SDKs create session and refresh the
|
||||
// session token automatically to avoid service interruptions when a session
|
||||
// expires. For more information about authorization, see CreateSession (https://docs.aws.amazon.com/AmazonS3/latest/API/API_CreateSession.html)
|
||||
// .
|
||||
//
|
||||
// You can use either a canned ACL or specify access permissions explicitly. You
|
||||
// cannot do both. Server-Side- Encryption-Specific Request Headers Amazon S3
|
||||
// encrypts data by using server-side encryption with an Amazon S3 managed key
|
||||
// (SSE-S3) by default. Server-side encryption is for data encryption at rest.
|
||||
// Amazon S3 encrypts your data as it writes it to disks in its data centers and
|
||||
// decrypts it when you access it. You can request that Amazon S3 encrypts data at
|
||||
// rest by using server-side encryption with other key options. The option you use
|
||||
// depends on whether you want to use KMS keys (SSE-KMS) or provide your own
|
||||
// encryption keys (SSE-C).
|
||||
// Encryption
|
||||
// - General purpose buckets - Server-side encryption is for data encryption at
|
||||
// rest. Amazon S3 encrypts your data as it writes it to disks in its data centers
|
||||
// and decrypts it when you access it. Amazon S3 automatically encrypts all new
|
||||
// objects that are uploaded to an S3 bucket. When doing a multipart upload, if you
|
||||
// don't specify encryption information in your request, the encryption setting of
|
||||
// the uploaded parts is set to the default encryption configuration of the
|
||||
// destination bucket. By default, all buckets have a base level of encryption
|
||||
// configuration that uses server-side encryption with Amazon S3 managed keys
|
||||
// (SSE-S3). If the destination bucket has a default encryption configuration that
|
||||
// uses server-side encryption with an Key Management Service (KMS) key (SSE-KMS),
|
||||
// or a customer-provided encryption key (SSE-C), Amazon S3 uses the corresponding
|
||||
// KMS key, or a customer-provided key to encrypt the uploaded parts. When you
|
||||
// perform a CreateMultipartUpload operation, if you want to use a different type
|
||||
// of encryption setting for the uploaded parts, you can request that Amazon S3
|
||||
// encrypts the object with a different encryption key (such as an Amazon S3
|
||||
// managed key, a KMS key, or a customer-provided key). When the encryption setting
|
||||
// in your request is different from the default encryption configuration of the
|
||||
// destination bucket, the encryption setting in your request takes precedence. If
|
||||
// you choose to provide your own encryption key, the request headers you provide
|
||||
// in UploadPart (https://docs.aws.amazon.com/AmazonS3/latest/API/API_UploadPart.html)
|
||||
// and UploadPartCopy (https://docs.aws.amazon.com/AmazonS3/latest/API/API_UploadPartCopy.html)
|
||||
// requests must match the headers you used in the CreateMultipartUpload request.
|
||||
// - Use KMS keys (SSE-KMS) that include the Amazon Web Services managed key (
|
||||
// aws/s3 ) and KMS customer managed keys stored in Key Management Service (KMS)
|
||||
// – If you want Amazon Web Services to manage the keys used to encrypt data,
|
||||
// specify the following headers in the request.
|
||||
// - x-amz-server-side-encryption
|
||||
// - x-amz-server-side-encryption-aws-kms-key-id
|
||||
// - x-amz-server-side-encryption-context If you specify
|
||||
// x-amz-server-side-encryption:aws:kms , but don't provide
|
||||
// - x-amz-server-side-encryption-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. 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 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)
|
||||
// .
|
||||
// Services managed key ( aws/s3 key) in KMS to protect the data.
|
||||
// - To perform a multipart upload with encryption by using an Amazon Web
|
||||
// Services KMS key, the requester must have permission to the kms:Decrypt and
|
||||
// kms:GenerateDataKey* actions on the key. These permissions are required
|
||||
// because Amazon S3 must decrypt and read data from the encrypted file parts
|
||||
// before it completes the multipart upload. For more information, see Multipart
|
||||
// upload API and permissions (https://docs.aws.amazon.com/AmazonS3/latest/userguide/mpuoverview.html#mpuAndPermissions)
|
||||
// and Protecting data using server-side encryption with Amazon Web Services KMS (https://docs.aws.amazon.com/AmazonS3/latest/userguide/UsingKMSEncryption.html)
|
||||
// in the Amazon S3 User Guide.
|
||||
// - If your Identity and Access Management (IAM) user or role is in the same
|
||||
// Amazon Web Services account as the KMS key, then you must have these permissions
|
||||
// on the key policy. If your IAM user or role is in a different account from the
|
||||
// key, then you must have the permissions on both the key policy and your IAM user
|
||||
// or role.
|
||||
// - All GET and PUT requests for an object protected by KMS fail if you don't
|
||||
// make them by using Secure Sockets Layer (SSL), Transport Layer Security (TLS),
|
||||
// or Signature Version 4. For information about configuring any of the officially
|
||||
// supported Amazon Web Services SDKs and Amazon Web Services CLI, see
|
||||
// Specifying the Signature Version in Request Authentication (https://docs.aws.amazon.com/AmazonS3/latest/dev/UsingAWSSDK.html#specify-signature-version)
|
||||
// in the Amazon S3 User Guide. For more information about server-side
|
||||
// encryption with KMS keys (SSE-KMS), see Protecting Data Using Server-Side
|
||||
// Encryption with KMS keys (https://docs.aws.amazon.com/AmazonS3/latest/userguide/UsingKMSEncryption.html)
|
||||
// in the Amazon S3 User Guide.
|
||||
// - Use customer-provided encryption keys (SSE-C) – If you want to manage your
|
||||
// own encryption keys, provide all the following headers in the request.
|
||||
// - x-amz-server-side-encryption-customer-algorithm
|
||||
@@ -120,55 +134,13 @@ import (
|
||||
// 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.
|
||||
//
|
||||
// Access-Control-List (ACL)-Specific Request Headers You also can use the
|
||||
// following access control–related headers with this operation. By default, all
|
||||
// objects are private. Only the owner has full access control. When adding a new
|
||||
// object, you can grant 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 object. For more information, see Using
|
||||
// ACLs (https://docs.aws.amazon.com/AmazonS3/latest/dev/S3_ACLs_UsingACLs.html) .
|
||||
// With this operation, you can grant access permissions using one of the following
|
||||
// two methods:
|
||||
// - Specify a canned ACL ( x-amz-acl ) — 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)
|
||||
// .
|
||||
// - Specify access permissions explicitly — To explicitly grant access
|
||||
// permissions to specific Amazon Web Services accounts or groups, use the
|
||||
// following headers. Each 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 header, you specify a list of grantees who get the specific permission.
|
||||
// To grant permissions explicitly, use:
|
||||
// - x-amz-grant-read
|
||||
// - x-amz-grant-write
|
||||
// - x-amz-grant-read-acp
|
||||
// - x-amz-grant-write-acp
|
||||
// - x-amz-grant-full-control 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"
|
||||
//
|
||||
// The following operations are related to CreateMultipartUpload :
|
||||
// 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)
|
||||
@@ -191,16 +163,26 @@ func (c *Client) CreateMultipartUpload(ctx context.Context, params *CreateMultip
|
||||
|
||||
type CreateMultipartUploadInput struct {
|
||||
|
||||
// The name of the bucket to which to initiate the upload When using this action
|
||||
// with an access point, 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. 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 where the multipart upload is initiated and where the
|
||||
// object is uploaded. Directory buckets - When you use this operation with a
|
||||
// directory bucket, you must use virtual-hosted-style requests in the format
|
||||
// Bucket_name.s3express-az_id.region.amazonaws.com . Path-style requests are not
|
||||
// supported. Directory bucket names must be unique in the chosen Availability
|
||||
// Zone. Bucket names must follow the format bucket_base_name--az-id--x-s3 (for
|
||||
// example, DOC-EXAMPLE-BUCKET--usw2-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
|
||||
// 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
|
||||
@@ -215,22 +197,33 @@ type CreateMultipartUploadInput struct {
|
||||
// This member is required.
|
||||
Key *string
|
||||
|
||||
// The canned ACL to apply to the object. This action is not supported by Amazon
|
||||
// S3 on Outposts.
|
||||
// The canned ACL to apply to the object. Amazon S3 supports a set of predefined
|
||||
// ACLs, known as canned ACLs. Each canned ACL has a predefined set of grantees and
|
||||
// permissions. For more information, see Canned ACL (https://docs.aws.amazon.com/AmazonS3/latest/dev/acl-overview.html#CannedACL)
|
||||
// in the Amazon S3 User Guide. By default, all objects are private. Only the owner
|
||||
// has full access control. When uploading an object, you can grant access
|
||||
// permissions to individual Amazon Web Services accounts or to predefined groups
|
||||
// defined by Amazon S3. These permissions are then added to the access control
|
||||
// list (ACL) on the new object. For more information, see Using ACLs (https://docs.aws.amazon.com/AmazonS3/latest/dev/S3_ACLs_UsingACLs.html)
|
||||
// . One way to grant the permissions using the request headers is to specify a
|
||||
// canned ACL with the x-amz-acl request header.
|
||||
// - This functionality is not supported for directory buckets.
|
||||
// - This functionality is not supported for Amazon S3 on Outposts.
|
||||
ACL 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.
|
||||
// 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 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)
|
||||
// Indicates the algorithm that you want Amazon S3 to use to create the checksum
|
||||
// for the object. For more information, see Checking object integrity (https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html)
|
||||
// in the Amazon S3 User Guide.
|
||||
ChecksumAlgorithm types.ChecksumAlgorithm
|
||||
|
||||
@@ -239,108 +232,226 @@ 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.
|
||||
// Content-Type header field. For directory buckets, only the aws-chunked value is
|
||||
// supported in this header field.
|
||||
ContentEncoding *string
|
||||
|
||||
// The language the content is in.
|
||||
// The language that the content is in.
|
||||
ContentLanguage *string
|
||||
|
||||
// A standard MIME type describing the format of the object data.
|
||||
ContentType *string
|
||||
|
||||
// The account ID of the expected bucket owner. If the bucket is owned by a
|
||||
// different account, the request fails with the HTTP status code 403 Forbidden
|
||||
// (access denied).
|
||||
// The account ID of the expected bucket owner. If the account ID that you provide
|
||||
// does not match the actual owner of the bucket, the request fails with the HTTP
|
||||
// status code 403 Forbidden (access denied).
|
||||
ExpectedBucketOwner *string
|
||||
|
||||
// The date and time at which the object is no longer cacheable.
|
||||
Expires *time.Time
|
||||
|
||||
// Gives the grantee READ, READ_ACP, and WRITE_ACP permissions on the object. This
|
||||
// action is not supported by Amazon S3 on Outposts.
|
||||
// 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
|
||||
|
||||
// Allows grantee to read the object data and its metadata. This action is not
|
||||
// supported by Amazon S3 on Outposts.
|
||||
// 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
|
||||
|
||||
// Allows grantee to read the object ACL. This action is not supported by Amazon
|
||||
// S3 on Outposts.
|
||||
// Specify access permissions explicitly to allows grantee to read the object ACL.
|
||||
// By default, all objects are private. Only the owner has full access control.
|
||||
// When uploading an object, you can use this header to explicitly grant access
|
||||
// permissions to specific Amazon Web Services accounts or groups. This header maps
|
||||
// to specific permissions that Amazon S3 supports in an ACL. For more information,
|
||||
// see Access Control List (ACL) Overview (https://docs.aws.amazon.com/AmazonS3/latest/dev/acl-overview.html)
|
||||
// in the Amazon S3 User Guide. You specify each grantee as a type=value pair,
|
||||
// where the type is one of the following:
|
||||
// - id – if the value specified is the canonical user ID of an Amazon Web
|
||||
// Services account
|
||||
// - uri – if you are granting permissions to a predefined group
|
||||
// - emailAddress – if the value specified is the email address of an Amazon Web
|
||||
// Services account Using email addresses to specify a grantee is only supported in
|
||||
// the following Amazon Web Services Regions:
|
||||
// - US East (N. Virginia)
|
||||
// - US West (N. California)
|
||||
// - US West (Oregon)
|
||||
// - Asia Pacific (Singapore)
|
||||
// - Asia Pacific (Sydney)
|
||||
// - Asia Pacific (Tokyo)
|
||||
// - Europe (Ireland)
|
||||
// - South America (São Paulo) For a list of all the Amazon S3 supported Regions
|
||||
// and endpoints, see Regions and Endpoints (https://docs.aws.amazon.com/general/latest/gr/rande.html#s3_region)
|
||||
// in the Amazon Web Services General Reference.
|
||||
// For example, the following x-amz-grant-read header grants the Amazon Web
|
||||
// Services accounts identified by account IDs permissions to read object data and
|
||||
// its metadata: x-amz-grant-read: id="11112222333", id="444455556666"
|
||||
// - This functionality is not supported for directory buckets.
|
||||
// - This functionality is not supported for Amazon S3 on Outposts.
|
||||
GrantReadACP *string
|
||||
|
||||
// Allows grantee to write the ACL for the applicable object. This action is not
|
||||
// supported by Amazon S3 on Outposts.
|
||||
// Specify access permissions explicitly to allows grantee to allow grantee to
|
||||
// write the ACL for the applicable object. By default, all objects are private.
|
||||
// Only the owner has full access control. When uploading an object, you can use
|
||||
// this header to explicitly grant access permissions to specific Amazon Web
|
||||
// Services accounts or groups. This header maps to specific permissions that
|
||||
// Amazon S3 supports in an ACL. For more information, see Access Control List
|
||||
// (ACL) Overview (https://docs.aws.amazon.com/AmazonS3/latest/dev/acl-overview.html)
|
||||
// in the Amazon S3 User Guide. You specify each grantee as a type=value pair,
|
||||
// where the type is one of the following:
|
||||
// - id – if the value specified is the canonical user ID of an Amazon Web
|
||||
// Services account
|
||||
// - uri – if you are granting permissions to a predefined group
|
||||
// - emailAddress – if the value specified is the email address of an Amazon Web
|
||||
// Services account Using email addresses to specify a grantee is only supported in
|
||||
// the following Amazon Web Services Regions:
|
||||
// - US East (N. Virginia)
|
||||
// - US West (N. California)
|
||||
// - US West (Oregon)
|
||||
// - Asia Pacific (Singapore)
|
||||
// - Asia Pacific (Sydney)
|
||||
// - Asia Pacific (Tokyo)
|
||||
// - Europe (Ireland)
|
||||
// - South America (São Paulo) For a list of all the Amazon S3 supported Regions
|
||||
// and endpoints, see Regions and Endpoints (https://docs.aws.amazon.com/general/latest/gr/rande.html#s3_region)
|
||||
// in the Amazon Web Services General Reference.
|
||||
// For example, the following x-amz-grant-read header grants the Amazon Web
|
||||
// Services accounts identified by account IDs permissions to read object data and
|
||||
// its metadata: x-amz-grant-read: id="11112222333", id="444455556666"
|
||||
// - This functionality is not supported for directory buckets.
|
||||
// - This functionality is not supported for Amazon S3 on Outposts.
|
||||
GrantWriteACP *string
|
||||
|
||||
// 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.
|
||||
// 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.
|
||||
// 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 Amazon S3 bucket has Requester Pays enabled, the requester
|
||||
// will pay for corresponding charges to copy the object. For information about
|
||||
// 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.
|
||||
// in the Amazon S3 User Guide. This functionality is not supported for directory
|
||||
// buckets.
|
||||
RequestPayer types.RequestPayer
|
||||
|
||||
// Specifies the algorithm to use to when encrypting the object (for example,
|
||||
// AES256).
|
||||
// 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.
|
||||
// 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.
|
||||
// Specifies the 128-bit MD5 digest of the customer-provided encryption key
|
||||
// according to RFC 1321. Amazon S3 uses this header for a message integrity check
|
||||
// to ensure that the encryption key was transmitted without error. This
|
||||
// functionality is not supported for directory buckets.
|
||||
SSECustomerKeyMD5 *string
|
||||
|
||||
// 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.
|
||||
// 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. All GET and PUT requests for
|
||||
// an object protected by KMS will fail if they're not made via SSL or using SigV4.
|
||||
// For information about configuring any of the officially supported Amazon Web
|
||||
// Services SDKs and Amazon Web Services CLI, see Specifying the Signature Version
|
||||
// in Request Authentication (https://docs.aws.amazon.com/AmazonS3/latest/dev/UsingAWSSDK.html#specify-signature-version)
|
||||
// in the Amazon S3 User Guide.
|
||||
// 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 storing this object in Amazon S3
|
||||
// (for example, AES256 , aws:kms ).
|
||||
// The server-side encryption algorithm used when you store this object in Amazon
|
||||
// S3 (for example, AES256 , aws:kms ). For directory buckets, only server-side
|
||||
// encryption with Amazon S3 managed keys (SSE-S3) ( AES256 ) is supported.
|
||||
ServerSideEncryption 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. Amazon S3 on Outposts only uses the OUTPOSTS Storage Class. For
|
||||
// more information, see Storage Classes (https://docs.aws.amazon.com/AmazonS3/latest/dev/storage-class-intro.html)
|
||||
// Storage Class. For more information, see Storage Classes (https://docs.aws.amazon.com/AmazonS3/latest/dev/storage-class-intro.html)
|
||||
// in the Amazon S3 User Guide.
|
||||
// - For directory buckets, only the S3 Express One Zone storage class is
|
||||
// supported to store newly created objects.
|
||||
// - Amazon S3 on Outposts only uses the OUTPOSTS Storage Class.
|
||||
StorageClass types.StorageClass
|
||||
|
||||
// The tag-set for the object. The tag-set must be encoded as URL Query parameters.
|
||||
// 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.
|
||||
// value of this header in the object metadata. This functionality is not supported
|
||||
// for directory buckets.
|
||||
WebsiteRedirectLocation *string
|
||||
|
||||
noSmithyDocumentSerde
|
||||
@@ -360,35 +471,25 @@ type CreateMultipartUploadOutput struct {
|
||||
// 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)
|
||||
// . The response also includes the x-amz-abort-rule-id header that provides the
|
||||
// ID of the lifecycle configuration rule that defines this action.
|
||||
// in the Amazon S3 User Guide. The response also includes the x-amz-abort-rule-id
|
||||
// header that provides the ID of the lifecycle configuration rule that defines the
|
||||
// abort action. This functionality is not supported for directory buckets.
|
||||
AbortDate *time.Time
|
||||
|
||||
// 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.
|
||||
// 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. When using this
|
||||
// action with an access point, 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. 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.
|
||||
// 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).
|
||||
// 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.
|
||||
@@ -398,30 +499,35 @@ type CreateMultipartUploadOutput struct {
|
||||
Key *string
|
||||
|
||||
// If present, indicates that the requester was successfully charged for the
|
||||
// request.
|
||||
// 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 confirming the encryption
|
||||
// algorithm used.
|
||||
// requested, the response will include this header to confirm the encryption
|
||||
// algorithm that's used. This functionality is not supported for directory
|
||||
// buckets.
|
||||
SSECustomerAlgorithm *string
|
||||
|
||||
// If server-side encryption with a customer-provided encryption key was
|
||||
// requested, the response will include this header to provide round-trip message
|
||||
// integrity verification of the customer-provided encryption key.
|
||||
// requested, the response will include this header to provide the round-trip
|
||||
// message integrity verification of the customer-provided encryption key. This
|
||||
// functionality is not supported for directory buckets.
|
||||
SSECustomerKeyMD5 *string
|
||||
|
||||
// If present, specifies the Amazon Web Services KMS Encryption Context to use for
|
||||
// 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.
|
||||
// holding JSON with the encryption context key-value pairs. This functionality is
|
||||
// not supported for directory buckets.
|
||||
SSEKMSEncryptionContext *string
|
||||
|
||||
// If present, specifies the ID of the Key Management Service (KMS) symmetric
|
||||
// encryption customer managed key that was used for the object.
|
||||
// If present, indicates the ID of the Key Management Service (KMS) symmetric
|
||||
// encryption customer managed key that was used for the object. This functionality
|
||||
// is not supported for directory buckets.
|
||||
SSEKMSKeyId *string
|
||||
|
||||
// The server-side encryption algorithm used when storing this object in Amazon S3
|
||||
// (for example, AES256 , aws:kms ).
|
||||
// The server-side encryption algorithm used when you store this object in Amazon
|
||||
// S3 (for example, AES256 , aws:kms ). For directory buckets, only server-side
|
||||
// encryption with Amazon S3 managed keys (SSE-S3) ( AES256 ) is supported.
|
||||
ServerSideEncryption types.ServerSideEncryption
|
||||
|
||||
// ID for the initiated multipart upload.
|
||||
@@ -488,6 +594,9 @@ func (c *Client) addOperationCreateMultipartUploadMiddlewares(stack *middleware.
|
||||
if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addPutBucketContextMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addOpCreateMultipartUploadValidationMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
@@ -521,6 +630,9 @@ func (c *Client) addOperationCreateMultipartUploadMiddlewares(stack *middleware.
|
||||
if err = addSerializeImmutableHostnameBucketMiddleware(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addSetCreateMPUChecksumAlgorithm(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
|
||||
+260
@@ -0,0 +1,260 @@
|
||||
// Code generated by smithy-go-codegen DO NOT EDIT.
|
||||
|
||||
package s3
|
||||
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
|
||||
"github.com/aws/aws-sdk-go-v2/aws/signer/v4"
|
||||
s3cust "github.com/aws/aws-sdk-go-v2/service/s3/internal/customizations"
|
||||
"github.com/aws/aws-sdk-go-v2/service/s3/types"
|
||||
"github.com/aws/smithy-go/middleware"
|
||||
"github.com/aws/smithy-go/ptr"
|
||||
smithyhttp "github.com/aws/smithy-go/transport/http"
|
||||
)
|
||||
|
||||
// Creates a session that establishes temporary security credentials to support
|
||||
// fast authentication and authorization for the Zonal endpoint APIs on directory
|
||||
// buckets. For more information about Zonal endpoint APIs that include the
|
||||
// Availability Zone in the request endpoint, see S3 Express One Zone APIs (https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-express-APIs.html)
|
||||
// in the Amazon S3 User Guide. To make Zonal endpoint API requests on a directory
|
||||
// bucket, use the CreateSession API operation. Specifically, you grant
|
||||
// s3express:CreateSession permission to a bucket in a bucket policy or an IAM
|
||||
// identity-based policy. Then, you use IAM credentials to make the CreateSession
|
||||
// API request on the bucket, which returns temporary security credentials that
|
||||
// include the access key ID, secret access key, session token, and expiration.
|
||||
// These credentials have associated permissions to access the Zonal endpoint APIs.
|
||||
// After the session is created, you don’t need to use other policies to grant
|
||||
// permissions to each Zonal endpoint API individually. Instead, in your Zonal
|
||||
// endpoint API requests, you sign your requests by applying the temporary security
|
||||
// credentials of the session to the request headers and following the SigV4
|
||||
// protocol for authentication. You also apply the session token to the
|
||||
// x-amz-s3session-token request header for authorization. Temporary security
|
||||
// credentials are scoped to the bucket and expire after 5 minutes. After the
|
||||
// expiration time, any calls that you make with those credentials will fail. You
|
||||
// must use IAM credentials again to make a CreateSession API request that
|
||||
// generates a new set of temporary credentials for use. Temporary credentials
|
||||
// cannot be extended or refreshed beyond the original specified interval. If you
|
||||
// use Amazon Web Services SDKs, SDKs handle the session token refreshes
|
||||
// automatically to avoid service interruptions when a session expires. We
|
||||
// recommend that you use the Amazon Web Services SDKs to initiate and manage
|
||||
// requests to the CreateSession API. For more information, see Performance
|
||||
// guidelines and design patterns (https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-express-optimizing-performance-guidelines-design-patterns.html#s3-express-optimizing-performance-session-authentication)
|
||||
// in the Amazon S3 User Guide.
|
||||
// - You must make requests for this API operation to the Zonal endpoint. These
|
||||
// endpoints support virtual-hosted-style requests in the format
|
||||
// https://bucket_name.s3express-az_id.region.amazonaws.com . Path-style requests
|
||||
// are not supported. For more information, see Regional and Zonal endpoints (https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-express-Regions-and-Zones.html)
|
||||
// in the Amazon S3 User Guide.
|
||||
// - CopyObject API operation - Unlike other Zonal endpoint APIs, the CopyObject
|
||||
// API operation doesn't use the temporary security credentials returned from the
|
||||
// CreateSession API operation for authentication and authorization. For
|
||||
// information about authentication and authorization of the CopyObject API
|
||||
// operation on directory buckets, see CopyObject (https://docs.aws.amazon.com/AmazonS3/latest/API/API_CopyObject.html)
|
||||
// .
|
||||
// - HeadBucket API operation - Unlike other Zonal endpoint APIs, the HeadBucket
|
||||
// API operation doesn't use the temporary security credentials returned from the
|
||||
// CreateSession API operation for authentication and authorization. For
|
||||
// information about authentication and authorization of the HeadBucket API
|
||||
// operation on directory buckets, see HeadBucket (https://docs.aws.amazon.com/AmazonS3/latest/API/API_HeadBucket.html)
|
||||
// .
|
||||
//
|
||||
// Permissions To obtain temporary security credentials, you must create a bucket
|
||||
// policy or an IAM identity-based policy that grants s3express:CreateSession
|
||||
// permission to the bucket. In a policy, you can have the s3express:SessionMode
|
||||
// condition key to control who can create a ReadWrite or ReadOnly session. For
|
||||
// more information about ReadWrite or ReadOnly sessions, see
|
||||
// x-amz-create-session-mode (https://docs.aws.amazon.com/AmazonS3/latest/API/API_CreateSession.html#API_CreateSession_RequestParameters)
|
||||
// . For example policies, see Example bucket policies for S3 Express One Zone (https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-express-security-iam-example-bucket-policies.html)
|
||||
// and Amazon Web Services Identity and Access Management (IAM) identity-based
|
||||
// policies for S3 Express One Zone (https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-express-security-iam-identity-policies.html)
|
||||
// in the Amazon S3 User Guide. To grant cross-account access to Zonal endpoint
|
||||
// APIs, the bucket policy should also grant both accounts the
|
||||
// s3express:CreateSession permission. HTTP Host header syntax Directory buckets -
|
||||
// The HTTP Host header syntax is Bucket_name.s3express-az_id.region.amazonaws.com .
|
||||
func (c *Client) CreateSession(ctx context.Context, params *CreateSessionInput, optFns ...func(*Options)) (*CreateSessionOutput, error) {
|
||||
if params == nil {
|
||||
params = &CreateSessionInput{}
|
||||
}
|
||||
|
||||
result, metadata, err := c.invokeOperation(ctx, "CreateSession", params, optFns, c.addOperationCreateSessionMiddlewares)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
out := result.(*CreateSessionOutput)
|
||||
out.ResultMetadata = metadata
|
||||
return out, nil
|
||||
}
|
||||
|
||||
type CreateSessionInput struct {
|
||||
|
||||
// The name of the bucket that you create a session for.
|
||||
//
|
||||
// This member is required.
|
||||
Bucket *string
|
||||
|
||||
// Specifies the mode of the session that will be created, either ReadWrite or
|
||||
// ReadOnly . By default, a ReadWrite session is created. A ReadWrite session is
|
||||
// capable of executing all the Zonal endpoint APIs on a directory bucket. A
|
||||
// ReadOnly session is constrained to execute the following Zonal endpoint APIs:
|
||||
// GetObject , HeadObject , ListObjectsV2 , GetObjectAttributes , ListParts , and
|
||||
// ListMultipartUploads .
|
||||
SessionMode types.SessionMode
|
||||
|
||||
noSmithyDocumentSerde
|
||||
}
|
||||
|
||||
func (in *CreateSessionInput) bindEndpointParams(p *EndpointParameters) {
|
||||
p.Bucket = in.Bucket
|
||||
p.DisableS3ExpressSessionAuth = ptr.Bool(true)
|
||||
}
|
||||
|
||||
type CreateSessionOutput struct {
|
||||
|
||||
// The established temporary security credentials for the created session..
|
||||
//
|
||||
// This member is required.
|
||||
Credentials *types.SessionCredentials
|
||||
|
||||
// Metadata pertaining to the operation's result.
|
||||
ResultMetadata middleware.Metadata
|
||||
|
||||
noSmithyDocumentSerde
|
||||
}
|
||||
|
||||
func (c *Client) addOperationCreateSessionMiddlewares(stack *middleware.Stack, options Options) (err error) {
|
||||
if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil {
|
||||
return err
|
||||
}
|
||||
err = stack.Serialize.Add(&awsRestxml_serializeOpCreateSession{}, middleware.After)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
err = stack.Deserialize.Add(&awsRestxml_deserializeOpCreateSession{}, middleware.After)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if err := addProtocolFinalizerMiddlewares(stack, options, "CreateSession"); err != nil {
|
||||
return fmt.Errorf("add protocol finalizers: %v", err)
|
||||
}
|
||||
|
||||
if err = addlegacyEndpointContextSetter(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addSetLoggerMiddleware(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addResolveEndpointMiddleware(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addRetryMiddlewares(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addClientUserAgent(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addPutBucketContextMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addOpCreateSessionValidationMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateSession(options.Region), middleware.Before); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addMetadataRetrieverMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = awsmiddleware.AddRecursionDetection(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addCreateSessionUpdateEndpoint(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addResponseErrorMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = v4.AddContentSHA256HeaderMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = disableAcceptEncodingGzip(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addRequestResponseLogging(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addDisableHTTPSMiddleware(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addSerializeImmutableHostnameBucketMiddleware(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (v *CreateSessionInput) bucket() (string, bool) {
|
||||
if v.Bucket == nil {
|
||||
return "", false
|
||||
}
|
||||
return *v.Bucket, true
|
||||
}
|
||||
|
||||
func newServiceMetadataMiddleware_opCreateSession(region string) *awsmiddleware.RegisterServiceMetadata {
|
||||
return &awsmiddleware.RegisterServiceMetadata{
|
||||
Region: region,
|
||||
ServiceID: ServiceID,
|
||||
OperationName: "CreateSession",
|
||||
}
|
||||
}
|
||||
|
||||
// getCreateSessionBucketMember returns a pointer to string denoting a provided
|
||||
// bucket member valueand a boolean indicating if the input has a modeled bucket
|
||||
// name,
|
||||
func getCreateSessionBucketMember(input interface{}) (*string, bool) {
|
||||
in := input.(*CreateSessionInput)
|
||||
if in.Bucket == nil {
|
||||
return nil, false
|
||||
}
|
||||
return in.Bucket, true
|
||||
}
|
||||
func addCreateSessionUpdateEndpoint(stack *middleware.Stack, options Options) error {
|
||||
return s3cust.UpdateEndpoint(stack, s3cust.UpdateEndpointOptions{
|
||||
Accessor: s3cust.UpdateEndpointParameterAccessor{
|
||||
GetBucketFromInput: getCreateSessionBucketMember,
|
||||
},
|
||||
UsePathStyle: options.UsePathStyle,
|
||||
UseAccelerate: options.UseAccelerate,
|
||||
SupportsAccelerate: true,
|
||||
TargetS3ObjectLambda: false,
|
||||
EndpointResolver: options.EndpointResolver,
|
||||
EndpointResolverOptions: options.EndpointOptions,
|
||||
UseARNRegion: options.UseARNRegion,
|
||||
DisableMultiRegionAccessPoints: options.DisableMultiRegionAccessPoints,
|
||||
})
|
||||
}
|
||||
+44
-6
@@ -9,12 +9,37 @@ import (
|
||||
"github.com/aws/aws-sdk-go-v2/aws/signer/v4"
|
||||
s3cust "github.com/aws/aws-sdk-go-v2/service/s3/internal/customizations"
|
||||
"github.com/aws/smithy-go/middleware"
|
||||
"github.com/aws/smithy-go/ptr"
|
||||
smithyhttp "github.com/aws/smithy-go/transport/http"
|
||||
)
|
||||
|
||||
// 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.
|
||||
// The following operations are related to DeleteBucket :
|
||||
// - Directory buckets - If multipart uploads in a directory bucket are in
|
||||
// progress, you can't delete the bucket until all the in-progress multipart
|
||||
// uploads are aborted or completed.
|
||||
// - Directory buckets - For directory buckets, you must make requests for this
|
||||
// API operation to the Regional endpoint. These endpoints support path-style
|
||||
// requests in the format
|
||||
// https://s3express-control.region_code.amazonaws.com/bucket-name .
|
||||
// Virtual-hosted-style requests aren't supported. For more information, see
|
||||
// Regional and Zonal endpoints (https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-express-Regions-and-Zones.html)
|
||||
// in the Amazon S3 User Guide.
|
||||
//
|
||||
// Permissions
|
||||
// - General purpose bucket permissions - You must have the s3:DeleteBucket
|
||||
// permission on the specified bucket in a policy.
|
||||
// - Directory bucket permissions - You must have the s3express:DeleteBucket
|
||||
// permission in an IAM identity-based policy instead of a bucket policy.
|
||||
// Cross-account access to this API operation isn't supported. This operation can
|
||||
// only be performed by the Amazon Web Services account that owns the resource. For
|
||||
// more information about directory bucket policies and permissions, see Amazon
|
||||
// Web Services Identity and Access Management (IAM) for S3 Express One Zone (https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-express-security-iam.html)
|
||||
// in the Amazon S3 User Guide.
|
||||
//
|
||||
// HTTP Host header syntax Directory buckets - The HTTP Host header syntax is
|
||||
// s3express-control.region.amazonaws.com . The following operations are related to
|
||||
// DeleteBucket :
|
||||
// - CreateBucket (https://docs.aws.amazon.com/AmazonS3/latest/API/API_CreateBucket.html)
|
||||
// - DeleteObject (https://docs.aws.amazon.com/AmazonS3/latest/API/API_DeleteObject.html)
|
||||
func (c *Client) DeleteBucket(ctx context.Context, params *DeleteBucketInput, optFns ...func(*Options)) (*DeleteBucketOutput, error) {
|
||||
@@ -34,14 +59,24 @@ func (c *Client) DeleteBucket(ctx context.Context, params *DeleteBucketInput, op
|
||||
|
||||
type DeleteBucketInput struct {
|
||||
|
||||
// Specifies the bucket being deleted.
|
||||
// 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
|
||||
//
|
||||
// This member is required.
|
||||
Bucket *string
|
||||
|
||||
// The account ID of the expected bucket owner. If the bucket is owned by a
|
||||
// different account, the request fails with the HTTP status code 403 Forbidden
|
||||
// (access denied).
|
||||
// The account ID of the expected bucket owner. If the account ID that you provide
|
||||
// does not match the actual owner of the bucket, the request fails with the HTTP
|
||||
// status code 403 Forbidden (access denied). For directory buckets, this header
|
||||
// is not supported in this API operation. If you specify this header, the request
|
||||
// fails with the HTTP status code 501 Not Implemented .
|
||||
ExpectedBucketOwner *string
|
||||
|
||||
noSmithyDocumentSerde
|
||||
@@ -49,7 +84,7 @@ type DeleteBucketInput struct {
|
||||
|
||||
func (in *DeleteBucketInput) bindEndpointParams(p *EndpointParameters) {
|
||||
p.Bucket = in.Bucket
|
||||
|
||||
p.UseS3ExpressControlEndpoint = ptr.Bool(true)
|
||||
}
|
||||
|
||||
type DeleteBucketOutput struct {
|
||||
@@ -114,6 +149,9 @@ func (c *Client) addOperationDeleteBucketMiddlewares(stack *middleware.Stack, op
|
||||
if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addPutBucketContextMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addOpDeleteBucketValidationMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
Generated
Vendored
+13
-8
@@ -9,13 +9,15 @@ import (
|
||||
"github.com/aws/aws-sdk-go-v2/aws/signer/v4"
|
||||
s3cust "github.com/aws/aws-sdk-go-v2/service/s3/internal/customizations"
|
||||
"github.com/aws/smithy-go/middleware"
|
||||
"github.com/aws/smithy-go/ptr"
|
||||
smithyhttp "github.com/aws/smithy-go/transport/http"
|
||||
)
|
||||
|
||||
// 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
|
||||
// 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)
|
||||
@@ -52,9 +54,9 @@ type DeleteBucketAnalyticsConfigurationInput struct {
|
||||
// This member is required.
|
||||
Id *string
|
||||
|
||||
// The account ID of the expected bucket owner. If the bucket is owned by a
|
||||
// different account, the request fails with the HTTP status code 403 Forbidden
|
||||
// (access denied).
|
||||
// The account ID of the expected bucket owner. If the account ID that you provide
|
||||
// does not match the actual owner of the bucket, the request fails with the HTTP
|
||||
// status code 403 Forbidden (access denied).
|
||||
ExpectedBucketOwner *string
|
||||
|
||||
noSmithyDocumentSerde
|
||||
@@ -62,7 +64,7 @@ type DeleteBucketAnalyticsConfigurationInput struct {
|
||||
|
||||
func (in *DeleteBucketAnalyticsConfigurationInput) bindEndpointParams(p *EndpointParameters) {
|
||||
p.Bucket = in.Bucket
|
||||
|
||||
p.UseS3ExpressControlEndpoint = ptr.Bool(true)
|
||||
}
|
||||
|
||||
type DeleteBucketAnalyticsConfigurationOutput struct {
|
||||
@@ -127,6 +129,9 @@ func (c *Client) addOperationDeleteBucketAnalyticsConfigurationMiddlewares(stack
|
||||
if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addPutBucketContextMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addOpDeleteBucketAnalyticsConfigurationValidationMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
+13
-8
@@ -9,13 +9,15 @@ import (
|
||||
"github.com/aws/aws-sdk-go-v2/aws/signer/v4"
|
||||
s3cust "github.com/aws/aws-sdk-go-v2/service/s3/internal/customizations"
|
||||
"github.com/aws/smithy-go/middleware"
|
||||
"github.com/aws/smithy-go/ptr"
|
||||
smithyhttp "github.com/aws/smithy-go/transport/http"
|
||||
)
|
||||
|
||||
// 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)
|
||||
// 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)
|
||||
@@ -41,9 +43,9 @@ type DeleteBucketCorsInput struct {
|
||||
// This member is required.
|
||||
Bucket *string
|
||||
|
||||
// The account ID of the expected bucket owner. If the bucket is owned by a
|
||||
// different account, the request fails with the HTTP status code 403 Forbidden
|
||||
// (access denied).
|
||||
// The account ID of the expected bucket owner. If the account ID that you provide
|
||||
// does not match the actual owner of the bucket, the request fails with the HTTP
|
||||
// status code 403 Forbidden (access denied).
|
||||
ExpectedBucketOwner *string
|
||||
|
||||
noSmithyDocumentSerde
|
||||
@@ -51,7 +53,7 @@ type DeleteBucketCorsInput struct {
|
||||
|
||||
func (in *DeleteBucketCorsInput) bindEndpointParams(p *EndpointParameters) {
|
||||
p.Bucket = in.Bucket
|
||||
|
||||
p.UseS3ExpressControlEndpoint = ptr.Bool(true)
|
||||
}
|
||||
|
||||
type DeleteBucketCorsOutput struct {
|
||||
@@ -116,6 +118,9 @@ func (c *Client) addOperationDeleteBucketCorsMiddlewares(stack *middleware.Stack
|
||||
if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addPutBucketContextMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addOpDeleteBucketCorsValidationMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
+12
-8
@@ -9,13 +9,14 @@ import (
|
||||
"github.com/aws/aws-sdk-go-v2/aws/signer/v4"
|
||||
s3cust "github.com/aws/aws-sdk-go-v2/service/s3/internal/customizations"
|
||||
"github.com/aws/smithy-go/middleware"
|
||||
"github.com/aws/smithy-go/ptr"
|
||||
smithyhttp "github.com/aws/smithy-go/transport/http"
|
||||
)
|
||||
|
||||
// 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)
|
||||
// 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
|
||||
@@ -49,9 +50,9 @@ type DeleteBucketEncryptionInput struct {
|
||||
// This member is required.
|
||||
Bucket *string
|
||||
|
||||
// The account ID of the expected bucket owner. If the bucket is owned by a
|
||||
// different account, the request fails with the HTTP status code 403 Forbidden
|
||||
// (access denied).
|
||||
// The account ID of the expected bucket owner. If the account ID that you provide
|
||||
// does not match the actual owner of the bucket, the request fails with the HTTP
|
||||
// status code 403 Forbidden (access denied).
|
||||
ExpectedBucketOwner *string
|
||||
|
||||
noSmithyDocumentSerde
|
||||
@@ -59,7 +60,7 @@ type DeleteBucketEncryptionInput struct {
|
||||
|
||||
func (in *DeleteBucketEncryptionInput) bindEndpointParams(p *EndpointParameters) {
|
||||
p.Bucket = in.Bucket
|
||||
|
||||
p.UseS3ExpressControlEndpoint = ptr.Bool(true)
|
||||
}
|
||||
|
||||
type DeleteBucketEncryptionOutput struct {
|
||||
@@ -124,6 +125,9 @@ func (c *Client) addOperationDeleteBucketEncryptionMiddlewares(stack *middleware
|
||||
if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addPutBucketContextMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addOpDeleteBucketEncryptionValidationMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_DeleteBucketIntelligentTieringConfiguration.go
Generated
Vendored
+8
-3
@@ -9,11 +9,13 @@ import (
|
||||
"github.com/aws/aws-sdk-go-v2/aws/signer/v4"
|
||||
s3cust "github.com/aws/aws-sdk-go-v2/service/s3/internal/customizations"
|
||||
"github.com/aws/smithy-go/middleware"
|
||||
"github.com/aws/smithy-go/ptr"
|
||||
smithyhttp "github.com/aws/smithy-go/transport/http"
|
||||
)
|
||||
|
||||
// Deletes the S3 Intelligent-Tiering configuration from the specified bucket. The
|
||||
// S3 Intelligent-Tiering storage class is designed to optimize storage costs by
|
||||
// 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
|
||||
@@ -63,7 +65,7 @@ type DeleteBucketIntelligentTieringConfigurationInput struct {
|
||||
|
||||
func (in *DeleteBucketIntelligentTieringConfigurationInput) bindEndpointParams(p *EndpointParameters) {
|
||||
p.Bucket = in.Bucket
|
||||
|
||||
p.UseS3ExpressControlEndpoint = ptr.Bool(true)
|
||||
}
|
||||
|
||||
type DeleteBucketIntelligentTieringConfigurationOutput struct {
|
||||
@@ -128,6 +130,9 @@ func (c *Client) addOperationDeleteBucketIntelligentTieringConfigurationMiddlewa
|
||||
if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addPutBucketContextMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addOpDeleteBucketIntelligentTieringConfigurationValidationMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
Generated
Vendored
+14
-10
@@ -9,15 +9,16 @@ import (
|
||||
"github.com/aws/aws-sdk-go-v2/aws/signer/v4"
|
||||
s3cust "github.com/aws/aws-sdk-go-v2/service/s3/internal/customizations"
|
||||
"github.com/aws/smithy-go/middleware"
|
||||
"github.com/aws/smithy-go/ptr"
|
||||
smithyhttp "github.com/aws/smithy-go/transport/http"
|
||||
)
|
||||
|
||||
// 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)
|
||||
// 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:
|
||||
@@ -51,9 +52,9 @@ type DeleteBucketInventoryConfigurationInput struct {
|
||||
// This member is required.
|
||||
Id *string
|
||||
|
||||
// The account ID of the expected bucket owner. If the bucket is owned by a
|
||||
// different account, the request fails with the HTTP status code 403 Forbidden
|
||||
// (access denied).
|
||||
// The account ID of the expected bucket owner. If the account ID that you provide
|
||||
// does not match the actual owner of the bucket, the request fails with the HTTP
|
||||
// status code 403 Forbidden (access denied).
|
||||
ExpectedBucketOwner *string
|
||||
|
||||
noSmithyDocumentSerde
|
||||
@@ -61,7 +62,7 @@ type DeleteBucketInventoryConfigurationInput struct {
|
||||
|
||||
func (in *DeleteBucketInventoryConfigurationInput) bindEndpointParams(p *EndpointParameters) {
|
||||
p.Bucket = in.Bucket
|
||||
|
||||
p.UseS3ExpressControlEndpoint = ptr.Bool(true)
|
||||
}
|
||||
|
||||
type DeleteBucketInventoryConfigurationOutput struct {
|
||||
@@ -126,6 +127,9 @@ func (c *Client) addOperationDeleteBucketInventoryConfigurationMiddlewares(stack
|
||||
if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addPutBucketContextMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addOpDeleteBucketInventoryConfigurationValidationMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
+17
-12
@@ -9,17 +9,19 @@ import (
|
||||
"github.com/aws/aws-sdk-go-v2/aws/signer/v4"
|
||||
s3cust "github.com/aws/aws-sdk-go-v2/service/s3/internal/customizations"
|
||||
"github.com/aws/smithy-go/middleware"
|
||||
"github.com/aws/smithy-go/ptr"
|
||||
smithyhttp "github.com/aws/smithy-go/transport/http"
|
||||
)
|
||||
|
||||
// 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
|
||||
// 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:
|
||||
@@ -47,9 +49,9 @@ type DeleteBucketLifecycleInput struct {
|
||||
// This member is required.
|
||||
Bucket *string
|
||||
|
||||
// The account ID of the expected bucket owner. If the bucket is owned by a
|
||||
// different account, the request fails with the HTTP status code 403 Forbidden
|
||||
// (access denied).
|
||||
// The account ID of the expected bucket owner. If the account ID that you provide
|
||||
// does not match the actual owner of the bucket, the request fails with the HTTP
|
||||
// status code 403 Forbidden (access denied).
|
||||
ExpectedBucketOwner *string
|
||||
|
||||
noSmithyDocumentSerde
|
||||
@@ -57,7 +59,7 @@ type DeleteBucketLifecycleInput struct {
|
||||
|
||||
func (in *DeleteBucketLifecycleInput) bindEndpointParams(p *EndpointParameters) {
|
||||
p.Bucket = in.Bucket
|
||||
|
||||
p.UseS3ExpressControlEndpoint = ptr.Bool(true)
|
||||
}
|
||||
|
||||
type DeleteBucketLifecycleOutput struct {
|
||||
@@ -122,6 +124,9 @@ func (c *Client) addOperationDeleteBucketLifecycleMiddlewares(stack *middleware.
|
||||
if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addPutBucketContextMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addOpDeleteBucketLifecycleValidationMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
Generated
Vendored
+16
-11
@@ -9,16 +9,18 @@ import (
|
||||
"github.com/aws/aws-sdk-go-v2/aws/signer/v4"
|
||||
s3cust "github.com/aws/aws-sdk-go-v2/service/s3/internal/customizations"
|
||||
"github.com/aws/smithy-go/middleware"
|
||||
"github.com/aws/smithy-go/ptr"
|
||||
smithyhttp "github.com/aws/smithy-go/transport/http"
|
||||
)
|
||||
|
||||
// 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)
|
||||
// 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)
|
||||
@@ -55,9 +57,9 @@ type DeleteBucketMetricsConfigurationInput struct {
|
||||
// This member is required.
|
||||
Id *string
|
||||
|
||||
// The account ID of the expected bucket owner. If the bucket is owned by a
|
||||
// different account, the request fails with the HTTP status code 403 Forbidden
|
||||
// (access denied).
|
||||
// The account ID of the expected bucket owner. If the account ID that you provide
|
||||
// does not match the actual owner of the bucket, the request fails with the HTTP
|
||||
// status code 403 Forbidden (access denied).
|
||||
ExpectedBucketOwner *string
|
||||
|
||||
noSmithyDocumentSerde
|
||||
@@ -65,7 +67,7 @@ type DeleteBucketMetricsConfigurationInput struct {
|
||||
|
||||
func (in *DeleteBucketMetricsConfigurationInput) bindEndpointParams(p *EndpointParameters) {
|
||||
p.Bucket = in.Bucket
|
||||
|
||||
p.UseS3ExpressControlEndpoint = ptr.Bool(true)
|
||||
}
|
||||
|
||||
type DeleteBucketMetricsConfigurationOutput struct {
|
||||
@@ -130,6 +132,9 @@ func (c *Client) addOperationDeleteBucketMetricsConfigurationMiddlewares(stack *
|
||||
if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addPutBucketContextMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addOpDeleteBucketMetricsConfigurationValidationMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
Generated
Vendored
+12
-7
@@ -9,12 +9,14 @@ import (
|
||||
"github.com/aws/aws-sdk-go-v2/aws/signer/v4"
|
||||
s3cust "github.com/aws/aws-sdk-go-v2/service/s3/internal/customizations"
|
||||
"github.com/aws/smithy-go/middleware"
|
||||
"github.com/aws/smithy-go/ptr"
|
||||
smithyhttp "github.com/aws/smithy-go/transport/http"
|
||||
)
|
||||
|
||||
// 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)
|
||||
// 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
|
||||
@@ -41,9 +43,9 @@ type DeleteBucketOwnershipControlsInput struct {
|
||||
// This member is required.
|
||||
Bucket *string
|
||||
|
||||
// The account ID of the expected bucket owner. If the bucket is owned by a
|
||||
// different account, the request fails with the HTTP status code 403 Forbidden
|
||||
// (access denied).
|
||||
// The account ID of the expected bucket owner. If the account ID that you provide
|
||||
// does not match the actual owner of the bucket, the request fails with the HTTP
|
||||
// status code 403 Forbidden (access denied).
|
||||
ExpectedBucketOwner *string
|
||||
|
||||
noSmithyDocumentSerde
|
||||
@@ -51,7 +53,7 @@ type DeleteBucketOwnershipControlsInput struct {
|
||||
|
||||
func (in *DeleteBucketOwnershipControlsInput) bindEndpointParams(p *EndpointParameters) {
|
||||
p.Bucket = in.Bucket
|
||||
|
||||
p.UseS3ExpressControlEndpoint = ptr.Bool(true)
|
||||
}
|
||||
|
||||
type DeleteBucketOwnershipControlsOutput struct {
|
||||
@@ -116,6 +118,9 @@ func (c *Client) addOperationDeleteBucketOwnershipControlsMiddlewares(stack *mid
|
||||
if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addPutBucketContextMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addOpDeleteBucketOwnershipControlsValidationMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
+55
-22
@@ -9,26 +9,46 @@ import (
|
||||
"github.com/aws/aws-sdk-go-v2/aws/signer/v4"
|
||||
s3cust "github.com/aws/aws-sdk-go-v2/service/s3/internal/customizations"
|
||||
"github.com/aws/smithy-go/middleware"
|
||||
"github.com/aws/smithy-go/ptr"
|
||||
smithyhttp "github.com/aws/smithy-go/transport/http"
|
||||
)
|
||||
|
||||
// This implementation of the DELETE action uses the policy subresource to delete
|
||||
// the policy of a specified bucket. 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 have the DeleteBucketPolicy permissions on the specified bucket
|
||||
// and belong to the bucket owner's account 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. For more information about bucket policies, see
|
||||
// Using Bucket Policies and UserPolicies (https://docs.aws.amazon.com/AmazonS3/latest/dev/using-iam-policies.html)
|
||||
// . The following operations are related to DeleteBucketPolicy
|
||||
// Deletes the policy of a specified bucket. Directory buckets - For directory
|
||||
// buckets, you must make requests for this API operation to the Regional endpoint.
|
||||
// These endpoints support path-style requests in the format
|
||||
// https://s3express-control.region_code.amazonaws.com/bucket-name .
|
||||
// Virtual-hosted-style requests aren't supported. For more information, see
|
||||
// Regional and Zonal endpoints (https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-express-Regions-and-Zones.html)
|
||||
// in the Amazon S3 User Guide. Permissions If you are using an identity other than
|
||||
// the root user of the Amazon Web Services account that owns the bucket, the
|
||||
// calling identity must both have the DeleteBucketPolicy permissions on the
|
||||
// specified bucket and belong to the bucket owner's account in order to use this
|
||||
// operation. If you don't have DeleteBucketPolicy permissions, Amazon S3 returns
|
||||
// a 403 Access Denied error. If you have the correct permissions, but you're not
|
||||
// using an identity that belongs to the bucket owner's account, Amazon S3 returns
|
||||
// a 405 Method Not Allowed error. To ensure that bucket owners don't
|
||||
// inadvertently lock themselves out of their own buckets, the root principal in a
|
||||
// bucket owner's Amazon Web Services account can perform the GetBucketPolicy ,
|
||||
// PutBucketPolicy , and DeleteBucketPolicy API actions, even if their bucket
|
||||
// policy explicitly denies the root principal's access. Bucket owner root
|
||||
// principals can only be blocked from performing these API actions by VPC endpoint
|
||||
// policies and Amazon Web Services Organizations policies.
|
||||
// - General purpose bucket permissions - The s3:DeleteBucketPolicy permission is
|
||||
// required in a policy. For more information about general purpose buckets bucket
|
||||
// policies, see Using Bucket Policies and User Policies (https://docs.aws.amazon.com/AmazonS3/latest/dev/using-iam-policies.html)
|
||||
// in the Amazon S3 User Guide.
|
||||
// - Directory bucket permissions - To grant access to this API operation, you
|
||||
// must have the s3express:DeleteBucketPolicy permission in an IAM identity-based
|
||||
// policy instead of a bucket policy. Cross-account access to this API operation
|
||||
// isn't supported. This operation can only be performed by the Amazon Web Services
|
||||
// account that owns the resource. For more information about directory bucket
|
||||
// policies and permissions, see Amazon Web Services Identity and Access
|
||||
// Management (IAM) for S3 Express One Zone (https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-express-security-iam.html)
|
||||
// in the Amazon S3 User Guide.
|
||||
//
|
||||
// HTTP Host header syntax Directory buckets - The HTTP Host header syntax is
|
||||
// s3express-control.region.amazonaws.com . The following operations are related to
|
||||
// DeleteBucketPolicy
|
||||
// - CreateBucket (https://docs.aws.amazon.com/AmazonS3/latest/API/API_CreateBucket.html)
|
||||
// - DeleteObject (https://docs.aws.amazon.com/AmazonS3/latest/API/API_DeleteObject.html)
|
||||
func (c *Client) DeleteBucketPolicy(ctx context.Context, params *DeleteBucketPolicyInput, optFns ...func(*Options)) (*DeleteBucketPolicyOutput, error) {
|
||||
@@ -48,14 +68,24 @@ func (c *Client) DeleteBucketPolicy(ctx context.Context, params *DeleteBucketPol
|
||||
|
||||
type DeleteBucketPolicyInput struct {
|
||||
|
||||
// The bucket name.
|
||||
// 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
|
||||
//
|
||||
// This member is required.
|
||||
Bucket *string
|
||||
|
||||
// The account ID of the expected bucket owner. If the bucket is owned by a
|
||||
// different account, the request fails with the HTTP status code 403 Forbidden
|
||||
// (access denied).
|
||||
// The account ID of the expected bucket owner. If the account ID that you provide
|
||||
// does not match the actual owner of the bucket, the request fails with the HTTP
|
||||
// status code 403 Forbidden (access denied). For directory buckets, this header
|
||||
// is not supported in this API operation. If you specify this header, the request
|
||||
// fails with the HTTP status code 501 Not Implemented .
|
||||
ExpectedBucketOwner *string
|
||||
|
||||
noSmithyDocumentSerde
|
||||
@@ -63,7 +93,7 @@ type DeleteBucketPolicyInput struct {
|
||||
|
||||
func (in *DeleteBucketPolicyInput) bindEndpointParams(p *EndpointParameters) {
|
||||
p.Bucket = in.Bucket
|
||||
|
||||
p.UseS3ExpressControlEndpoint = ptr.Bool(true)
|
||||
}
|
||||
|
||||
type DeleteBucketPolicyOutput struct {
|
||||
@@ -128,6 +158,9 @@ func (c *Client) addOperationDeleteBucketPolicyMiddlewares(stack *middleware.Sta
|
||||
if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addPutBucketContextMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addOpDeleteBucketPolicyValidationMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
+13
-9
@@ -9,14 +9,15 @@ import (
|
||||
"github.com/aws/aws-sdk-go-v2/aws/signer/v4"
|
||||
s3cust "github.com/aws/aws-sdk-go-v2/service/s3/internal/customizations"
|
||||
"github.com/aws/smithy-go/middleware"
|
||||
"github.com/aws/smithy-go/ptr"
|
||||
smithyhttp "github.com/aws/smithy-go/transport/http"
|
||||
)
|
||||
|
||||
// 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)
|
||||
// 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)
|
||||
@@ -46,9 +47,9 @@ type DeleteBucketReplicationInput struct {
|
||||
// This member is required.
|
||||
Bucket *string
|
||||
|
||||
// The account ID of the expected bucket owner. If the bucket is owned by a
|
||||
// different account, the request fails with the HTTP status code 403 Forbidden
|
||||
// (access denied).
|
||||
// The account ID of the expected bucket owner. If the account ID that you provide
|
||||
// does not match the actual owner of the bucket, the request fails with the HTTP
|
||||
// status code 403 Forbidden (access denied).
|
||||
ExpectedBucketOwner *string
|
||||
|
||||
noSmithyDocumentSerde
|
||||
@@ -56,7 +57,7 @@ type DeleteBucketReplicationInput struct {
|
||||
|
||||
func (in *DeleteBucketReplicationInput) bindEndpointParams(p *EndpointParameters) {
|
||||
p.Bucket = in.Bucket
|
||||
|
||||
p.UseS3ExpressControlEndpoint = ptr.Bool(true)
|
||||
}
|
||||
|
||||
type DeleteBucketReplicationOutput struct {
|
||||
@@ -121,6 +122,9 @@ func (c *Client) addOperationDeleteBucketReplicationMiddlewares(stack *middlewar
|
||||
if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addPutBucketContextMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addOpDeleteBucketReplicationValidationMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
+13
-8
@@ -9,13 +9,15 @@ import (
|
||||
"github.com/aws/aws-sdk-go-v2/aws/signer/v4"
|
||||
s3cust "github.com/aws/aws-sdk-go-v2/service/s3/internal/customizations"
|
||||
"github.com/aws/smithy-go/middleware"
|
||||
"github.com/aws/smithy-go/ptr"
|
||||
smithyhttp "github.com/aws/smithy-go/transport/http"
|
||||
)
|
||||
|
||||
// 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 :
|
||||
// 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)
|
||||
func (c *Client) DeleteBucketTagging(ctx context.Context, params *DeleteBucketTaggingInput, optFns ...func(*Options)) (*DeleteBucketTaggingOutput, error) {
|
||||
@@ -40,9 +42,9 @@ type DeleteBucketTaggingInput struct {
|
||||
// This member is required.
|
||||
Bucket *string
|
||||
|
||||
// The account ID of the expected bucket owner. If the bucket is owned by a
|
||||
// different account, the request fails with the HTTP status code 403 Forbidden
|
||||
// (access denied).
|
||||
// The account ID of the expected bucket owner. If the account ID that you provide
|
||||
// does not match the actual owner of the bucket, the request fails with the HTTP
|
||||
// status code 403 Forbidden (access denied).
|
||||
ExpectedBucketOwner *string
|
||||
|
||||
noSmithyDocumentSerde
|
||||
@@ -50,7 +52,7 @@ type DeleteBucketTaggingInput struct {
|
||||
|
||||
func (in *DeleteBucketTaggingInput) bindEndpointParams(p *EndpointParameters) {
|
||||
p.Bucket = in.Bucket
|
||||
|
||||
p.UseS3ExpressControlEndpoint = ptr.Bool(true)
|
||||
}
|
||||
|
||||
type DeleteBucketTaggingOutput struct {
|
||||
@@ -115,6 +117,9 @@ func (c *Client) addOperationDeleteBucketTaggingMiddlewares(stack *middleware.St
|
||||
if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addPutBucketContextMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addOpDeleteBucketTaggingValidationMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
+19
-15
@@ -9,20 +9,21 @@ import (
|
||||
"github.com/aws/aws-sdk-go-v2/aws/signer/v4"
|
||||
s3cust "github.com/aws/aws-sdk-go-v2/service/s3/internal/customizations"
|
||||
"github.com/aws/smithy-go/middleware"
|
||||
"github.com/aws/smithy-go/ptr"
|
||||
smithyhttp "github.com/aws/smithy-go/transport/http"
|
||||
)
|
||||
|
||||
// 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)
|
||||
// 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)
|
||||
@@ -48,9 +49,9 @@ type DeleteBucketWebsiteInput struct {
|
||||
// This member is required.
|
||||
Bucket *string
|
||||
|
||||
// The account ID of the expected bucket owner. If the bucket is owned by a
|
||||
// different account, the request fails with the HTTP status code 403 Forbidden
|
||||
// (access denied).
|
||||
// The account ID of the expected bucket owner. If the account ID that you provide
|
||||
// does not match the actual owner of the bucket, the request fails with the HTTP
|
||||
// status code 403 Forbidden (access denied).
|
||||
ExpectedBucketOwner *string
|
||||
|
||||
noSmithyDocumentSerde
|
||||
@@ -58,7 +59,7 @@ type DeleteBucketWebsiteInput struct {
|
||||
|
||||
func (in *DeleteBucketWebsiteInput) bindEndpointParams(p *EndpointParameters) {
|
||||
p.Bucket = in.Bucket
|
||||
|
||||
p.UseS3ExpressControlEndpoint = ptr.Bool(true)
|
||||
}
|
||||
|
||||
type DeleteBucketWebsiteOutput struct {
|
||||
@@ -123,6 +124,9 @@ func (c *Client) addOperationDeleteBucketWebsiteMiddlewares(stack *middleware.St
|
||||
if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addPutBucketContextMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addOpDeleteBucketWebsiteValidationMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
+100
-37
@@ -13,24 +13,69 @@ import (
|
||||
smithyhttp "github.com/aws/smithy-go/transport/http"
|
||||
)
|
||||
|
||||
// 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. To remove a specific version, you must use the version
|
||||
// Id subresource. Using this subresource 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)
|
||||
// . To see sample requests that use versioning, see Sample Request (https://docs.aws.amazon.com/AmazonS3/latest/API/RESTObjectDELETE.html#ExampleVersionObjectDelete)
|
||||
// . You can delete objects by explicitly calling DELETE Object or configure its
|
||||
// lifecycle ( PutBucketLifecycle (https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketLifecycle.html)
|
||||
// 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 versioning is suspended or not enabled, the operation permanently
|
||||
// deletes the object.
|
||||
//
|
||||
// - Directory buckets - S3 Versioning isn't enabled and supported for directory
|
||||
// buckets. For this API operation, only the null value of the version ID is
|
||||
// supported by directory buckets. You can only specify null to the versionId
|
||||
// query parameter in the request.
|
||||
//
|
||||
// - Directory buckets - For directory buckets, you must make requests for this
|
||||
// API operation to the Zonal endpoint. These endpoints support
|
||||
// virtual-hosted-style requests in the format
|
||||
// https://bucket_name.s3express-az_id.region.amazonaws.com/key-name .
|
||||
// Path-style requests are not supported. For more information, see Regional and
|
||||
// Zonal endpoints (https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-express-Regions-and-Zones.html)
|
||||
// in the Amazon S3 User Guide.
|
||||
//
|
||||
// To remove a specific version, you must use the versionId query parameter. Using
|
||||
// this query parameter permanently deletes the version. If the object deleted is a
|
||||
// delete marker, Amazon S3 sets the response header x-amz-delete-marker to true.
|
||||
// If the object you want to delete is in a bucket where the bucket versioning
|
||||
// configuration is MFA Delete enabled, you must include the x-amz-mfa request
|
||||
// header in the DELETE versionId request. Requests that include x-amz-mfa must
|
||||
// use HTTPS. For more information about MFA Delete, see Using MFA Delete (https://docs.aws.amazon.com/AmazonS3/latest/dev/UsingMFADelete.html)
|
||||
// in the Amazon S3 User Guide. To see sample requests that use versioning, see
|
||||
// Sample Request (https://docs.aws.amazon.com/AmazonS3/latest/API/RESTObjectDELETE.html#ExampleVersionObjectDelete)
|
||||
// . Directory buckets - MFA delete is not supported by directory buckets. You can
|
||||
// delete objects by explicitly calling DELETE Object or calling (
|
||||
// PutBucketLifecycle (https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketLifecycle.html)
|
||||
// ) to enable Amazon S3 to remove them for you. If you want to block users or
|
||||
// accounts from removing or deleting objects from your bucket, you must deny them
|
||||
// the s3:DeleteObject , s3:DeleteObjectVersion , and s3:PutLifeCycleConfiguration
|
||||
// actions. The following action is related to DeleteObject :
|
||||
// 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.
|
||||
// - Directory bucket permissions - To grant access to this API operation on a
|
||||
// directory bucket, we recommend that you use the CreateSession (https://docs.aws.amazon.com/AmazonS3/latest/API/API_CreateSession.html)
|
||||
// API operation for session-based authorization. Specifically, you grant the
|
||||
// s3express:CreateSession permission to the directory bucket in a bucket policy
|
||||
// or an IAM identity-based policy. Then, you make the CreateSession API call on
|
||||
// the bucket to obtain a session token. With the session token in your request
|
||||
// header, you can make API requests to this operation. After the session token
|
||||
// expires, you make another CreateSession API call to generate a new session
|
||||
// token for use. Amazon Web Services CLI or SDKs create session and refresh the
|
||||
// session token automatically to avoid service interruptions when a session
|
||||
// expires. For more information about authorization, see CreateSession (https://docs.aws.amazon.com/AmazonS3/latest/API/API_CreateSession.html)
|
||||
// .
|
||||
//
|
||||
// HTTP Host header syntax Directory buckets - The HTTP Host header syntax is
|
||||
// Bucket_name.s3express-az_id.region.amazonaws.com . The following action is
|
||||
// related to DeleteObject :
|
||||
// - PutObject (https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutObject.html)
|
||||
func (c *Client) DeleteObject(ctx context.Context, params *DeleteObjectInput, optFns ...func(*Options)) (*DeleteObjectOutput, error) {
|
||||
if params == nil {
|
||||
@@ -49,16 +94,26 @@ func (c *Client) DeleteObject(ctx context.Context, params *DeleteObjectInput, op
|
||||
|
||||
type DeleteObjectInput struct {
|
||||
|
||||
// The bucket name of the bucket containing the object. When using this action
|
||||
// with an access point, 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. 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 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
|
||||
// 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
|
||||
@@ -75,30 +130,34 @@ 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.
|
||||
// s3:BypassGovernanceRetention permission. This functionality is not supported for
|
||||
// directory buckets.
|
||||
BypassGovernanceRetention *bool
|
||||
|
||||
// The account ID of the expected bucket owner. If the bucket is owned by a
|
||||
// different account, the request fails with the HTTP status code 403 Forbidden
|
||||
// (access denied).
|
||||
// The account ID of the expected bucket owner. If the account ID that you provide
|
||||
// does not match the actual owner of the bucket, the request fails with the HTTP
|
||||
// status code 403 Forbidden (access denied).
|
||||
ExpectedBucketOwner *string
|
||||
|
||||
// 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.
|
||||
// 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 Amazon S3 bucket has Requester Pays enabled, the requester
|
||||
// will pay for corresponding charges to copy the object. For information about
|
||||
// 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.
|
||||
// in the Amazon S3 User Guide. This functionality is not supported for directory
|
||||
// buckets.
|
||||
RequestPayer types.RequestPayer
|
||||
|
||||
// VersionId used to reference a specific version of the object.
|
||||
// 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
|
||||
@@ -115,15 +174,16 @@ 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.
|
||||
// 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.
|
||||
// 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.
|
||||
// operation. This functionality is not supported for directory buckets.
|
||||
VersionId *string
|
||||
|
||||
// Metadata pertaining to the operation's result.
|
||||
@@ -187,6 +247,9 @@ func (c *Client) addOperationDeleteObjectMiddlewares(stack *middleware.Stack, op
|
||||
if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addPutBucketContextMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addOpDeleteObjectValidationMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
+17
-11
@@ -12,8 +12,9 @@ import (
|
||||
smithyhttp "github.com/aws/smithy-go/transport/http"
|
||||
)
|
||||
|
||||
// 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)
|
||||
// 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
|
||||
@@ -38,16 +39,18 @@ func (c *Client) DeleteObjectTagging(ctx context.Context, params *DeleteObjectTa
|
||||
|
||||
type DeleteObjectTaggingInput struct {
|
||||
|
||||
// The bucket name containing the objects from which to remove the tags. When
|
||||
// using this action with an access point, you must direct requests to the access
|
||||
// point hostname. The access point hostname takes the form
|
||||
// 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. 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
|
||||
// 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
|
||||
@@ -62,9 +65,9 @@ type DeleteObjectTaggingInput struct {
|
||||
// This member is required.
|
||||
Key *string
|
||||
|
||||
// The account ID of the expected bucket owner. If the bucket is owned by a
|
||||
// different account, the request fails with the HTTP status code 403 Forbidden
|
||||
// (access denied).
|
||||
// The account ID of the expected bucket owner. If the account ID that you provide
|
||||
// does not match the actual owner of the bucket, the request fails with the HTTP
|
||||
// status code 403 Forbidden (access denied).
|
||||
ExpectedBucketOwner *string
|
||||
|
||||
// The versionId of the object that the tag-set will be removed from.
|
||||
@@ -144,6 +147,9 @@ func (c *Client) addOperationDeleteObjectTaggingMiddlewares(stack *middleware.St
|
||||
if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addPutBucketContextMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addOpDeleteObjectTaggingValidationMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
+129
-54
@@ -14,31 +14,72 @@ import (
|
||||
smithyhttp "github.com/aws/smithy-go/transport/http"
|
||||
)
|
||||
|
||||
// This action 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
|
||||
// action provides a suitable alternative to sending individual delete requests,
|
||||
// reducing per-request overhead. The request contains 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
|
||||
// action 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. The action supports two modes for the
|
||||
// response: verbose and quiet. By default, the action 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 action encountered
|
||||
// an error. For a successful deletion, the action 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)
|
||||
// . Finally, the Content-MD5 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. The following operations are related to
|
||||
// DeleteObjects :
|
||||
// This operation enables you to delete multiple objects from a bucket using a
|
||||
// single HTTP request. If you know the object keys that you want to delete, then
|
||||
// this operation provides a suitable alternative to sending individual delete
|
||||
// requests, reducing per-request overhead. The request can contain a list of up to
|
||||
// 1000 keys that you want to delete. In the XML, you provide the object key names,
|
||||
// and optionally, version IDs if you want to delete a specific version of the
|
||||
// object from a versioning-enabled bucket. For each key, Amazon S3 performs a
|
||||
// delete operation and returns the result of that delete, success or failure, in
|
||||
// the response. Note that if the object specified in the request is not found,
|
||||
// Amazon S3 returns the result as deleted.
|
||||
// - Directory buckets - S3 Versioning isn't enabled and supported for directory
|
||||
// buckets.
|
||||
// - Directory buckets - For directory buckets, you must make requests for this
|
||||
// API operation to the Zonal endpoint. These endpoints support
|
||||
// virtual-hosted-style requests in the format
|
||||
// https://bucket_name.s3express-az_id.region.amazonaws.com/key-name .
|
||||
// Path-style requests are not supported. For more information, see Regional and
|
||||
// Zonal endpoints (https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-express-Regions-and-Zones.html)
|
||||
// in the Amazon S3 User Guide.
|
||||
//
|
||||
// The operation supports two modes for the response: verbose and quiet. By
|
||||
// default, the operation uses verbose mode in which the response includes the
|
||||
// result of deletion of each key in your request. In quiet mode the response
|
||||
// includes only keys where the delete operation encountered an error. For a
|
||||
// successful deletion in a quiet mode, the operation does not return any
|
||||
// information about the delete in the response body. When performing this action
|
||||
// on an MFA Delete enabled bucket, that attempts to delete any versioned objects,
|
||||
// you must include an MFA token. If you do not provide one, the entire request
|
||||
// will fail, even if there are non-versioned objects you are trying to delete. If
|
||||
// you provide an invalid token, whether there are versioned keys in the request or
|
||||
// not, the entire Multi-Object Delete request will fail. For information about MFA
|
||||
// Delete, see MFA Delete (https://docs.aws.amazon.com/AmazonS3/latest/dev/Versioning.html#MultiFactorAuthenticationDelete)
|
||||
// in the Amazon S3 User Guide. Directory buckets - MFA delete is not supported by
|
||||
// directory buckets. Permissions
|
||||
// - General purpose bucket permissions - The following permissions are required
|
||||
// in your policies when your DeleteObjects request includes specific headers.
|
||||
// - s3:DeleteObject - To delete an object from a bucket, you must always specify
|
||||
// the s3:DeleteObject permission.
|
||||
// - s3:DeleteObjectVersion - To delete a specific version of an object from a
|
||||
// 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
|
||||
// s3express:CreateSession permission to the directory bucket in a bucket policy
|
||||
// or an IAM identity-based policy. Then, you make the CreateSession API call on
|
||||
// the bucket to obtain a session token. With the session token in your request
|
||||
// header, you can make API requests to this operation. After the session token
|
||||
// expires, you make another CreateSession API call to generate a new session
|
||||
// token for use. Amazon Web Services CLI or SDKs create session and refresh the
|
||||
// session token automatically to avoid service interruptions when a session
|
||||
// expires. For more information about authorization, see CreateSession (https://docs.aws.amazon.com/AmazonS3/latest/API/API_CreateSession.html)
|
||||
// .
|
||||
//
|
||||
// Content-MD5 request header
|
||||
// - General purpose bucket - The Content-MD5 request header is required for all
|
||||
// Multi-Object Delete requests. Amazon S3 uses the header value to ensure that
|
||||
// your request body has not been altered in transit.
|
||||
// - Directory bucket - The Content-MD5 request header or a additional checksum
|
||||
// request header (including x-amz-checksum-crc32 , x-amz-checksum-crc32c ,
|
||||
// x-amz-checksum-sha1 , or x-amz-checksum-sha256 ) is required for all
|
||||
// Multi-Object Delete requests.
|
||||
//
|
||||
// HTTP Host header syntax Directory buckets - The HTTP Host header syntax is
|
||||
// Bucket_name.s3express-az_id.region.amazonaws.com . The following operations are
|
||||
// related to DeleteObjects :
|
||||
// - CreateMultipartUpload (https://docs.aws.amazon.com/AmazonS3/latest/API/API_CreateMultipartUpload.html)
|
||||
// - UploadPart (https://docs.aws.amazon.com/AmazonS3/latest/API/API_UploadPart.html)
|
||||
// - CompleteMultipartUpload (https://docs.aws.amazon.com/AmazonS3/latest/API/API_CompleteMultipartUpload.html)
|
||||
@@ -61,16 +102,26 @@ func (c *Client) DeleteObjects(ctx context.Context, params *DeleteObjectsInput,
|
||||
|
||||
type DeleteObjectsInput struct {
|
||||
|
||||
// The bucket name containing the objects to delete. When using this action with
|
||||
// an access point, 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. 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-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
|
||||
// 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
|
||||
@@ -87,39 +138,57 @@ 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.
|
||||
// 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 using
|
||||
// the SDK. This header will not provide any additional functionality if not using
|
||||
// the SDK. When sending this header, there must be a corresponding x-amz-checksum
|
||||
// or x-amz-trailer header sent. Otherwise, Amazon S3 fails the request with the
|
||||
// HTTP status code 400 Bad Request . For more information, see Checking object
|
||||
// integrity (https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html)
|
||||
// in the Amazon S3 User Guide. If you provide an individual checksum, Amazon S3
|
||||
// ignores any provided ChecksumAlgorithm parameter. This checksum algorithm must
|
||||
// be the same for all parts and it match the checksum value supplied in the
|
||||
// CreateMultipartUpload request.
|
||||
// Indicates the algorithm used to create the checksum for the object when you use
|
||||
// the SDK. This header will not provide any additional functionality if you don't
|
||||
// use the SDK. When you send this header, there must be a corresponding
|
||||
// x-amz-checksum-algorithm or x-amz-trailer header sent. Otherwise, Amazon S3
|
||||
// fails the request with the HTTP status code 400 Bad Request . For the
|
||||
// x-amz-checksum-algorithm header, replace algorithm with the supported
|
||||
// algorithm from the following list:
|
||||
// - CRC32
|
||||
// - CRC32C
|
||||
// - SHA1
|
||||
// - SHA256
|
||||
// For more information, see Checking object integrity (https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html)
|
||||
// in the Amazon S3 User Guide. If the individual checksum value you provide
|
||||
// through x-amz-checksum-algorithm doesn't match the checksum algorithm you set
|
||||
// through x-amz-sdk-checksum-algorithm , Amazon S3 ignores any provided
|
||||
// ChecksumAlgorithm parameter and uses the checksum algorithm that matches the
|
||||
// provided value in x-amz-checksum-algorithm . If you provide an individual
|
||||
// checksum, Amazon S3 ignores any provided ChecksumAlgorithm parameter.
|
||||
ChecksumAlgorithm types.ChecksumAlgorithm
|
||||
|
||||
// The account ID of the expected bucket owner. If the bucket is owned by a
|
||||
// different account, the request fails with the HTTP status code 403 Forbidden
|
||||
// (access denied).
|
||||
// The account ID of the expected bucket owner. If the account ID that you provide
|
||||
// does not match the actual owner of the bucket, the request fails with the HTTP
|
||||
// status code 403 Forbidden (access denied).
|
||||
ExpectedBucketOwner *string
|
||||
|
||||
// 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.
|
||||
// delete enabled. When performing the DeleteObjects operation on an MFA delete
|
||||
// enabled bucket, which attempts to delete the specified versioned objects, you
|
||||
// must include an MFA token. If you don't provide an MFA token, the entire request
|
||||
// will fail, even if there are non-versioned objects that you are trying to
|
||||
// delete. If you provide an invalid token, whether there are versioned object keys
|
||||
// in the request or not, the entire Multi-Object Delete request will fail. For
|
||||
// information about MFA Delete, see MFA Delete (https://docs.aws.amazon.com/AmazonS3/latest/dev/Versioning.html#MultiFactorAuthenticationDelete)
|
||||
// in the Amazon S3 User Guide. This functionality is not supported for directory
|
||||
// buckets.
|
||||
MFA *string
|
||||
|
||||
// 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 Amazon S3 bucket has Requester Pays enabled, the requester
|
||||
// will pay for corresponding charges to copy the object. For information about
|
||||
// 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.
|
||||
// in the Amazon S3 User Guide. This functionality is not supported for directory
|
||||
// buckets.
|
||||
RequestPayer types.RequestPayer
|
||||
|
||||
noSmithyDocumentSerde
|
||||
@@ -141,7 +210,7 @@ type DeleteObjectsOutput struct {
|
||||
Errors []types.Error
|
||||
|
||||
// If present, indicates that the requester was successfully charged for the
|
||||
// request.
|
||||
// request. This functionality is not supported for directory buckets.
|
||||
RequestCharged types.RequestCharged
|
||||
|
||||
// Metadata pertaining to the operation's result.
|
||||
@@ -205,6 +274,9 @@ func (c *Client) addOperationDeleteObjectsMiddlewares(stack *middleware.Stack, o
|
||||
if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addPutBucketContextMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addOpDeleteObjectsValidationMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
@@ -241,6 +313,9 @@ func (c *Client) addOperationDeleteObjectsMiddlewares(stack *middleware.Stack, o
|
||||
if err = addSerializeImmutableHostnameBucketMiddleware(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = s3cust.AddExpressDefaultChecksumMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
|
||||
+13
-8
@@ -9,13 +9,15 @@ import (
|
||||
"github.com/aws/aws-sdk-go-v2/aws/signer/v4"
|
||||
s3cust "github.com/aws/aws-sdk-go-v2/service/s3/internal/customizations"
|
||||
"github.com/aws/smithy-go/middleware"
|
||||
"github.com/aws/smithy-go/ptr"
|
||||
smithyhttp "github.com/aws/smithy-go/transport/http"
|
||||
)
|
||||
|
||||
// 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)
|
||||
// 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)
|
||||
@@ -44,9 +46,9 @@ type DeletePublicAccessBlockInput struct {
|
||||
// This member is required.
|
||||
Bucket *string
|
||||
|
||||
// The account ID of the expected bucket owner. If the bucket is owned by a
|
||||
// different account, the request fails with the HTTP status code 403 Forbidden
|
||||
// (access denied).
|
||||
// The account ID of the expected bucket owner. If the account ID that you provide
|
||||
// does not match the actual owner of the bucket, the request fails with the HTTP
|
||||
// status code 403 Forbidden (access denied).
|
||||
ExpectedBucketOwner *string
|
||||
|
||||
noSmithyDocumentSerde
|
||||
@@ -54,7 +56,7 @@ type DeletePublicAccessBlockInput struct {
|
||||
|
||||
func (in *DeletePublicAccessBlockInput) bindEndpointParams(p *EndpointParameters) {
|
||||
p.Bucket = in.Bucket
|
||||
|
||||
p.UseS3ExpressControlEndpoint = ptr.Bool(true)
|
||||
}
|
||||
|
||||
type DeletePublicAccessBlockOutput struct {
|
||||
@@ -119,6 +121,9 @@ func (c *Client) addOperationDeletePublicAccessBlockMiddlewares(stack *middlewar
|
||||
if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addPutBucketContextMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addOpDeletePublicAccessBlockValidationMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
Generated
Vendored
+22
-16
@@ -10,17 +10,19 @@ import (
|
||||
s3cust "github.com/aws/aws-sdk-go-v2/service/s3/internal/customizations"
|
||||
"github.com/aws/aws-sdk-go-v2/service/s3/types"
|
||||
"github.com/aws/smithy-go/middleware"
|
||||
"github.com/aws/smithy-go/ptr"
|
||||
smithyhttp "github.com/aws/smithy-go/transport/http"
|
||||
)
|
||||
|
||||
// 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)
|
||||
// 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
|
||||
@@ -54,18 +56,19 @@ type GetBucketAccelerateConfigurationInput struct {
|
||||
// This member is required.
|
||||
Bucket *string
|
||||
|
||||
// The account ID of the expected bucket owner. If the bucket is owned by a
|
||||
// different account, the request fails with the HTTP status code 403 Forbidden
|
||||
// (access denied).
|
||||
// The account ID of the expected bucket owner. If the account ID that you provide
|
||||
// does not match the actual owner of the bucket, the request fails with the HTTP
|
||||
// status code 403 Forbidden (access denied).
|
||||
ExpectedBucketOwner *string
|
||||
|
||||
// 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 Amazon S3 bucket has Requester Pays enabled, the requester
|
||||
// will pay for corresponding charges to copy the object. For information about
|
||||
// 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.
|
||||
// in the Amazon S3 User Guide. This functionality is not supported for directory
|
||||
// buckets.
|
||||
RequestPayer types.RequestPayer
|
||||
|
||||
noSmithyDocumentSerde
|
||||
@@ -73,13 +76,13 @@ type GetBucketAccelerateConfigurationInput struct {
|
||||
|
||||
func (in *GetBucketAccelerateConfigurationInput) bindEndpointParams(p *EndpointParameters) {
|
||||
p.Bucket = in.Bucket
|
||||
|
||||
p.UseS3ExpressControlEndpoint = ptr.Bool(true)
|
||||
}
|
||||
|
||||
type GetBucketAccelerateConfigurationOutput struct {
|
||||
|
||||
// If present, indicates that the requester was successfully charged for the
|
||||
// request.
|
||||
// request. This functionality is not supported for directory buckets.
|
||||
RequestCharged types.RequestCharged
|
||||
|
||||
// The accelerate configuration of the bucket.
|
||||
@@ -146,6 +149,9 @@ func (c *Client) addOperationGetBucketAccelerateConfigurationMiddlewares(stack *
|
||||
if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addPutBucketContextMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addOpGetBucketAccelerateConfigurationValidationMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
+24
-19
@@ -10,17 +10,19 @@ import (
|
||||
s3cust "github.com/aws/aws-sdk-go-v2/service/s3/internal/customizations"
|
||||
"github.com/aws/aws-sdk-go-v2/service/s3/types"
|
||||
"github.com/aws/smithy-go/middleware"
|
||||
"github.com/aws/smithy-go/ptr"
|
||||
smithyhttp "github.com/aws/smithy-go/transport/http"
|
||||
)
|
||||
|
||||
// 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 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. To use this API operation against an access
|
||||
// point, provide the alias of the access point in place of the bucket name. To use
|
||||
// this API operation against an Object Lambda access point, provide the alias of
|
||||
// the Object Lambda access point in place of the bucket name. If the Object Lambda
|
||||
// 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)
|
||||
@@ -49,21 +51,21 @@ func (c *Client) GetBucketAcl(ctx context.Context, params *GetBucketAclInput, op
|
||||
|
||||
type GetBucketAclInput struct {
|
||||
|
||||
// Specifies the S3 bucket whose ACL is being requested. To use this API operation
|
||||
// against an access point, provide the alias of the access point in place of the
|
||||
// bucket name. To use this API operation against 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 (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 bucket is owned by a
|
||||
// different account, the request fails with the HTTP status code 403 Forbidden
|
||||
// (access denied).
|
||||
// The account ID of the expected bucket owner. If the account ID that you provide
|
||||
// does not match the actual owner of the bucket, the request fails with the HTTP
|
||||
// status code 403 Forbidden (access denied).
|
||||
ExpectedBucketOwner *string
|
||||
|
||||
noSmithyDocumentSerde
|
||||
@@ -71,7 +73,7 @@ type GetBucketAclInput struct {
|
||||
|
||||
func (in *GetBucketAclInput) bindEndpointParams(p *EndpointParameters) {
|
||||
p.Bucket = in.Bucket
|
||||
|
||||
p.UseS3ExpressControlEndpoint = ptr.Bool(true)
|
||||
}
|
||||
|
||||
type GetBucketAclOutput struct {
|
||||
@@ -143,6 +145,9 @@ func (c *Client) addOperationGetBucketAclMiddlewares(stack *middleware.Stack, op
|
||||
if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addPutBucketContextMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addOpGetBucketAclValidationMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
Generated
Vendored
+15
-10
@@ -10,15 +10,17 @@ import (
|
||||
s3cust "github.com/aws/aws-sdk-go-v2/service/s3/internal/customizations"
|
||||
"github.com/aws/aws-sdk-go-v2/service/s3/types"
|
||||
"github.com/aws/smithy-go/middleware"
|
||||
"github.com/aws/smithy-go/ptr"
|
||||
smithyhttp "github.com/aws/smithy-go/transport/http"
|
||||
)
|
||||
|
||||
// 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)
|
||||
// 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)
|
||||
@@ -54,9 +56,9 @@ type GetBucketAnalyticsConfigurationInput struct {
|
||||
// This member is required.
|
||||
Id *string
|
||||
|
||||
// The account ID of the expected bucket owner. If the bucket is owned by a
|
||||
// different account, the request fails with the HTTP status code 403 Forbidden
|
||||
// (access denied).
|
||||
// The account ID of the expected bucket owner. If the account ID that you provide
|
||||
// does not match the actual owner of the bucket, the request fails with the HTTP
|
||||
// status code 403 Forbidden (access denied).
|
||||
ExpectedBucketOwner *string
|
||||
|
||||
noSmithyDocumentSerde
|
||||
@@ -64,7 +66,7 @@ type GetBucketAnalyticsConfigurationInput struct {
|
||||
|
||||
func (in *GetBucketAnalyticsConfigurationInput) bindEndpointParams(p *EndpointParameters) {
|
||||
p.Bucket = in.Bucket
|
||||
|
||||
p.UseS3ExpressControlEndpoint = ptr.Bool(true)
|
||||
}
|
||||
|
||||
type GetBucketAnalyticsConfigurationOutput struct {
|
||||
@@ -133,6 +135,9 @@ func (c *Client) addOperationGetBucketAnalyticsConfigurationMiddlewares(stack *m
|
||||
if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addPutBucketContextMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addOpGetBucketAnalyticsConfigurationValidationMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
+26
-21
@@ -10,19 +10,21 @@ import (
|
||||
s3cust "github.com/aws/aws-sdk-go-v2/service/s3/internal/customizations"
|
||||
"github.com/aws/aws-sdk-go-v2/service/s3/types"
|
||||
"github.com/aws/smithy-go/middleware"
|
||||
"github.com/aws/smithy-go/ptr"
|
||||
smithyhttp "github.com/aws/smithy-go/transport/http"
|
||||
)
|
||||
|
||||
// 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. To use this API operation against an access point,
|
||||
// provide the alias of the access point in place of the bucket name. To use this
|
||||
// API operation against 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)
|
||||
// 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)
|
||||
@@ -44,21 +46,21 @@ func (c *Client) GetBucketCors(ctx context.Context, params *GetBucketCorsInput,
|
||||
|
||||
type GetBucketCorsInput struct {
|
||||
|
||||
// The bucket name for which to get the cors configuration. To use this API
|
||||
// operation against an access point, provide the alias of the access point in
|
||||
// place of the bucket name. To use this API operation against 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 (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 bucket is owned by a
|
||||
// different account, the request fails with the HTTP status code 403 Forbidden
|
||||
// (access denied).
|
||||
// The account ID of the expected bucket owner. If the account ID that you provide
|
||||
// does not match the actual owner of the bucket, the request fails with the HTTP
|
||||
// status code 403 Forbidden (access denied).
|
||||
ExpectedBucketOwner *string
|
||||
|
||||
noSmithyDocumentSerde
|
||||
@@ -66,7 +68,7 @@ type GetBucketCorsInput struct {
|
||||
|
||||
func (in *GetBucketCorsInput) bindEndpointParams(p *EndpointParameters) {
|
||||
p.Bucket = in.Bucket
|
||||
|
||||
p.UseS3ExpressControlEndpoint = ptr.Bool(true)
|
||||
}
|
||||
|
||||
type GetBucketCorsOutput struct {
|
||||
@@ -136,6 +138,9 @@ func (c *Client) addOperationGetBucketCorsMiddlewares(stack *middleware.Stack, o
|
||||
if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addPutBucketContextMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addOpGetBucketCorsValidationMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
+13
-9
@@ -10,14 +10,15 @@ import (
|
||||
s3cust "github.com/aws/aws-sdk-go-v2/service/s3/internal/customizations"
|
||||
"github.com/aws/aws-sdk-go-v2/service/s3/types"
|
||||
"github.com/aws/smithy-go/middleware"
|
||||
"github.com/aws/smithy-go/ptr"
|
||||
smithyhttp "github.com/aws/smithy-go/transport/http"
|
||||
)
|
||||
|
||||
// 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)
|
||||
// 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
|
||||
@@ -50,9 +51,9 @@ type GetBucketEncryptionInput struct {
|
||||
// This member is required.
|
||||
Bucket *string
|
||||
|
||||
// The account ID of the expected bucket owner. If the bucket is owned by a
|
||||
// different account, the request fails with the HTTP status code 403 Forbidden
|
||||
// (access denied).
|
||||
// The account ID of the expected bucket owner. If the account ID that you provide
|
||||
// does not match the actual owner of the bucket, the request fails with the HTTP
|
||||
// status code 403 Forbidden (access denied).
|
||||
ExpectedBucketOwner *string
|
||||
|
||||
noSmithyDocumentSerde
|
||||
@@ -60,7 +61,7 @@ type GetBucketEncryptionInput struct {
|
||||
|
||||
func (in *GetBucketEncryptionInput) bindEndpointParams(p *EndpointParameters) {
|
||||
p.Bucket = in.Bucket
|
||||
|
||||
p.UseS3ExpressControlEndpoint = ptr.Bool(true)
|
||||
}
|
||||
|
||||
type GetBucketEncryptionOutput struct {
|
||||
@@ -129,6 +130,9 @@ func (c *Client) addOperationGetBucketEncryptionMiddlewares(stack *middleware.St
|
||||
if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addPutBucketContextMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addOpGetBucketEncryptionValidationMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
Generated
Vendored
+7
-2
@@ -10,10 +10,12 @@ import (
|
||||
s3cust "github.com/aws/aws-sdk-go-v2/service/s3/internal/customizations"
|
||||
"github.com/aws/aws-sdk-go-v2/service/s3/types"
|
||||
"github.com/aws/smithy-go/middleware"
|
||||
"github.com/aws/smithy-go/ptr"
|
||||
smithyhttp "github.com/aws/smithy-go/transport/http"
|
||||
)
|
||||
|
||||
// Gets the S3 Intelligent-Tiering configuration from the specified bucket. The S3
|
||||
// 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
|
||||
@@ -64,7 +66,7 @@ type GetBucketIntelligentTieringConfigurationInput struct {
|
||||
|
||||
func (in *GetBucketIntelligentTieringConfigurationInput) bindEndpointParams(p *EndpointParameters) {
|
||||
p.Bucket = in.Bucket
|
||||
|
||||
p.UseS3ExpressControlEndpoint = ptr.Bool(true)
|
||||
}
|
||||
|
||||
type GetBucketIntelligentTieringConfigurationOutput struct {
|
||||
@@ -133,6 +135,9 @@ func (c *Client) addOperationGetBucketIntelligentTieringConfigurationMiddlewares
|
||||
if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addPutBucketContextMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addOpGetBucketIntelligentTieringConfigurationValidationMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
Generated
Vendored
+13
-8
@@ -10,13 +10,15 @@ import (
|
||||
s3cust "github.com/aws/aws-sdk-go-v2/service/s3/internal/customizations"
|
||||
"github.com/aws/aws-sdk-go-v2/service/s3/types"
|
||||
"github.com/aws/smithy-go/middleware"
|
||||
"github.com/aws/smithy-go/ptr"
|
||||
smithyhttp "github.com/aws/smithy-go/transport/http"
|
||||
)
|
||||
|
||||
// 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
|
||||
// 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)
|
||||
@@ -51,9 +53,9 @@ type GetBucketInventoryConfigurationInput struct {
|
||||
// This member is required.
|
||||
Id *string
|
||||
|
||||
// The account ID of the expected bucket owner. If the bucket is owned by a
|
||||
// different account, the request fails with the HTTP status code 403 Forbidden
|
||||
// (access denied).
|
||||
// The account ID of the expected bucket owner. If the account ID that you provide
|
||||
// does not match the actual owner of the bucket, the request fails with the HTTP
|
||||
// status code 403 Forbidden (access denied).
|
||||
ExpectedBucketOwner *string
|
||||
|
||||
noSmithyDocumentSerde
|
||||
@@ -61,7 +63,7 @@ type GetBucketInventoryConfigurationInput struct {
|
||||
|
||||
func (in *GetBucketInventoryConfigurationInput) bindEndpointParams(p *EndpointParameters) {
|
||||
p.Bucket = in.Bucket
|
||||
|
||||
p.UseS3ExpressControlEndpoint = ptr.Bool(true)
|
||||
}
|
||||
|
||||
type GetBucketInventoryConfigurationOutput struct {
|
||||
@@ -130,6 +132,9 @@ func (c *Client) addOperationGetBucketInventoryConfigurationMiddlewares(stack *m
|
||||
if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addPutBucketContextMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addOpGetBucketInventoryConfigurationValidationMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
Generated
Vendored
+15
-11
@@ -10,16 +10,17 @@ import (
|
||||
s3cust "github.com/aws/aws-sdk-go-v2/service/s3/internal/customizations"
|
||||
"github.com/aws/aws-sdk-go-v2/service/s3/types"
|
||||
"github.com/aws/smithy-go/middleware"
|
||||
"github.com/aws/smithy-go/ptr"
|
||||
smithyhttp "github.com/aws/smithy-go/transport/http"
|
||||
)
|
||||
|
||||
// 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)
|
||||
// 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
|
||||
@@ -60,9 +61,9 @@ type GetBucketLifecycleConfigurationInput struct {
|
||||
// This member is required.
|
||||
Bucket *string
|
||||
|
||||
// The account ID of the expected bucket owner. If the bucket is owned by a
|
||||
// different account, the request fails with the HTTP status code 403 Forbidden
|
||||
// (access denied).
|
||||
// The account ID of the expected bucket owner. If the account ID that you provide
|
||||
// does not match the actual owner of the bucket, the request fails with the HTTP
|
||||
// status code 403 Forbidden (access denied).
|
||||
ExpectedBucketOwner *string
|
||||
|
||||
noSmithyDocumentSerde
|
||||
@@ -70,7 +71,7 @@ type GetBucketLifecycleConfigurationInput struct {
|
||||
|
||||
func (in *GetBucketLifecycleConfigurationInput) bindEndpointParams(p *EndpointParameters) {
|
||||
p.Bucket = in.Bucket
|
||||
|
||||
p.UseS3ExpressControlEndpoint = ptr.Bool(true)
|
||||
}
|
||||
|
||||
type GetBucketLifecycleConfigurationOutput struct {
|
||||
@@ -139,6 +140,9 @@ func (c *Client) addOperationGetBucketLifecycleConfigurationMiddlewares(stack *m
|
||||
if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addPutBucketContextMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addOpGetBucketLifecycleConfigurationValidationMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
+23
-18
@@ -15,17 +15,19 @@ import (
|
||||
smithyxml "github.com/aws/smithy-go/encoding/xml"
|
||||
smithyio "github.com/aws/smithy-go/io"
|
||||
"github.com/aws/smithy-go/middleware"
|
||||
"github.com/aws/smithy-go/ptr"
|
||||
smithyhttp "github.com/aws/smithy-go/transport/http"
|
||||
"io"
|
||||
)
|
||||
|
||||
// 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)
|
||||
// . To use this API operation against an access point, provide the alias of the
|
||||
// access point in place of the bucket name. To use this API operation against 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
|
||||
// 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)
|
||||
@@ -52,21 +54,21 @@ func (c *Client) GetBucketLocation(ctx context.Context, params *GetBucketLocatio
|
||||
|
||||
type GetBucketLocationInput struct {
|
||||
|
||||
// The name of the bucket for which to get the location. To use this API operation
|
||||
// against an access point, provide the alias of the access point in place of the
|
||||
// bucket name. To use this API operation against 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 (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 bucket is owned by a
|
||||
// different account, the request fails with the HTTP status code 403 Forbidden
|
||||
// (access denied).
|
||||
// The account ID of the expected bucket owner. If the account ID that you provide
|
||||
// does not match the actual owner of the bucket, the request fails with the HTTP
|
||||
// status code 403 Forbidden (access denied).
|
||||
ExpectedBucketOwner *string
|
||||
|
||||
noSmithyDocumentSerde
|
||||
@@ -74,7 +76,7 @@ type GetBucketLocationInput struct {
|
||||
|
||||
func (in *GetBucketLocationInput) bindEndpointParams(p *EndpointParameters) {
|
||||
p.Bucket = in.Bucket
|
||||
|
||||
p.UseS3ExpressControlEndpoint = ptr.Bool(true)
|
||||
}
|
||||
|
||||
type GetBucketLocationOutput struct {
|
||||
@@ -148,6 +150,9 @@ func (c *Client) addOperationGetBucketLocationMiddlewares(stack *middleware.Stac
|
||||
if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addPutBucketContextMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addOpGetBucketLocationValidationMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
+11
-7
@@ -10,12 +10,13 @@ import (
|
||||
s3cust "github.com/aws/aws-sdk-go-v2/service/s3/internal/customizations"
|
||||
"github.com/aws/aws-sdk-go-v2/service/s3/types"
|
||||
"github.com/aws/smithy-go/middleware"
|
||||
"github.com/aws/smithy-go/ptr"
|
||||
smithyhttp "github.com/aws/smithy-go/transport/http"
|
||||
)
|
||||
|
||||
// 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
|
||||
// :
|
||||
// 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)
|
||||
func (c *Client) GetBucketLogging(ctx context.Context, params *GetBucketLoggingInput, optFns ...func(*Options)) (*GetBucketLoggingOutput, error) {
|
||||
@@ -40,9 +41,9 @@ type GetBucketLoggingInput struct {
|
||||
// This member is required.
|
||||
Bucket *string
|
||||
|
||||
// The account ID of the expected bucket owner. If the bucket is owned by a
|
||||
// different account, the request fails with the HTTP status code 403 Forbidden
|
||||
// (access denied).
|
||||
// The account ID of the expected bucket owner. If the account ID that you provide
|
||||
// does not match the actual owner of the bucket, the request fails with the HTTP
|
||||
// status code 403 Forbidden (access denied).
|
||||
ExpectedBucketOwner *string
|
||||
|
||||
noSmithyDocumentSerde
|
||||
@@ -50,7 +51,7 @@ type GetBucketLoggingInput struct {
|
||||
|
||||
func (in *GetBucketLoggingInput) bindEndpointParams(p *EndpointParameters) {
|
||||
p.Bucket = in.Bucket
|
||||
|
||||
p.UseS3ExpressControlEndpoint = ptr.Bool(true)
|
||||
}
|
||||
|
||||
type GetBucketLoggingOutput struct {
|
||||
@@ -121,6 +122,9 @@ func (c *Client) addOperationGetBucketLoggingMiddlewares(stack *middleware.Stack
|
||||
if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addPutBucketContextMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addOpGetBucketLoggingValidationMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
Generated
Vendored
+15
-11
@@ -10,16 +10,17 @@ import (
|
||||
s3cust "github.com/aws/aws-sdk-go-v2/service/s3/internal/customizations"
|
||||
"github.com/aws/aws-sdk-go-v2/service/s3/types"
|
||||
"github.com/aws/smithy-go/middleware"
|
||||
"github.com/aws/smithy-go/ptr"
|
||||
smithyhttp "github.com/aws/smithy-go/transport/http"
|
||||
)
|
||||
|
||||
// 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)
|
||||
// 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)
|
||||
@@ -56,9 +57,9 @@ type GetBucketMetricsConfigurationInput struct {
|
||||
// This member is required.
|
||||
Id *string
|
||||
|
||||
// The account ID of the expected bucket owner. If the bucket is owned by a
|
||||
// different account, the request fails with the HTTP status code 403 Forbidden
|
||||
// (access denied).
|
||||
// The account ID of the expected bucket owner. If the account ID that you provide
|
||||
// does not match the actual owner of the bucket, the request fails with the HTTP
|
||||
// status code 403 Forbidden (access denied).
|
||||
ExpectedBucketOwner *string
|
||||
|
||||
noSmithyDocumentSerde
|
||||
@@ -66,7 +67,7 @@ type GetBucketMetricsConfigurationInput struct {
|
||||
|
||||
func (in *GetBucketMetricsConfigurationInput) bindEndpointParams(p *EndpointParameters) {
|
||||
p.Bucket = in.Bucket
|
||||
|
||||
p.UseS3ExpressControlEndpoint = ptr.Bool(true)
|
||||
}
|
||||
|
||||
type GetBucketMetricsConfigurationOutput struct {
|
||||
@@ -135,6 +136,9 @@ func (c *Client) addOperationGetBucketMetricsConfigurationMiddlewares(stack *mid
|
||||
if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addPutBucketContextMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addOpGetBucketMetricsConfigurationValidationMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
Generated
Vendored
+29
-23
@@ -10,21 +10,23 @@ import (
|
||||
s3cust "github.com/aws/aws-sdk-go-v2/service/s3/internal/customizations"
|
||||
"github.com/aws/aws-sdk-go-v2/service/s3/types"
|
||||
"github.com/aws/smithy-go/middleware"
|
||||
"github.com/aws/smithy-go/ptr"
|
||||
smithyhttp "github.com/aws/smithy-go/transport/http"
|
||||
)
|
||||
|
||||
// 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. To use this API operation against an access
|
||||
// point, provide the alias of the access point in place of the bucket name. To use
|
||||
// this API operation against 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)
|
||||
// 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)
|
||||
@@ -47,21 +49,22 @@ func (c *Client) GetBucketNotificationConfiguration(ctx context.Context, params
|
||||
|
||||
type GetBucketNotificationConfigurationInput struct {
|
||||
|
||||
// The name of the bucket for which to get the notification configuration. To use
|
||||
// this API operation against an access point, provide the alias of the access
|
||||
// point in place of the bucket name. To use this API operation against 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 (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 bucket is owned by a
|
||||
// different account, the request fails with the HTTP status code 403 Forbidden
|
||||
// (access denied).
|
||||
// The account ID of the expected bucket owner. If the account ID that you provide
|
||||
// does not match the actual owner of the bucket, the request fails with the HTTP
|
||||
// status code 403 Forbidden (access denied).
|
||||
ExpectedBucketOwner *string
|
||||
|
||||
noSmithyDocumentSerde
|
||||
@@ -69,7 +72,7 @@ type GetBucketNotificationConfigurationInput struct {
|
||||
|
||||
func (in *GetBucketNotificationConfigurationInput) bindEndpointParams(p *EndpointParameters) {
|
||||
p.Bucket = in.Bucket
|
||||
|
||||
p.UseS3ExpressControlEndpoint = ptr.Bool(true)
|
||||
}
|
||||
|
||||
// A container for specifying the notification configuration of the bucket. If
|
||||
@@ -152,6 +155,9 @@ func (c *Client) addOperationGetBucketNotificationConfigurationMiddlewares(stack
|
||||
if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addPutBucketContextMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addOpGetBucketNotificationConfigurationValidationMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
Generated
Vendored
+12
-7
@@ -10,12 +10,14 @@ import (
|
||||
s3cust "github.com/aws/aws-sdk-go-v2/service/s3/internal/customizations"
|
||||
"github.com/aws/aws-sdk-go-v2/service/s3/types"
|
||||
"github.com/aws/smithy-go/middleware"
|
||||
"github.com/aws/smithy-go/ptr"
|
||||
smithyhttp "github.com/aws/smithy-go/transport/http"
|
||||
)
|
||||
|
||||
// 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)
|
||||
// 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
|
||||
@@ -42,9 +44,9 @@ type GetBucketOwnershipControlsInput struct {
|
||||
// This member is required.
|
||||
Bucket *string
|
||||
|
||||
// The account ID of the expected bucket owner. If the bucket is owned by a
|
||||
// different account, the request fails with the HTTP status code 403 Forbidden
|
||||
// (access denied).
|
||||
// The account ID of the expected bucket owner. If the account ID that you provide
|
||||
// does not match the actual owner of the bucket, the request fails with the HTTP
|
||||
// status code 403 Forbidden (access denied).
|
||||
ExpectedBucketOwner *string
|
||||
|
||||
noSmithyDocumentSerde
|
||||
@@ -52,7 +54,7 @@ type GetBucketOwnershipControlsInput struct {
|
||||
|
||||
func (in *GetBucketOwnershipControlsInput) bindEndpointParams(p *EndpointParameters) {
|
||||
p.Bucket = in.Bucket
|
||||
|
||||
p.UseS3ExpressControlEndpoint = ptr.Bool(true)
|
||||
}
|
||||
|
||||
type GetBucketOwnershipControlsOutput struct {
|
||||
@@ -122,6 +124,9 @@ func (c *Client) addOperationGetBucketOwnershipControlsMiddlewares(stack *middle
|
||||
if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addPutBucketContextMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addOpGetBucketOwnershipControlsValidationMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
+68
-35
@@ -9,32 +9,50 @@ import (
|
||||
"github.com/aws/aws-sdk-go-v2/aws/signer/v4"
|
||||
s3cust "github.com/aws/aws-sdk-go-v2/service/s3/internal/customizations"
|
||||
"github.com/aws/smithy-go/middleware"
|
||||
"github.com/aws/smithy-go/ptr"
|
||||
smithyhttp "github.com/aws/smithy-go/transport/http"
|
||||
)
|
||||
|
||||
// Returns the policy of a specified bucket. 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 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. To use this API operation against an access
|
||||
// point, provide the alias of the access point in place of the bucket name. To use
|
||||
// this API operation against 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 bucket policies, see Using Bucket Policies and
|
||||
// User Policies (https://docs.aws.amazon.com/AmazonS3/latest/dev/using-iam-policies.html)
|
||||
// . The following action is related to GetBucketPolicy :
|
||||
// Returns the policy of a specified bucket. Directory buckets - For directory
|
||||
// buckets, you must make requests for this API operation to the Regional endpoint.
|
||||
// These endpoints support path-style requests in the format
|
||||
// https://s3express-control.region_code.amazonaws.com/bucket-name .
|
||||
// Virtual-hosted-style requests aren't supported. For more information, see
|
||||
// Regional and Zonal endpoints (https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-express-Regions-and-Zones.html)
|
||||
// in the Amazon S3 User Guide. Permissions If you are using an identity other than
|
||||
// the root user of the Amazon Web Services account that owns the bucket, the
|
||||
// calling identity must both have the GetBucketPolicy permissions on the
|
||||
// specified bucket and belong to the bucket owner's account in order to use this
|
||||
// operation. If you don't have GetBucketPolicy permissions, Amazon S3 returns a
|
||||
// 403 Access Denied error. If you have the correct permissions, but you're not
|
||||
// using an identity that belongs to the bucket owner's account, Amazon S3 returns
|
||||
// a 405 Method Not Allowed error. To ensure that bucket owners don't
|
||||
// inadvertently lock themselves out of their own buckets, the root principal in a
|
||||
// bucket owner's Amazon Web Services account can perform the GetBucketPolicy ,
|
||||
// PutBucketPolicy , and DeleteBucketPolicy API actions, even if their bucket
|
||||
// policy explicitly denies the root principal's access. Bucket owner root
|
||||
// principals can only be blocked from performing these API actions by VPC endpoint
|
||||
// policies and Amazon Web Services Organizations policies.
|
||||
// - General purpose bucket permissions - The s3:GetBucketPolicy permission is
|
||||
// required in a policy. For more information about general purpose buckets bucket
|
||||
// policies, see Using Bucket Policies and User Policies (https://docs.aws.amazon.com/AmazonS3/latest/dev/using-iam-policies.html)
|
||||
// in the Amazon S3 User Guide.
|
||||
// - Directory bucket permissions - To grant access to this API operation, you
|
||||
// must have the s3express:GetBucketPolicy permission in an IAM identity-based
|
||||
// policy instead of a bucket policy. Cross-account access to this API operation
|
||||
// isn't supported. This operation can only be performed by the Amazon Web Services
|
||||
// account that owns the resource. For more information about directory bucket
|
||||
// policies and permissions, see Amazon Web Services Identity and Access
|
||||
// Management (IAM) for S3 Express One Zone (https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-express-security-iam.html)
|
||||
// in the Amazon S3 User Guide.
|
||||
//
|
||||
// Example bucket policies General purpose buckets example bucket policies - See
|
||||
// Bucket policy examples (https://docs.aws.amazon.com/AmazonS3/latest/userguide/example-bucket-policies.html)
|
||||
// in the Amazon S3 User Guide. Directory bucket example bucket policies - See
|
||||
// Example bucket policies for S3 Express One Zone (https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-express-security-iam-example-bucket-policies.html)
|
||||
// in the Amazon S3 User Guide. HTTP Host header syntax Directory buckets - The
|
||||
// HTTP Host header syntax is s3express-control.region.amazonaws.com . The
|
||||
// following action is related to GetBucketPolicy :
|
||||
// - GetObject (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetObject.html)
|
||||
func (c *Client) GetBucketPolicy(ctx context.Context, params *GetBucketPolicyInput, optFns ...func(*Options)) (*GetBucketPolicyOutput, error) {
|
||||
if params == nil {
|
||||
@@ -53,21 +71,33 @@ func (c *Client) GetBucketPolicy(ctx context.Context, params *GetBucketPolicyInp
|
||||
|
||||
type GetBucketPolicyInput struct {
|
||||
|
||||
// The bucket name for which to get the bucket policy. To use this API operation
|
||||
// against an access point, provide the alias of the access point in place of the
|
||||
// bucket name. To use this API operation against 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 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
|
||||
// buckets.
|
||||
//
|
||||
// This member is required.
|
||||
Bucket *string
|
||||
|
||||
// The account ID of the expected bucket owner. If the bucket is owned by a
|
||||
// different account, the request fails with the HTTP status code 403 Forbidden
|
||||
// (access denied).
|
||||
// The account ID of the expected bucket owner. If the account ID that you provide
|
||||
// does not match the actual owner of the bucket, the request fails with the HTTP
|
||||
// status code 403 Forbidden (access denied). For directory buckets, this header
|
||||
// is not supported in this API operation. If you specify this header, the request
|
||||
// fails with the HTTP status code 501 Not Implemented .
|
||||
ExpectedBucketOwner *string
|
||||
|
||||
noSmithyDocumentSerde
|
||||
@@ -75,7 +105,7 @@ type GetBucketPolicyInput struct {
|
||||
|
||||
func (in *GetBucketPolicyInput) bindEndpointParams(p *EndpointParameters) {
|
||||
p.Bucket = in.Bucket
|
||||
|
||||
p.UseS3ExpressControlEndpoint = ptr.Bool(true)
|
||||
}
|
||||
|
||||
type GetBucketPolicyOutput struct {
|
||||
@@ -144,6 +174,9 @@ func (c *Client) addOperationGetBucketPolicyMiddlewares(stack *middleware.Stack,
|
||||
if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addPutBucketContextMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addOpGetBucketPolicyValidationMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
+13
-8
@@ -10,13 +10,15 @@ import (
|
||||
s3cust "github.com/aws/aws-sdk-go-v2/service/s3/internal/customizations"
|
||||
"github.com/aws/aws-sdk-go-v2/service/s3/types"
|
||||
"github.com/aws/smithy-go/middleware"
|
||||
"github.com/aws/smithy-go/ptr"
|
||||
smithyhttp "github.com/aws/smithy-go/transport/http"
|
||||
)
|
||||
|
||||
// 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)
|
||||
// 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 :
|
||||
@@ -46,9 +48,9 @@ type GetBucketPolicyStatusInput struct {
|
||||
// This member is required.
|
||||
Bucket *string
|
||||
|
||||
// The account ID of the expected bucket owner. If the bucket is owned by a
|
||||
// different account, the request fails with the HTTP status code 403 Forbidden
|
||||
// (access denied).
|
||||
// The account ID of the expected bucket owner. If the account ID that you provide
|
||||
// does not match the actual owner of the bucket, the request fails with the HTTP
|
||||
// status code 403 Forbidden (access denied).
|
||||
ExpectedBucketOwner *string
|
||||
|
||||
noSmithyDocumentSerde
|
||||
@@ -56,7 +58,7 @@ type GetBucketPolicyStatusInput struct {
|
||||
|
||||
func (in *GetBucketPolicyStatusInput) bindEndpointParams(p *EndpointParameters) {
|
||||
p.Bucket = in.Bucket
|
||||
|
||||
p.UseS3ExpressControlEndpoint = ptr.Bool(true)
|
||||
}
|
||||
|
||||
type GetBucketPolicyStatusOutput struct {
|
||||
@@ -125,6 +127,9 @@ func (c *Client) addOperationGetBucketPolicyStatusMiddlewares(stack *middleware.
|
||||
if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addPutBucketContextMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addOpGetBucketPolicyStatusValidationMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
+13
-8
@@ -10,13 +10,15 @@ import (
|
||||
s3cust "github.com/aws/aws-sdk-go-v2/service/s3/internal/customizations"
|
||||
"github.com/aws/aws-sdk-go-v2/service/s3/types"
|
||||
"github.com/aws/smithy-go/middleware"
|
||||
"github.com/aws/smithy-go/ptr"
|
||||
smithyhttp "github.com/aws/smithy-go/transport/http"
|
||||
)
|
||||
|
||||
// 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)
|
||||
// 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)
|
||||
@@ -49,9 +51,9 @@ type GetBucketReplicationInput struct {
|
||||
// This member is required.
|
||||
Bucket *string
|
||||
|
||||
// The account ID of the expected bucket owner. If the bucket is owned by a
|
||||
// different account, the request fails with the HTTP status code 403 Forbidden
|
||||
// (access denied).
|
||||
// The account ID of the expected bucket owner. If the account ID that you provide
|
||||
// does not match the actual owner of the bucket, the request fails with the HTTP
|
||||
// status code 403 Forbidden (access denied).
|
||||
ExpectedBucketOwner *string
|
||||
|
||||
noSmithyDocumentSerde
|
||||
@@ -59,7 +61,7 @@ type GetBucketReplicationInput struct {
|
||||
|
||||
func (in *GetBucketReplicationInput) bindEndpointParams(p *EndpointParameters) {
|
||||
p.Bucket = in.Bucket
|
||||
|
||||
p.UseS3ExpressControlEndpoint = ptr.Bool(true)
|
||||
}
|
||||
|
||||
type GetBucketReplicationOutput struct {
|
||||
@@ -129,6 +131,9 @@ func (c *Client) addOperationGetBucketReplicationMiddlewares(stack *middleware.S
|
||||
if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addPutBucketContextMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addOpGetBucketReplicationValidationMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
+11
-7
@@ -10,12 +10,13 @@ import (
|
||||
s3cust "github.com/aws/aws-sdk-go-v2/service/s3/internal/customizations"
|
||||
"github.com/aws/aws-sdk-go-v2/service/s3/types"
|
||||
"github.com/aws/smithy-go/middleware"
|
||||
"github.com/aws/smithy-go/ptr"
|
||||
smithyhttp "github.com/aws/smithy-go/transport/http"
|
||||
)
|
||||
|
||||
// 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)
|
||||
// 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)
|
||||
func (c *Client) GetBucketRequestPayment(ctx context.Context, params *GetBucketRequestPaymentInput, optFns ...func(*Options)) (*GetBucketRequestPaymentOutput, error) {
|
||||
@@ -40,9 +41,9 @@ type GetBucketRequestPaymentInput struct {
|
||||
// This member is required.
|
||||
Bucket *string
|
||||
|
||||
// The account ID of the expected bucket owner. If the bucket is owned by a
|
||||
// different account, the request fails with the HTTP status code 403 Forbidden
|
||||
// (access denied).
|
||||
// The account ID of the expected bucket owner. If the account ID that you provide
|
||||
// does not match the actual owner of the bucket, the request fails with the HTTP
|
||||
// status code 403 Forbidden (access denied).
|
||||
ExpectedBucketOwner *string
|
||||
|
||||
noSmithyDocumentSerde
|
||||
@@ -50,7 +51,7 @@ type GetBucketRequestPaymentInput struct {
|
||||
|
||||
func (in *GetBucketRequestPaymentInput) bindEndpointParams(p *EndpointParameters) {
|
||||
p.Bucket = in.Bucket
|
||||
|
||||
p.UseS3ExpressControlEndpoint = ptr.Bool(true)
|
||||
}
|
||||
|
||||
type GetBucketRequestPaymentOutput struct {
|
||||
@@ -119,6 +120,9 @@ func (c *Client) addOperationGetBucketRequestPaymentMiddlewares(stack *middlewar
|
||||
if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addPutBucketContextMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addOpGetBucketRequestPaymentValidationMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
+13
-8
@@ -10,13 +10,15 @@ import (
|
||||
s3cust "github.com/aws/aws-sdk-go-v2/service/s3/internal/customizations"
|
||||
"github.com/aws/aws-sdk-go-v2/service/s3/types"
|
||||
"github.com/aws/smithy-go/middleware"
|
||||
"github.com/aws/smithy-go/ptr"
|
||||
smithyhttp "github.com/aws/smithy-go/transport/http"
|
||||
)
|
||||
|
||||
// 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.
|
||||
//
|
||||
@@ -45,9 +47,9 @@ type GetBucketTaggingInput struct {
|
||||
// This member is required.
|
||||
Bucket *string
|
||||
|
||||
// The account ID of the expected bucket owner. If the bucket is owned by a
|
||||
// different account, the request fails with the HTTP status code 403 Forbidden
|
||||
// (access denied).
|
||||
// The account ID of the expected bucket owner. If the account ID that you provide
|
||||
// does not match the actual owner of the bucket, the request fails with the HTTP
|
||||
// status code 403 Forbidden (access denied).
|
||||
ExpectedBucketOwner *string
|
||||
|
||||
noSmithyDocumentSerde
|
||||
@@ -55,7 +57,7 @@ type GetBucketTaggingInput struct {
|
||||
|
||||
func (in *GetBucketTaggingInput) bindEndpointParams(p *EndpointParameters) {
|
||||
p.Bucket = in.Bucket
|
||||
|
||||
p.UseS3ExpressControlEndpoint = ptr.Bool(true)
|
||||
}
|
||||
|
||||
type GetBucketTaggingOutput struct {
|
||||
@@ -126,6 +128,9 @@ func (c *Client) addOperationGetBucketTaggingMiddlewares(stack *middleware.Stack
|
||||
if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addPutBucketContextMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addOpGetBucketTaggingValidationMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
+14
-9
@@ -10,14 +10,16 @@ import (
|
||||
s3cust "github.com/aws/aws-sdk-go-v2/service/s3/internal/customizations"
|
||||
"github.com/aws/aws-sdk-go-v2/service/s3/types"
|
||||
"github.com/aws/smithy-go/middleware"
|
||||
"github.com/aws/smithy-go/ptr"
|
||||
smithyhttp "github.com/aws/smithy-go/transport/http"
|
||||
)
|
||||
|
||||
// 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 :
|
||||
// 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)
|
||||
@@ -43,9 +45,9 @@ type GetBucketVersioningInput struct {
|
||||
// This member is required.
|
||||
Bucket *string
|
||||
|
||||
// The account ID of the expected bucket owner. If the bucket is owned by a
|
||||
// different account, the request fails with the HTTP status code 403 Forbidden
|
||||
// (access denied).
|
||||
// The account ID of the expected bucket owner. If the account ID that you provide
|
||||
// does not match the actual owner of the bucket, the request fails with the HTTP
|
||||
// status code 403 Forbidden (access denied).
|
||||
ExpectedBucketOwner *string
|
||||
|
||||
noSmithyDocumentSerde
|
||||
@@ -53,7 +55,7 @@ type GetBucketVersioningInput struct {
|
||||
|
||||
func (in *GetBucketVersioningInput) bindEndpointParams(p *EndpointParameters) {
|
||||
p.Bucket = in.Bucket
|
||||
|
||||
p.UseS3ExpressControlEndpoint = ptr.Bool(true)
|
||||
}
|
||||
|
||||
type GetBucketVersioningOutput struct {
|
||||
@@ -127,6 +129,9 @@ func (c *Client) addOperationGetBucketVersioningMiddlewares(stack *middleware.St
|
||||
if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addPutBucketContextMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addOpGetBucketVersioningValidationMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
+12
-7
@@ -10,12 +10,14 @@ import (
|
||||
s3cust "github.com/aws/aws-sdk-go-v2/service/s3/internal/customizations"
|
||||
"github.com/aws/aws-sdk-go-v2/service/s3/types"
|
||||
"github.com/aws/smithy-go/middleware"
|
||||
"github.com/aws/smithy-go/ptr"
|
||||
smithyhttp "github.com/aws/smithy-go/transport/http"
|
||||
)
|
||||
|
||||
// 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 operation is not supported by directory buckets. Returns the website
|
||||
// configuration for a bucket. To host website on Amazon S3, you can configure a
|
||||
// bucket as website by adding a website configuration. For more information about
|
||||
// hosting websites, see Hosting Websites on Amazon S3 (https://docs.aws.amazon.com/AmazonS3/latest/dev/WebsiteHosting.html)
|
||||
// . This GET action requires the S3:GetBucketWebsite permission. By default, only
|
||||
// the bucket owner can read the bucket website configuration. However, bucket
|
||||
// owners can allow other users to read the website configuration by writing a
|
||||
@@ -45,9 +47,9 @@ type GetBucketWebsiteInput struct {
|
||||
// This member is required.
|
||||
Bucket *string
|
||||
|
||||
// The account ID of the expected bucket owner. If the bucket is owned by a
|
||||
// different account, the request fails with the HTTP status code 403 Forbidden
|
||||
// (access denied).
|
||||
// The account ID of the expected bucket owner. If the account ID that you provide
|
||||
// does not match the actual owner of the bucket, the request fails with the HTTP
|
||||
// status code 403 Forbidden (access denied).
|
||||
ExpectedBucketOwner *string
|
||||
|
||||
noSmithyDocumentSerde
|
||||
@@ -55,7 +57,7 @@ type GetBucketWebsiteInput struct {
|
||||
|
||||
func (in *GetBucketWebsiteInput) bindEndpointParams(p *EndpointParameters) {
|
||||
p.Bucket = in.Bucket
|
||||
|
||||
p.UseS3ExpressControlEndpoint = ptr.Bool(true)
|
||||
}
|
||||
|
||||
type GetBucketWebsiteOutput struct {
|
||||
@@ -134,6 +136,9 @@ func (c *Client) addOperationGetBucketWebsiteMiddlewares(stack *middleware.Stack
|
||||
if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addPutBucketContextMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addOpGetBucketWebsiteValidationMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
+268
-165
@@ -16,97 +16,98 @@ import (
|
||||
"time"
|
||||
)
|
||||
|
||||
// Retrieves objects from Amazon S3. To use GET , you must have READ access to the
|
||||
// object. If you grant READ access to the anonymous user, you can return the
|
||||
// object without using an authorization header. An Amazon S3 bucket has no
|
||||
// directory hierarchy such as you would find in a typical computer file system.
|
||||
// You can, however, create a logical hierarchy by using object key names that
|
||||
// imply a folder structure. For example, instead of naming an object sample.jpg ,
|
||||
// you can name it photos/2006/February/sample.jpg . To get an object from such a
|
||||
// logical hierarchy, specify the full key name for the object in the GET
|
||||
// operation. For a virtual hosted-style request example, if you have the object
|
||||
// photos/2006/February/sample.jpg , specify the resource 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 resource 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)
|
||||
// . For more information about returning the ACL of an object, see GetObjectAcl (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetObjectAcl.html)
|
||||
// . If the object you are retrieving is stored in the S3 Glacier Flexible
|
||||
// Retrieval or S3 Glacier Deep Archive storage class, or S3 Intelligent-Tiering
|
||||
// Archive or S3 Intelligent-Tiering Deep Archive tiers, 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 action 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)
|
||||
// . Encryption request headers, like x-amz-server-side-encryption , should not be
|
||||
// sent for GET requests if your object uses server-side encryption with Key
|
||||
// Management Service (KMS) keys (SSE-KMS), dual-layer server-side encryption with
|
||||
// Amazon Web Services KMS keys (DSSE-KMS), or server-side encryption with Amazon
|
||||
// S3 managed encryption keys (SSE-S3). If your object does use these types of
|
||||
// keys, you’ll get an HTTP 400 Bad Request 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
|
||||
// Retrieves an object from Amazon S3. In the GetObject request, specify the full
|
||||
// key name for the object. General purpose buckets - Both the virtual-hosted-style
|
||||
// requests and the path-style requests are supported. For a virtual hosted-style
|
||||
// request example, if you have the object photos/2006/February/sample.jpg ,
|
||||
// specify the object key name as /photos/2006/February/sample.jpg . For a
|
||||
// path-style request example, if you have the object
|
||||
// photos/2006/February/sample.jpg in the bucket named examplebucket , specify the
|
||||
// object key name as /examplebucket/photos/2006/February/sample.jpg . For more
|
||||
// information about request types, see HTTP Host Header Bucket Specification (https://docs.aws.amazon.com/AmazonS3/latest/dev/VirtualHosting.html#VirtualHostingSpecifyBucket)
|
||||
// in the Amazon S3 User Guide. Directory buckets - Only virtual-hosted-style
|
||||
// requests are supported. For a virtual hosted-style request example, if you have
|
||||
// the object photos/2006/February/sample.jpg in the bucket named
|
||||
// examplebucket--use1-az5--x-s3 , specify the object key name as
|
||||
// /photos/2006/February/sample.jpg . Also, when you make requests to this API
|
||||
// operation, your requests are sent to the Zonal endpoint. These endpoints support
|
||||
// virtual-hosted-style requests in the format
|
||||
// https://bucket_name.s3express-az_id.region.amazonaws.com/key-name . Path-style
|
||||
// requests are not supported. For more information, see Regional and Zonal
|
||||
// endpoints (https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-express-Regions-and-Zones.html)
|
||||
// in the Amazon S3 User Guide. Permissions
|
||||
// - General purpose bucket permissions - You must have the required permissions
|
||||
// in a policy. To use GetObject , you must have the READ access to the object
|
||||
// (or version). If you grant READ access to the anonymous user, the GetObject
|
||||
// operation returns the object without using an authorization header. For more
|
||||
// information, see Specifying permissions in a policy (https://docs.aws.amazon.com/AmazonS3/latest/dev/using-with-s3-actions.html)
|
||||
// in the Amazon S3 User Guide. If you include a versionId in your request
|
||||
// header, you must have the s3:GetObjectVersion permission to access a specific
|
||||
// version of an object. The s3:GetObject permission is not required in this
|
||||
// scenario. If you request the current version of an object without a specific
|
||||
// versionId in the request header, only the s3:GetObject permission is required.
|
||||
// The s3:GetObjectVersion permission is not required in this scenario. If the
|
||||
// object that you request doesn’t exist, the error that Amazon S3 returns depends
|
||||
// on whether you also have the s3:ListBucket permission.
|
||||
// - If you have the s3:ListBucket permission on the bucket, Amazon S3 returns an
|
||||
// HTTP status code 404 Not Found error.
|
||||
// - If you don’t have the s3:ListBucket permission, Amazon S3 returns an HTTP
|
||||
// status code 403 Access Denied error.
|
||||
// - Directory bucket permissions - To grant access to this API operation on a
|
||||
// directory bucket, we recommend that you use the CreateSession (https://docs.aws.amazon.com/AmazonS3/latest/API/API_CreateSession.html)
|
||||
// API operation for session-based authorization. Specifically, you grant the
|
||||
// s3express:CreateSession permission to the directory bucket in a bucket policy
|
||||
// or an IAM identity-based policy. Then, you make the CreateSession API call on
|
||||
// the bucket to obtain a session token. With the session token in your request
|
||||
// header, you can make API requests to this operation. After the session token
|
||||
// expires, you make another CreateSession API call to generate a new session
|
||||
// token for use. Amazon Web Services CLI or SDKs create session and refresh the
|
||||
// session token automatically to avoid service interruptions when a session
|
||||
// expires. For more information about authorization, see CreateSession (https://docs.aws.amazon.com/AmazonS3/latest/API/API_CreateSession.html)
|
||||
// .
|
||||
//
|
||||
// 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)
|
||||
// . Assuming you have the relevant permission to read object tags, the response
|
||||
// also returns the x-amz-tagging-count header that provides the count of number
|
||||
// of tags associated with the object. You can use GetObjectTagging (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetObjectTagging.html)
|
||||
// to retrieve the tag set associated with an object. Permissions You need the
|
||||
// relevant read object (or version) permission for this operation. For more
|
||||
// information, see Specifying Permissions in a Policy (https://docs.aws.amazon.com/AmazonS3/latest/dev/using-with-s3-actions.html)
|
||||
// . 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. Versioning By
|
||||
// default, the GET action returns the current version of an object. To return a
|
||||
// different version, use the versionId subresource.
|
||||
// - If you supply a versionId , you need the s3:GetObjectVersion permission to
|
||||
// access a specific version of an object. If you request a specific version, you
|
||||
// do not need to have the s3:GetObject permission. If you request the current
|
||||
// version without a specific version ID, only s3:GetObject permission is
|
||||
// required. s3:GetObjectVersion permission won't be required.
|
||||
// - If the current version of the object is a delete marker, Amazon S3 behaves
|
||||
// as if the object was deleted and includes x-amz-delete-marker: true in the
|
||||
// response.
|
||||
// - If the specified version is a delete marker, the response returns a 405
|
||||
// (Method Not Allowed) error and the Last-Modified: timestamp response header.
|
||||
//
|
||||
// For more information about versioning, see PutBucketVersioning (https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketVersioning.html)
|
||||
// . Overriding Response Header Values There are times when you want to override
|
||||
// certain response header values in a GET response. For example, you might
|
||||
// override the Content-Disposition response header value in your GET request. You
|
||||
// can override values for a set of response headers using the following query
|
||||
// parameters. These response header values are sent only on a successful request,
|
||||
// that is, when status code 200 OK is returned. The set of headers you can
|
||||
// override using these parameters is a subset of the headers that Amazon S3
|
||||
// accepts when you create an object. The response headers that you can override
|
||||
// for the GET response are Content-Type , Content-Language , Expires ,
|
||||
// Cache-Control , Content-Disposition , and Content-Encoding . To override these
|
||||
// header values in the GET response, you use the following request parameters.
|
||||
// You must sign the request, either using an Authorization header or a presigned
|
||||
// URL, when using these parameters. They cannot be used with an unsigned
|
||||
// (anonymous) request.
|
||||
// - response-content-type
|
||||
// - response-content-language
|
||||
// - response-expires
|
||||
// Storage classes If the object you are retrieving is stored in the S3 Glacier
|
||||
// Flexible Retrieval storage class, the S3 Glacier Deep Archive storage class, the
|
||||
// S3 Intelligent-Tiering Archive Access tier, or the S3 Intelligent-Tiering Deep
|
||||
// Archive Access tier, before you can retrieve the object you must first restore a
|
||||
// copy using RestoreObject (https://docs.aws.amazon.com/AmazonS3/latest/API/API_RestoreObject.html)
|
||||
// . Otherwise, this operation returns an InvalidObjectState error. For
|
||||
// information about restoring archived objects, see Restoring Archived Objects (https://docs.aws.amazon.com/AmazonS3/latest/dev/restoring-objects.html)
|
||||
// in the Amazon S3 User Guide. Directory buckets - For directory buckets, only the
|
||||
// S3 Express One Zone storage class is supported to store newly created objects.
|
||||
// Unsupported storage class values won't write a destination object and will
|
||||
// respond with the HTTP status code 400 Bad Request . Encryption Encryption
|
||||
// request headers, like x-amz-server-side-encryption , should not be sent for the
|
||||
// GetObject requests, if your object uses server-side encryption with Amazon S3
|
||||
// managed encryption keys (SSE-S3), server-side encryption with Key Management
|
||||
// Service (KMS) keys (SSE-KMS), or dual-layer server-side encryption with Amazon
|
||||
// Web Services KMS keys (DSSE-KMS). If you include the header in your GetObject
|
||||
// requests for the object that uses these types of keys, you’ll get an HTTP 400
|
||||
// Bad Request error. Overriding response header values through the request There
|
||||
// are times when you want to override certain response header values of a
|
||||
// GetObject response. For example, you might override the Content-Disposition
|
||||
// response header value through your GetObject request. You can override values
|
||||
// for a set of response headers. These modified response header values are
|
||||
// included only in a successful response, that is, when the HTTP status code 200
|
||||
// OK is returned. The headers you can override using the following query
|
||||
// parameters in the request are a subset of the headers that Amazon S3 accepts
|
||||
// when you create an object. The response headers that you can override for the
|
||||
// GetObject response are Cache-Control , Content-Disposition , Content-Encoding ,
|
||||
// Content-Language , Content-Type , and Expires . To override values for a set of
|
||||
// response headers in the GetObject response, you can use the following query
|
||||
// parameters in the request.
|
||||
// - response-cache-control
|
||||
// - response-content-disposition
|
||||
// - response-content-encoding
|
||||
// - response-content-language
|
||||
// - response-content-type
|
||||
// - response-expires
|
||||
//
|
||||
// Overriding Response Header Values 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. 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 response code.
|
||||
// For more information about conditional requests, see RFC 7232 (https://tools.ietf.org/html/rfc7232)
|
||||
// . The following operations are related to GetObject :
|
||||
// When you use these parameters, you must sign the request by using either an
|
||||
// Authorization header or a presigned URL. These parameters cannot be used with an
|
||||
// unsigned (anonymous) request. HTTP Host header syntax Directory buckets - The
|
||||
// HTTP Host header syntax is Bucket_name.s3express-az_id.region.amazonaws.com .
|
||||
// The following operations are related to GetObject :
|
||||
// - ListBuckets (https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListBuckets.html)
|
||||
// - GetObjectAcl (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetObjectAcl.html)
|
||||
func (c *Client) GetObject(ctx context.Context, params *GetObjectInput, optFns ...func(*Options)) (*GetObjectOutput, error) {
|
||||
@@ -126,18 +127,30 @@ func (c *Client) GetObject(ctx context.Context, params *GetObjectInput, optFns .
|
||||
|
||||
type GetObjectInput struct {
|
||||
|
||||
// The bucket name containing the object. When using this action with an access
|
||||
// point, you must direct requests to the access point hostname. The access point
|
||||
// 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.
|
||||
// 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.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. When using an Object Lambda access point the
|
||||
// hostname takes the form
|
||||
// AccessPointName-AccountId.s3-object-lambda.Region.amazonaws.com. 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
|
||||
@@ -155,25 +168,43 @@ type GetObjectInput struct {
|
||||
// To retrieve the checksum, this mode must be enabled.
|
||||
ChecksumMode types.ChecksumMode
|
||||
|
||||
// The account ID of the expected bucket owner. If the bucket is owned by a
|
||||
// different account, the request fails with the HTTP status code 403 Forbidden
|
||||
// (access denied).
|
||||
// The account ID of the expected bucket owner. If the account ID that you provide
|
||||
// does not match the actual owner of the bucket, the request fails with the HTTP
|
||||
// status code 403 Forbidden (access denied).
|
||||
ExpectedBucketOwner *string
|
||||
|
||||
// Return the object only if its entity tag (ETag) is the same as the one
|
||||
// specified; otherwise, return a 412 (precondition failed) error.
|
||||
// specified in this header; otherwise, return a 412 Precondition Failed error. If
|
||||
// both of the If-Match and If-Unmodified-Since headers are present in the request
|
||||
// as follows: If-Match condition evaluates to true , and; If-Unmodified-Since
|
||||
// condition evaluates to false ; then, S3 returns 200 OK and the data requested.
|
||||
// For more information about conditional requests, see RFC 7232 (https://tools.ietf.org/html/rfc7232)
|
||||
// .
|
||||
IfMatch *string
|
||||
|
||||
// Return the object only if it has been modified since the specified time;
|
||||
// otherwise, return a 304 (not modified) error.
|
||||
// otherwise, return a 304 Not Modified error. If both of the If-None-Match and
|
||||
// If-Modified-Since headers are present in the request as follows: If-None-Match
|
||||
// condition evaluates to false , and; If-Modified-Since condition evaluates to
|
||||
// true ; then, S3 returns 304 Not Modified status code. For more information
|
||||
// about conditional requests, see RFC 7232 (https://tools.ietf.org/html/rfc7232) .
|
||||
IfModifiedSince *time.Time
|
||||
|
||||
// Return the object only if its entity tag (ETag) is different from the one
|
||||
// specified; otherwise, return a 304 (not modified) error.
|
||||
// specified in this header; otherwise, return a 304 Not Modified error. If both
|
||||
// of the If-None-Match and If-Modified-Since headers are present in the request
|
||||
// as follows: If-None-Match condition evaluates to false , and; If-Modified-Since
|
||||
// condition evaluates to true ; then, S3 returns 304 Not Modified HTTP status
|
||||
// code. For more information about conditional requests, see RFC 7232 (https://tools.ietf.org/html/rfc7232)
|
||||
// .
|
||||
IfNoneMatch *string
|
||||
|
||||
// Return the object only if it has not been modified since the specified time;
|
||||
// otherwise, return a 412 (precondition failed) error.
|
||||
// otherwise, return a 412 Precondition Failed error. If both of the If-Match and
|
||||
// If-Unmodified-Since headers are present in the request as follows: If-Match
|
||||
// condition evaluates to true , and; If-Unmodified-Since condition evaluates to
|
||||
// false ; then, S3 returns 200 OK and the data requested. For more information
|
||||
// about conditional requests, see RFC 7232 (https://tools.ietf.org/html/rfc7232) .
|
||||
IfUnmodifiedSince *time.Time
|
||||
|
||||
// Part number of the object being read. This is a positive integer between 1 and
|
||||
@@ -181,25 +212,25 @@ type GetObjectInput struct {
|
||||
// Useful for downloading just a part of an object.
|
||||
PartNumber *int32
|
||||
|
||||
// Downloads the specified range bytes 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)
|
||||
// Downloads the specified byte range of an object. For more information about the
|
||||
// HTTP Range header, see https://www.rfc-editor.org/rfc/rfc9110.html#name-range (https://www.rfc-editor.org/rfc/rfc9110.html#name-range)
|
||||
// . Amazon S3 doesn't support retrieving multiple ranges of data per GET request.
|
||||
Range *string
|
||||
|
||||
// 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 Amazon S3 bucket has Requester Pays enabled, the requester
|
||||
// will pay for corresponding charges to copy the object. For information about
|
||||
// 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.
|
||||
// in the Amazon S3 User Guide. This functionality is not supported for directory
|
||||
// buckets.
|
||||
RequestPayer types.RequestPayer
|
||||
|
||||
// Sets the Cache-Control header of the response.
|
||||
ResponseCacheControl *string
|
||||
|
||||
// Sets the Content-Disposition header of the response
|
||||
// Sets the Content-Disposition header of the response.
|
||||
ResponseContentDisposition *string
|
||||
|
||||
// Sets the Content-Encoding header of the response.
|
||||
@@ -214,23 +245,66 @@ type GetObjectInput struct {
|
||||
// Sets the Expires header of the response.
|
||||
ResponseExpires *time.Time
|
||||
|
||||
// Specifies the algorithm to use to when decrypting the object (for example,
|
||||
// AES256).
|
||||
// Specifies the algorithm to use when decrypting the object (for example, AES256
|
||||
// ). If you encrypt an object by using server-side encryption with
|
||||
// customer-provided encryption keys (SSE-C) when you store the object in Amazon
|
||||
// S3, then when you GET the object, you must use the following headers:
|
||||
// - x-amz-server-side-encryption-customer-algorithm
|
||||
// - x-amz-server-side-encryption-customer-key
|
||||
// - x-amz-server-side-encryption-customer-key-MD5
|
||||
// For more information about SSE-C, see Server-Side Encryption (Using
|
||||
// Customer-Provided Encryption Keys) (https://docs.aws.amazon.com/AmazonS3/latest/dev/ServerSideEncryptionCustomerKeys.html)
|
||||
// in the Amazon S3 User Guide. This functionality is not supported for directory
|
||||
// buckets.
|
||||
SSECustomerAlgorithm *string
|
||||
|
||||
// Specifies the customer-provided encryption key for Amazon S3 used to encrypt
|
||||
// the data. 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.
|
||||
// Specifies the customer-provided encryption key that you originally provided for
|
||||
// Amazon S3 to encrypt the data before storing it. This value is used to decrypt
|
||||
// the object when recovering it and must match the one used when storing the data.
|
||||
// The key must be appropriate for use with the algorithm specified in the
|
||||
// x-amz-server-side-encryption-customer-algorithm header. If you encrypt an object
|
||||
// by using server-side encryption with customer-provided encryption keys (SSE-C)
|
||||
// when you store the object in Amazon S3, then when you GET the object, you must
|
||||
// use the following headers:
|
||||
// - x-amz-server-side-encryption-customer-algorithm
|
||||
// - x-amz-server-side-encryption-customer-key
|
||||
// - x-amz-server-side-encryption-customer-key-MD5
|
||||
// For more information about SSE-C, see Server-Side Encryption (Using
|
||||
// Customer-Provided Encryption Keys) (https://docs.aws.amazon.com/AmazonS3/latest/dev/ServerSideEncryptionCustomerKeys.html)
|
||||
// in the Amazon S3 User Guide. This functionality is not supported for directory
|
||||
// buckets.
|
||||
SSECustomerKey *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.
|
||||
// Specifies the 128-bit MD5 digest of the customer-provided encryption key
|
||||
// according to RFC 1321. Amazon S3 uses this header for a message integrity check
|
||||
// to ensure that the encryption key was transmitted without error. If you encrypt
|
||||
// an object by using server-side encryption with customer-provided encryption keys
|
||||
// (SSE-C) when you store the object in Amazon S3, then when you GET the object,
|
||||
// you must use the following headers:
|
||||
// - x-amz-server-side-encryption-customer-algorithm
|
||||
// - x-amz-server-side-encryption-customer-key
|
||||
// - x-amz-server-side-encryption-customer-key-MD5
|
||||
// For more information about SSE-C, see Server-Side Encryption (Using
|
||||
// Customer-Provided Encryption Keys) (https://docs.aws.amazon.com/AmazonS3/latest/dev/ServerSideEncryptionCustomerKeys.html)
|
||||
// in the Amazon S3 User Guide. This functionality is not supported for directory
|
||||
// buckets.
|
||||
SSECustomerKeyMD5 *string
|
||||
|
||||
// VersionId used to reference a specific version of the object.
|
||||
// Version ID used to reference a specific version of the object. By default, the
|
||||
// GetObject operation returns the current version of an object. To return a
|
||||
// different version, use the versionId subresource.
|
||||
// - If you include a versionId in your request header, you must have the
|
||||
// s3:GetObjectVersion permission to access a specific version of an object. The
|
||||
// s3:GetObject permission is not required in this scenario.
|
||||
// - If you request the current version of an object without a specific versionId
|
||||
// in the request header, only the s3:GetObject permission is required. The
|
||||
// s3:GetObjectVersion permission is not required in this scenario.
|
||||
// - Directory buckets - S3 Versioning isn't enabled and supported for directory
|
||||
// buckets. For this API operation, only the null value of the version ID is
|
||||
// supported by directory buckets. You can only specify null to the versionId
|
||||
// query parameter in the request.
|
||||
// For more information about versioning, see PutBucketVersioning (https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketVersioning.html)
|
||||
// .
|
||||
VersionId *string
|
||||
|
||||
noSmithyDocumentSerde
|
||||
@@ -244,51 +318,48 @@ func (in *GetObjectInput) bindEndpointParams(p *EndpointParameters) {
|
||||
|
||||
type GetObjectOutput struct {
|
||||
|
||||
// Indicates that a range of bytes was specified.
|
||||
// Indicates that a range of bytes was specified in the request.
|
||||
AcceptRanges *string
|
||||
|
||||
// Object data.
|
||||
Body io.ReadCloser
|
||||
|
||||
// Indicates whether the object uses an S3 Bucket Key for server-side encryption
|
||||
// with Key Management Service (KMS) keys (SSE-KMS).
|
||||
// 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. With multipart uploads, this may not
|
||||
// be a checksum value of the object. 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)
|
||||
// present if it was uploaded with the object. For more information, see Checking
|
||||
// object integrity (https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html)
|
||||
// in the Amazon S3 User Guide.
|
||||
ChecksumCRC32 *string
|
||||
|
||||
// The base64-encoded, 32-bit CRC32C checksum of the object. This will only be
|
||||
// present if it was uploaded with the object. With multipart uploads, this may not
|
||||
// be a checksum value of the object. 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)
|
||||
// present if it was uploaded with the object. For more information, see Checking
|
||||
// object integrity (https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html)
|
||||
// in the Amazon S3 User Guide.
|
||||
ChecksumCRC32C *string
|
||||
|
||||
// The base64-encoded, 160-bit SHA-1 digest of the object. This will only be
|
||||
// present if it was uploaded with the object. With multipart uploads, this may not
|
||||
// be a checksum value of the object. 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)
|
||||
// present if it was uploaded with the object. For more information, see Checking
|
||||
// object integrity (https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html)
|
||||
// in the Amazon S3 User Guide.
|
||||
ChecksumSHA1 *string
|
||||
|
||||
// The base64-encoded, 256-bit SHA-256 digest of the object. This will only be
|
||||
// present if it was uploaded with the object. With multipart uploads, this may not
|
||||
// be a checksum value of the object. 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)
|
||||
// present if it was uploaded with the object. For more information, see Checking
|
||||
// object integrity (https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html)
|
||||
// in the Amazon S3 User Guide.
|
||||
ChecksumSHA256 *string
|
||||
|
||||
// Specifies presentational information for the object.
|
||||
ContentDisposition *string
|
||||
|
||||
// Specifies what content encodings have been applied to the object and thus what
|
||||
// Indicates what content encodings have been applied to the object and thus what
|
||||
// decoding mechanisms must be applied to obtain the media-type referenced by the
|
||||
// Content-Type header field.
|
||||
ContentEncoding *string
|
||||
@@ -305,24 +376,34 @@ type GetObjectOutput struct {
|
||||
// A standard MIME type describing the format of the object data.
|
||||
ContentType *string
|
||||
|
||||
// Specifies whether the object retrieved was (true) or was not (false) a Delete
|
||||
// Indicates whether the object retrieved was (true) or was not (false) a Delete
|
||||
// Marker. If false, this response header does not appear in the response.
|
||||
// - If the current version of the object is a delete marker, Amazon S3 behaves
|
||||
// as if the object was deleted and includes x-amz-delete-marker: true in the
|
||||
// response.
|
||||
// - If the specified version in the request is a delete marker, the response
|
||||
// returns a 405 Method Not Allowed error and the Last-Modified: timestamp
|
||||
// response header.
|
||||
DeleteMarker *bool
|
||||
|
||||
// An entity tag (ETag) is an opaque identifier assigned by a web server to a
|
||||
// specific version of a resource found at a URL.
|
||||
ETag *string
|
||||
|
||||
// If the object expiration is configured (see PUT Bucket lifecycle), the response
|
||||
// includes this header. It includes the expiry-date and rule-id key-value pairs
|
||||
// providing object expiration information. The value of the rule-id is
|
||||
// URL-encoded.
|
||||
// If the object expiration is configured (see PutBucketLifecycleConfiguration (https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketLifecycleConfiguration.html)
|
||||
// ), the response includes this header. It includes the expiry-date and rule-id
|
||||
// key-value pairs providing object expiration information. The value of the
|
||||
// rule-id is URL-encoded. This functionality is not supported for directory
|
||||
// buckets.
|
||||
Expiration *string
|
||||
|
||||
// The date and time at which the object is no longer cacheable.
|
||||
Expires *time.Time
|
||||
|
||||
// Date and time when the object was last modified.
|
||||
// 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.
|
||||
@@ -330,20 +411,24 @@ type GetObjectOutput struct {
|
||||
// Map keys will be normalized to lower-case.
|
||||
Metadata map[string]string
|
||||
|
||||
// This is set to the number of metadata entries not returned in x-amz-meta
|
||||
// headers. This can happen if you create metadata using an API like SOAP that
|
||||
// supports more flexible metadata than the REST API. For example, using SOAP, you
|
||||
// can create metadata whose values are not legal HTTP headers.
|
||||
// This is set to the number of metadata entries not returned in the headers that
|
||||
// are prefixed with x-amz-meta- . This can happen if you create metadata using an
|
||||
// API like SOAP that supports more flexible metadata than the REST API. For
|
||||
// example, using SOAP, you can create metadata whose values are not legal HTTP
|
||||
// headers. This functionality is not supported for directory buckets.
|
||||
MissingMeta *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.
|
||||
// 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 currently in place for this object.
|
||||
// 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.
|
||||
// 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
|
||||
@@ -351,48 +436,63 @@ 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.
|
||||
// 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.
|
||||
// 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.
|
||||
// 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 confirming the encryption
|
||||
// algorithm used.
|
||||
// requested, the response will include this header to confirm the encryption
|
||||
// algorithm that's used. This functionality is not supported for directory
|
||||
// buckets.
|
||||
SSECustomerAlgorithm *string
|
||||
|
||||
// If server-side encryption with a customer-provided encryption key was
|
||||
// requested, the response will include this header to provide round-trip message
|
||||
// integrity verification of the customer-provided encryption key.
|
||||
// requested, the response will include this header to provide the round-trip
|
||||
// message integrity verification of the customer-provided encryption key. This
|
||||
// functionality is not supported for directory buckets.
|
||||
SSECustomerKeyMD5 *string
|
||||
|
||||
// If present, specifies the ID of the Key Management Service (KMS) symmetric
|
||||
// encryption customer managed key that was used for the object.
|
||||
// If present, indicates the ID of the Key Management Service (KMS) symmetric
|
||||
// encryption customer managed key that was used for the object. This functionality
|
||||
// is not supported for directory buckets.
|
||||
SSEKMSKeyId *string
|
||||
|
||||
// The server-side encryption algorithm used when storing this object in Amazon S3
|
||||
// (for example, AES256 , aws:kms , aws:kms:dsse ).
|
||||
// The server-side encryption algorithm used when you store this object in Amazon
|
||||
// S3 (for example, AES256 , aws:kms , aws:kms:dsse ). For directory buckets, only
|
||||
// server-side encryption with Amazon S3 managed keys (SSE-S3) ( AES256 ) is
|
||||
// supported.
|
||||
ServerSideEncryption types.ServerSideEncryption
|
||||
|
||||
// Provides storage class information of the object. Amazon S3 returns this header
|
||||
// for all objects except for S3 Standard storage class 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.
|
||||
// The number of tags, if any, on the object, when you have the relevant
|
||||
// permission to read object tags. You can use GetObjectTagging (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetObjectTagging.html)
|
||||
// to retrieve the tag set associated with an object. This functionality is not
|
||||
// supported for directory buckets.
|
||||
TagCount *int32
|
||||
|
||||
// Version of the object.
|
||||
// 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.
|
||||
// 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.
|
||||
@@ -453,6 +553,9 @@ func (c *Client) addOperationGetObjectMiddlewares(stack *middleware.Stack, optio
|
||||
if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addPutBucketContextMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addOpGetObjectValidationMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
+21
-13
@@ -13,10 +13,11 @@ import (
|
||||
smithyhttp "github.com/aws/smithy-go/transport/http"
|
||||
)
|
||||
|
||||
// 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 action is not supported by Amazon S3 on
|
||||
// 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
|
||||
@@ -48,7 +49,9 @@ 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.
|
||||
// When using this action with an access point, you must direct requests to the
|
||||
// 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
|
||||
@@ -64,21 +67,23 @@ type GetObjectAclInput struct {
|
||||
// This member is required.
|
||||
Key *string
|
||||
|
||||
// The account ID of the expected bucket owner. If the bucket is owned by a
|
||||
// different account, the request fails with the HTTP status code 403 Forbidden
|
||||
// (access denied).
|
||||
// The account ID of the expected bucket owner. If the account ID that you provide
|
||||
// does not match the actual owner of the bucket, the request fails with the HTTP
|
||||
// status code 403 Forbidden (access denied).
|
||||
ExpectedBucketOwner *string
|
||||
|
||||
// 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 Amazon S3 bucket has Requester Pays enabled, the requester
|
||||
// will pay for corresponding charges to copy the object. For information about
|
||||
// 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.
|
||||
// in the Amazon S3 User Guide. This functionality is not supported for directory
|
||||
// buckets.
|
||||
RequestPayer types.RequestPayer
|
||||
|
||||
// VersionId used to reference a specific version of the object.
|
||||
// Version ID used to reference a specific version of the object. This
|
||||
// functionality is not supported for directory buckets.
|
||||
VersionId *string
|
||||
|
||||
noSmithyDocumentSerde
|
||||
@@ -99,7 +104,7 @@ type GetObjectAclOutput struct {
|
||||
Owner *types.Owner
|
||||
|
||||
// If present, indicates that the requester was successfully charged for the
|
||||
// request.
|
||||
// request. This functionality is not supported for directory buckets.
|
||||
RequestCharged types.RequestCharged
|
||||
|
||||
// Metadata pertaining to the operation's result.
|
||||
@@ -163,6 +168,9 @@ func (c *Client) addOperationGetObjectAclMiddlewares(stack *middleware.Stack, op
|
||||
if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addPutBucketContextMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addOpGetObjectAclValidationMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
+111
-57
@@ -15,57 +15,87 @@ import (
|
||||
)
|
||||
|
||||
// Retrieves all the metadata from an object without returning the object itself.
|
||||
// This action is useful if you're interested only in an object's metadata. To use
|
||||
// GetObjectAttributes , you must have READ access to the object.
|
||||
// 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 . 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:
|
||||
// single call to GetObjectAttributes . Directory buckets - For directory buckets,
|
||||
// you must make requests for this API operation to the Zonal endpoint. These
|
||||
// endpoints support virtual-hosted-style requests in the format
|
||||
// https://bucket_name.s3express-az_id.region.amazonaws.com/key-name . Path-style
|
||||
// requests are not supported. For more information, see Regional and Zonal
|
||||
// endpoints (https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-express-Regions-and-Zones.html)
|
||||
// in the Amazon S3 User Guide. Permissions
|
||||
// - General purpose bucket permissions - To use GetObjectAttributes , you must
|
||||
// have READ access to the object. The permissions that you need to use this
|
||||
// operation with depend on whether the bucket is versioned. If the bucket is
|
||||
// versioned, you need both the s3:GetObjectVersion and
|
||||
// s3:GetObjectVersionAttributes permissions for this operation. If the bucket is
|
||||
// not versioned, you need the s3:GetObject and s3:GetObjectAttributes
|
||||
// permissions. For more information, see Specifying Permissions in a Policy (https://docs.aws.amazon.com/AmazonS3/latest/dev/using-with-s3-actions.html)
|
||||
// in the Amazon S3 User Guide. If the object that you request does not exist, the
|
||||
// error Amazon S3 returns depends on whether you also have the s3:ListBucket
|
||||
// permission.
|
||||
// - If you have the s3:ListBucket permission on the bucket, Amazon S3 returns an
|
||||
// HTTP status code 404 Not Found ("no such key") error.
|
||||
// - If you don't have the s3:ListBucket permission, Amazon S3 returns an HTTP
|
||||
// status code 403 Forbidden ("access denied") error.
|
||||
// - Directory bucket permissions - To grant access to this API operation on a
|
||||
// directory bucket, we recommend that you use the CreateSession (https://docs.aws.amazon.com/AmazonS3/latest/API/API_CreateSession.html)
|
||||
// API operation for session-based authorization. Specifically, you grant the
|
||||
// s3express:CreateSession permission to the directory bucket in a bucket policy
|
||||
// or an IAM identity-based policy. Then, you make the CreateSession API call on
|
||||
// the bucket to obtain a session token. With the session token in your request
|
||||
// header, you can make API requests to this operation. After the session token
|
||||
// expires, you make another CreateSession API call to generate a new session
|
||||
// token for use. Amazon Web Services CLI or SDKs create session and refresh the
|
||||
// session token automatically to avoid service interruptions when a session
|
||||
// expires. For more information about authorization, see CreateSession (https://docs.aws.amazon.com/AmazonS3/latest/API/API_CreateSession.html)
|
||||
// .
|
||||
//
|
||||
// Encryption Encryption request headers, like x-amz-server-side-encryption ,
|
||||
// should not be sent for HEAD requests if your object uses server-side encryption
|
||||
// with Key Management Service (KMS) keys (SSE-KMS), dual-layer server-side
|
||||
// encryption with Amazon Web Services KMS keys (DSSE-KMS), or server-side
|
||||
// encryption with Amazon S3 managed encryption keys (SSE-S3). The
|
||||
// x-amz-server-side-encryption header is used when you PUT an object to S3 and
|
||||
// want to specify the encryption method. If you include this header in a GET
|
||||
// request for an object that uses these types of keys, you’ll get an HTTP 400 Bad
|
||||
// Request error. It's because the encryption method can't be changed when you
|
||||
// retrieve the object. If you encrypt an object by using server-side encryption
|
||||
// with customer-provided encryption keys (SSE-C) when you store the object in
|
||||
// Amazon S3, then when you retrieve the metadata from the object, you must use the
|
||||
// following headers to provide the encryption key for the server to be able to
|
||||
// retrieve the object's metadata. The headers are:
|
||||
// - x-amz-server-side-encryption-customer-algorithm
|
||||
// - x-amz-server-side-encryption-customer-key
|
||||
// - x-amz-server-side-encryption-customer-key-MD5
|
||||
//
|
||||
// For more information about SSE-C, see Server-Side Encryption (Using
|
||||
// Customer-Provided Encryption Keys) (https://docs.aws.amazon.com/AmazonS3/latest/dev/ServerSideEncryptionCustomerKeys.html)
|
||||
// in the Amazon S3 User Guide.
|
||||
// - Encryption request headers, such as x-amz-server-side-encryption , should
|
||||
// not be sent for GET requests if your object uses server-side encryption with
|
||||
// Amazon Web Services KMS keys stored in Amazon Web Services Key Management
|
||||
// Service (SSE-KMS) or server-side encryption with Amazon S3 managed keys
|
||||
// (SSE-S3). If your object does use these types of keys, you'll get an HTTP 400
|
||||
// Bad Request error.
|
||||
// - The last modified property in this case is the creation date of the object.
|
||||
//
|
||||
// Consider the following when using request headers:
|
||||
// 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 .
|
||||
// - If-Unmodified-Since condition evaluates to false . For more information
|
||||
// about conditional requests, see RFC 7232 (https://tools.ietf.org/html/rfc7232)
|
||||
// .
|
||||
// - If both of the If-None-Match and If-Modified-Since headers are present in
|
||||
// the request as follows, then Amazon S3 returns the HTTP status code 304 Not
|
||||
// Modified :
|
||||
// - If-None-Match condition evaluates to false .
|
||||
// - If-Modified-Since condition evaluates to true .
|
||||
// - If-Modified-Since condition evaluates to true . For more information about
|
||||
// conditional requests, see RFC 7232 (https://tools.ietf.org/html/rfc7232) .
|
||||
//
|
||||
// For more information about conditional requests, see RFC 7232 (https://tools.ietf.org/html/rfc7232)
|
||||
// . Permissions The permissions that you need to use this operation depend on
|
||||
// whether the bucket is versioned. If the bucket is versioned, you need both the
|
||||
// s3:GetObjectVersion and s3:GetObjectVersionAttributes permissions for this
|
||||
// operation. If the bucket is not versioned, you need the s3:GetObject and
|
||||
// s3:GetObjectAttributes permissions. For more information, see Specifying
|
||||
// Permissions in a Policy (https://docs.aws.amazon.com/AmazonS3/latest/dev/using-with-s3-actions.html)
|
||||
// in the Amazon S3 User Guide. If the object that you request does not exist, the
|
||||
// error Amazon S3 returns depends on whether you also have the s3:ListBucket
|
||||
// permission.
|
||||
// - If you have the s3:ListBucket permission on the bucket, Amazon S3 returns an
|
||||
// HTTP status code 404 Not Found ("no such key") error.
|
||||
// - If you don't have the s3:ListBucket permission, Amazon S3 returns an HTTP
|
||||
// status code 403 Forbidden ("access denied") error.
|
||||
//
|
||||
// The following actions are related to GetObjectAttributes :
|
||||
// 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)
|
||||
@@ -91,16 +121,26 @@ func (c *Client) GetObjectAttributes(ctx context.Context, params *GetObjectAttri
|
||||
|
||||
type GetObjectAttributesInput struct {
|
||||
|
||||
// The name of the bucket that contains the object. When using this action with an
|
||||
// access point, 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. 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-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
|
||||
// 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
|
||||
@@ -121,9 +161,9 @@ type GetObjectAttributesInput struct {
|
||||
// This member is required.
|
||||
ObjectAttributes []types.ObjectAttributes
|
||||
|
||||
// The account ID of the expected bucket owner. If the bucket is owned by a
|
||||
// different account, the request fails with the HTTP status code 403 Forbidden
|
||||
// (access denied).
|
||||
// The account ID of the expected bucket owner. If the account ID that you provide
|
||||
// does not match the actual owner of the bucket, the request fails with the HTTP
|
||||
// status code 403 Forbidden (access denied).
|
||||
ExpectedBucketOwner *string
|
||||
|
||||
// Sets the maximum number of parts to return.
|
||||
@@ -135,29 +175,37 @@ type GetObjectAttributesInput struct {
|
||||
|
||||
// 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 Amazon S3 bucket has Requester Pays enabled, the requester
|
||||
// will pay for corresponding charges to copy the object. For information about
|
||||
// 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.
|
||||
// in the Amazon S3 User Guide. This functionality is not supported for directory
|
||||
// buckets.
|
||||
RequestPayer types.RequestPayer
|
||||
|
||||
// Specifies the algorithm to use when encrypting the object (for example, AES256).
|
||||
// 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.
|
||||
// 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.
|
||||
// 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.
|
||||
// The version ID used to reference a specific version of the object. S3
|
||||
// Versioning isn't enabled and supported for directory buckets. For this API
|
||||
// operation, only the null value of the version ID is supported by directory
|
||||
// buckets. You can only specify null to the versionId query parameter in the
|
||||
// request.
|
||||
VersionId *string
|
||||
|
||||
noSmithyDocumentSerde
|
||||
@@ -175,6 +223,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
|
||||
|
||||
// An ETag is an opaque identifier assigned by a web server to a specific version
|
||||
@@ -191,16 +240,18 @@ type GetObjectAttributesOutput struct {
|
||||
ObjectSize *int64
|
||||
|
||||
// If present, indicates that the requester was successfully charged for the
|
||||
// request.
|
||||
// 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
|
||||
// directory buckets to store objects.
|
||||
StorageClass types.StorageClass
|
||||
|
||||
// The version ID of the object.
|
||||
// The version ID of the object. This functionality is not supported for directory
|
||||
// buckets.
|
||||
VersionId *string
|
||||
|
||||
// Metadata pertaining to the operation's result.
|
||||
@@ -264,6 +315,9 @@ func (c *Client) addOperationGetObjectAttributesMiddlewares(stack *middleware.St
|
||||
if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addPutBucketContextMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addOpGetObjectAttributesValidationMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
+18
-12
@@ -13,10 +13,10 @@ import (
|
||||
smithyhttp "github.com/aws/smithy-go/transport/http"
|
||||
)
|
||||
|
||||
// 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 action is not supported by Amazon S3 on Outposts. The following action is
|
||||
// related to GetObjectLegalHold :
|
||||
// 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)
|
||||
func (c *Client) GetObjectLegalHold(ctx context.Context, params *GetObjectLegalHoldInput, optFns ...func(*Options)) (*GetObjectLegalHoldOutput, error) {
|
||||
if params == nil {
|
||||
@@ -36,8 +36,10 @@ 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. When using this action with an access point, 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
|
||||
@@ -52,18 +54,19 @@ type GetObjectLegalHoldInput struct {
|
||||
// This member is required.
|
||||
Key *string
|
||||
|
||||
// The account ID of the expected bucket owner. If the bucket is owned by a
|
||||
// different account, the request fails with the HTTP status code 403 Forbidden
|
||||
// (access denied).
|
||||
// The account ID of the expected bucket owner. If the account ID that you provide
|
||||
// does not match the actual owner of the bucket, the request fails with the HTTP
|
||||
// status code 403 Forbidden (access denied).
|
||||
ExpectedBucketOwner *string
|
||||
|
||||
// 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 Amazon S3 bucket has Requester Pays enabled, the requester
|
||||
// will pay for corresponding charges to copy the object. For information about
|
||||
// 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.
|
||||
// in the Amazon S3 User Guide. This functionality is not supported for directory
|
||||
// buckets.
|
||||
RequestPayer types.RequestPayer
|
||||
|
||||
// The version ID of the object whose legal hold status you want to retrieve.
|
||||
@@ -143,6 +146,9 @@ func (c *Client) addOperationGetObjectLegalHoldMiddlewares(stack *middleware.Sta
|
||||
if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addPutBucketContextMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addOpGetObjectLegalHoldValidationMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
Generated
Vendored
+14
-8
@@ -13,9 +13,10 @@ import (
|
||||
smithyhttp "github.com/aws/smithy-go/transport/http"
|
||||
)
|
||||
|
||||
// Gets the Object Lock configuration for a bucket. The rule specified in the
|
||||
// Object Lock configuration will be applied by default to every new object placed
|
||||
// in the specified bucket. For more information, see Locking Objects (https://docs.aws.amazon.com/AmazonS3/latest/dev/object-lock.html)
|
||||
// This operation is not supported by directory buckets. Gets the Object Lock
|
||||
// configuration for a bucket. The rule specified in the Object Lock configuration
|
||||
// will be applied by default to every new object placed in the specified bucket.
|
||||
// For more information, see Locking Objects (https://docs.aws.amazon.com/AmazonS3/latest/dev/object-lock.html)
|
||||
// . The following action is related to GetObjectLockConfiguration :
|
||||
// - GetObjectAttributes (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetObjectAttributes.html)
|
||||
func (c *Client) GetObjectLockConfiguration(ctx context.Context, params *GetObjectLockConfigurationInput, optFns ...func(*Options)) (*GetObjectLockConfigurationOutput, error) {
|
||||
@@ -35,8 +36,10 @@ func (c *Client) GetObjectLockConfiguration(ctx context.Context, params *GetObje
|
||||
|
||||
type GetObjectLockConfigurationInput struct {
|
||||
|
||||
// The bucket whose Object Lock configuration you want to retrieve. When using
|
||||
// this action with an access point, you must direct requests to the access point
|
||||
// The bucket whose Object Lock configuration you want to retrieve. Access points
|
||||
// - When you use this action with an access point, you must provide the alias of
|
||||
// the access point in place of the bucket name or specify the access point ARN.
|
||||
// When using the access point ARN, you must direct requests to the access point
|
||||
// hostname. The access point hostname takes the form
|
||||
// AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com. When using this
|
||||
// action with an access point through the Amazon Web Services SDKs, you provide
|
||||
@@ -47,9 +50,9 @@ type GetObjectLockConfigurationInput struct {
|
||||
// This member is required.
|
||||
Bucket *string
|
||||
|
||||
// The account ID of the expected bucket owner. If the bucket is owned by a
|
||||
// different account, the request fails with the HTTP status code 403 Forbidden
|
||||
// (access denied).
|
||||
// The account ID of the expected bucket owner. If the account ID that you provide
|
||||
// does not match the actual owner of the bucket, the request fails with the HTTP
|
||||
// status code 403 Forbidden (access denied).
|
||||
ExpectedBucketOwner *string
|
||||
|
||||
noSmithyDocumentSerde
|
||||
@@ -126,6 +129,9 @@ func (c *Client) addOperationGetObjectLockConfigurationMiddlewares(stack *middle
|
||||
if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addPutBucketContextMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addOpGetObjectLockConfigurationValidationMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
+18
-12
@@ -13,10 +13,10 @@ import (
|
||||
smithyhttp "github.com/aws/smithy-go/transport/http"
|
||||
)
|
||||
|
||||
// Retrieves an object's retention settings. For more information, see Locking
|
||||
// Objects (https://docs.aws.amazon.com/AmazonS3/latest/dev/object-lock.html) .
|
||||
// This action is not supported by Amazon S3 on Outposts. The following action is
|
||||
// related to GetObjectRetention :
|
||||
// This operation is not supported by directory buckets. Retrieves an object's
|
||||
// retention settings. For more information, see Locking Objects (https://docs.aws.amazon.com/AmazonS3/latest/dev/object-lock.html)
|
||||
// . This functionality is not supported for Amazon S3 on Outposts. The following
|
||||
// action is related to GetObjectRetention :
|
||||
// - GetObjectAttributes (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetObjectAttributes.html)
|
||||
func (c *Client) GetObjectRetention(ctx context.Context, params *GetObjectRetentionInput, optFns ...func(*Options)) (*GetObjectRetentionOutput, error) {
|
||||
if params == nil {
|
||||
@@ -36,8 +36,10 @@ func (c *Client) GetObjectRetention(ctx context.Context, params *GetObjectRetent
|
||||
type GetObjectRetentionInput struct {
|
||||
|
||||
// The bucket name containing the object whose retention settings you want to
|
||||
// retrieve. When using this action with an access point, 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
|
||||
@@ -52,18 +54,19 @@ type GetObjectRetentionInput struct {
|
||||
// This member is required.
|
||||
Key *string
|
||||
|
||||
// The account ID of the expected bucket owner. If the bucket is owned by a
|
||||
// different account, the request fails with the HTTP status code 403 Forbidden
|
||||
// (access denied).
|
||||
// The account ID of the expected bucket owner. If the account ID that you provide
|
||||
// does not match the actual owner of the bucket, the request fails with the HTTP
|
||||
// status code 403 Forbidden (access denied).
|
||||
ExpectedBucketOwner *string
|
||||
|
||||
// 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 Amazon S3 bucket has Requester Pays enabled, the requester
|
||||
// will pay for corresponding charges to copy the object. For information about
|
||||
// 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.
|
||||
// in the Amazon S3 User Guide. This functionality is not supported for directory
|
||||
// buckets.
|
||||
RequestPayer types.RequestPayer
|
||||
|
||||
// The version ID for the object whose retention settings you want to retrieve.
|
||||
@@ -143,6 +146,9 @@ func (c *Client) addOperationGetObjectRetentionMiddlewares(stack *middleware.Sta
|
||||
if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addPutBucketContextMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addOpGetObjectRetentionValidationMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
+26
-19
@@ -13,15 +13,16 @@ import (
|
||||
smithyhttp "github.com/aws/smithy-go/transport/http"
|
||||
)
|
||||
|
||||
// Returns the tag-set of an object. You send the GET request against the tagging
|
||||
// subresource associated with the object. To use this operation, you must have
|
||||
// permission to perform the s3:GetObjectTagging action. By default, the GET
|
||||
// action returns information about current version of an object. For a versioned
|
||||
// bucket, you can have multiple versions of an object in your bucket. To retrieve
|
||||
// tags of any other version, use the versionId query parameter. You also need
|
||||
// permission for the s3:GetObjectVersionTagging action. By default, the bucket
|
||||
// owner has this permission and can grant this permission to others. For
|
||||
// information about the Amazon S3 object tagging feature, see Object Tagging (https://docs.aws.amazon.com/AmazonS3/latest/dev/object-tagging.html)
|
||||
// This operation is not supported by directory buckets. Returns the tag-set of an
|
||||
// object. You send the GET request against the tagging subresource associated with
|
||||
// the object. To use this operation, you must have permission to perform the
|
||||
// s3:GetObjectTagging action. By default, the GET action returns information about
|
||||
// current version of an object. For a versioned bucket, you can have multiple
|
||||
// versions of an object in your bucket. To retrieve tags of any other version, use
|
||||
// the versionId query parameter. You also need permission for the
|
||||
// s3:GetObjectVersionTagging action. By default, the bucket owner has this
|
||||
// permission and can grant this permission to others. For information about the
|
||||
// Amazon S3 object tagging feature, see Object Tagging (https://docs.aws.amazon.com/AmazonS3/latest/dev/object-tagging.html)
|
||||
// . The following actions are related to GetObjectTagging :
|
||||
// - DeleteObjectTagging (https://docs.aws.amazon.com/AmazonS3/latest/API/API_DeleteObjectTagging.html)
|
||||
// - GetObjectAttributes (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetObjectAttributes.html)
|
||||
@@ -44,15 +45,17 @@ func (c *Client) GetObjectTagging(ctx context.Context, params *GetObjectTaggingI
|
||||
type GetObjectTaggingInput struct {
|
||||
|
||||
// The bucket name containing the object for which to get the tagging information.
|
||||
// When using this action with an access point, you must direct requests to the
|
||||
// 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. 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
|
||||
// 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
|
||||
@@ -67,18 +70,19 @@ type GetObjectTaggingInput struct {
|
||||
// This member is required.
|
||||
Key *string
|
||||
|
||||
// The account ID of the expected bucket owner. If the bucket is owned by a
|
||||
// different account, the request fails with the HTTP status code 403 Forbidden
|
||||
// (access denied).
|
||||
// The account ID of the expected bucket owner. If the account ID that you provide
|
||||
// does not match the actual owner of the bucket, the request fails with the HTTP
|
||||
// status code 403 Forbidden (access denied).
|
||||
ExpectedBucketOwner *string
|
||||
|
||||
// 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 Amazon S3 bucket has Requester Pays enabled, the requester
|
||||
// will pay for corresponding charges to copy the object. For information about
|
||||
// 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.
|
||||
// in the Amazon S3 User Guide. This functionality is not supported for directory
|
||||
// buckets.
|
||||
RequestPayer types.RequestPayer
|
||||
|
||||
// The versionId of the object for which to get the tagging information.
|
||||
@@ -163,6 +167,9 @@ func (c *Client) addOperationGetObjectTaggingMiddlewares(stack *middleware.Stack
|
||||
if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addPutBucketContextMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addOpGetObjectTaggingValidationMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
+18
-13
@@ -14,12 +14,13 @@ import (
|
||||
"io"
|
||||
)
|
||||
|
||||
// Returns torrent files from a bucket. BitTorrent can save you bandwidth when
|
||||
// you're distributing large files. You can get torrent only for objects that are
|
||||
// less than 5 GB in size, and that are not encrypted using server-side encryption
|
||||
// with a customer-provided encryption key. To use GET, you must have READ access
|
||||
// to the object. This action is not supported by Amazon S3 on Outposts. The
|
||||
// following action is related to GetObjectTorrent :
|
||||
// This operation is not supported by directory buckets. Returns torrent files
|
||||
// from a bucket. BitTorrent can save you bandwidth when you're distributing large
|
||||
// files. You can get torrent only for objects that are less than 5 GB in size, and
|
||||
// that are not encrypted using server-side encryption with a customer-provided
|
||||
// encryption key. To use GET, you must have READ access to the object. This
|
||||
// functionality is not supported for Amazon S3 on Outposts. The following action
|
||||
// is related to GetObjectTorrent :
|
||||
// - GetObject (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetObject.html)
|
||||
func (c *Client) GetObjectTorrent(ctx context.Context, params *GetObjectTorrentInput, optFns ...func(*Options)) (*GetObjectTorrentOutput, error) {
|
||||
if params == nil {
|
||||
@@ -48,18 +49,19 @@ type GetObjectTorrentInput struct {
|
||||
// This member is required.
|
||||
Key *string
|
||||
|
||||
// The account ID of the expected bucket owner. If the bucket is owned by a
|
||||
// different account, the request fails with the HTTP status code 403 Forbidden
|
||||
// (access denied).
|
||||
// The account ID of the expected bucket owner. If the account ID that you provide
|
||||
// does not match the actual owner of the bucket, the request fails with the HTTP
|
||||
// status code 403 Forbidden (access denied).
|
||||
ExpectedBucketOwner *string
|
||||
|
||||
// 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 Amazon S3 bucket has Requester Pays enabled, the requester
|
||||
// will pay for corresponding charges to copy the object. For information about
|
||||
// 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.
|
||||
// in the Amazon S3 User Guide. This functionality is not supported for directory
|
||||
// buckets.
|
||||
RequestPayer types.RequestPayer
|
||||
|
||||
noSmithyDocumentSerde
|
||||
@@ -76,7 +78,7 @@ type GetObjectTorrentOutput struct {
|
||||
Body io.ReadCloser
|
||||
|
||||
// If present, indicates that the requester was successfully charged for the
|
||||
// request.
|
||||
// request. This functionality is not supported for directory buckets.
|
||||
RequestCharged types.RequestCharged
|
||||
|
||||
// Metadata pertaining to the operation's result.
|
||||
@@ -137,6 +139,9 @@ func (c *Client) addOperationGetObjectTorrentMiddlewares(stack *middleware.Stack
|
||||
if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addPutBucketContextMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addOpGetObjectTorrentValidationMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
+12
-8
@@ -10,13 +10,14 @@ import (
|
||||
s3cust "github.com/aws/aws-sdk-go-v2/service/s3/internal/customizations"
|
||||
"github.com/aws/aws-sdk-go-v2/service/s3/types"
|
||||
"github.com/aws/smithy-go/middleware"
|
||||
"github.com/aws/smithy-go/ptr"
|
||||
smithyhttp "github.com/aws/smithy-go/transport/http"
|
||||
)
|
||||
|
||||
// Retrieves the PublicAccessBlock configuration for an Amazon S3 bucket. To use
|
||||
// this operation, you must have the s3:GetBucketPublicAccessBlock permission. For
|
||||
// more information about Amazon S3 permissions, see Specifying Permissions in a
|
||||
// Policy (https://docs.aws.amazon.com/AmazonS3/latest/dev/using-with-s3-actions.html)
|
||||
// This operation is not supported by directory buckets. Retrieves the
|
||||
// PublicAccessBlock configuration for an Amazon S3 bucket. To use this operation,
|
||||
// you must have the s3:GetBucketPublicAccessBlock permission. For more
|
||||
// information about Amazon S3 permissions, see Specifying Permissions in a Policy (https://docs.aws.amazon.com/AmazonS3/latest/dev/using-with-s3-actions.html)
|
||||
// . When Amazon S3 evaluates the PublicAccessBlock configuration for a bucket or
|
||||
// an object, it checks the PublicAccessBlock configuration for both the bucket
|
||||
// (or the bucket that contains the object) and the bucket owner's account. If the
|
||||
@@ -52,9 +53,9 @@ type GetPublicAccessBlockInput struct {
|
||||
// This member is required.
|
||||
Bucket *string
|
||||
|
||||
// The account ID of the expected bucket owner. If the bucket is owned by a
|
||||
// different account, the request fails with the HTTP status code 403 Forbidden
|
||||
// (access denied).
|
||||
// The account ID of the expected bucket owner. If the account ID that you provide
|
||||
// does not match the actual owner of the bucket, the request fails with the HTTP
|
||||
// status code 403 Forbidden (access denied).
|
||||
ExpectedBucketOwner *string
|
||||
|
||||
noSmithyDocumentSerde
|
||||
@@ -62,7 +63,7 @@ type GetPublicAccessBlockInput struct {
|
||||
|
||||
func (in *GetPublicAccessBlockInput) bindEndpointParams(p *EndpointParameters) {
|
||||
p.Bucket = in.Bucket
|
||||
|
||||
p.UseS3ExpressControlEndpoint = ptr.Bool(true)
|
||||
}
|
||||
|
||||
type GetPublicAccessBlockOutput struct {
|
||||
@@ -132,6 +133,9 @@ func (c *Client) addOperationGetPublicAccessBlockMiddlewares(stack *middleware.S
|
||||
if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addPutBucketContextMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addOpGetPublicAccessBlockValidationMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
+88
-40
@@ -17,30 +17,44 @@ import (
|
||||
"time"
|
||||
)
|
||||
|
||||
// This action is useful to determine if a bucket exists and you have permission
|
||||
// to access it. The action returns a 200 OK if the bucket exists and you have
|
||||
// permission to access it. If the bucket does not exist or you do not have
|
||||
// permission to access it, the HEAD request returns a generic 400 Bad Request ,
|
||||
// 403 Forbidden or 404 Not Found code. A message body is not included, so you
|
||||
// cannot determine the exception beyond these error codes. To use this operation,
|
||||
// you must have permissions to perform the s3:ListBucket action. The bucket owner
|
||||
// has this permission by default and can grant this permission to others. For more
|
||||
// information about permissions, see 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)
|
||||
// . To use this API operation against 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 the
|
||||
// Amazon Web Services SDKs, you provide the ARN in place of the bucket name. For
|
||||
// more information, see Using access points (https://docs.aws.amazon.com/AmazonS3/latest/userguide/using-access-points.html)
|
||||
// . To use this API operation against 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)
|
||||
// .
|
||||
// You can use this operation to determine if a bucket exists and if you have
|
||||
// permission to access it. The action returns a 200 OK if the bucket exists and
|
||||
// you have permission to access it. If the bucket does not exist or you do not
|
||||
// have permission to access it, the HEAD request returns a generic 400 Bad Request
|
||||
// , 403 Forbidden or 404 Not Found code. A message body is not included, so you
|
||||
// cannot determine the exception beyond these error codes. Directory buckets - You
|
||||
// must make requests for this API operation to the Zonal endpoint. These endpoints
|
||||
// support virtual-hosted-style requests in the format
|
||||
// https://bucket_name.s3express-az_id.region.amazonaws.com . Path-style requests
|
||||
// are not supported. For more information, see Regional and Zonal endpoints (https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-express-Regions-and-Zones.html)
|
||||
// in the Amazon S3 User Guide. Authentication and authorization All HeadBucket
|
||||
// requests must be authenticated and signed by using IAM credentials (access key
|
||||
// ID and secret access key for the IAM identities). All headers with the x-amz-
|
||||
// prefix, including x-amz-copy-source , must be signed. For more information, see
|
||||
// REST Authentication (https://docs.aws.amazon.com/AmazonS3/latest/dev/RESTAuthentication.html)
|
||||
// . Directory bucket - You must use IAM credentials to authenticate and authorize
|
||||
// your access to the HeadBucket API operation, instead of using the temporary
|
||||
// security credentials through the CreateSession API operation. Amazon Web
|
||||
// Services CLI or SDKs handles authentication and authorization on your behalf.
|
||||
// Permissions
|
||||
// - General purpose bucket permissions - To use this operation, you must have
|
||||
// permissions to perform the s3:ListBucket action. The bucket owner has this
|
||||
// permission by default and can grant this permission to others. For more
|
||||
// information about permissions, see Managing access permissions to your Amazon
|
||||
// S3 resources (https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-access-control.html)
|
||||
// in the Amazon S3 User Guide.
|
||||
// - Directory bucket permissions - You must have the s3express:CreateSession
|
||||
// permission in the Action element of a policy. By default, the session is in
|
||||
// the ReadWrite mode. If you want to restrict the access, you can explicitly set
|
||||
// the s3express:SessionMode condition key to ReadOnly on the bucket. For more
|
||||
// information about example bucket policies, see Example bucket policies for S3
|
||||
// Express One Zone (https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-express-security-iam-example-bucket-policies.html)
|
||||
// and Amazon Web Services Identity and Access Management (IAM) identity-based
|
||||
// policies for S3 Express One Zone (https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-express-security-iam-identity-policies.html)
|
||||
// in the Amazon S3 User Guide.
|
||||
//
|
||||
// HTTP Host header syntax Directory buckets - The HTTP Host header syntax is
|
||||
// Bucket_name.s3express-az_id.region.amazonaws.com .
|
||||
func (c *Client) HeadBucket(ctx context.Context, params *HeadBucketInput, optFns ...func(*Options)) (*HeadBucketOutput, error) {
|
||||
if params == nil {
|
||||
params = &HeadBucketInput{}
|
||||
@@ -58,19 +72,31 @@ func (c *Client) HeadBucket(ctx context.Context, params *HeadBucketInput, optFns
|
||||
|
||||
type HeadBucketInput struct {
|
||||
|
||||
// The bucket name. When using this action with an access point, 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. When you use this action 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)
|
||||
// . 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. 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 API
|
||||
// operation with an Object Lambda access point, provide the alias of the Object
|
||||
// Lambda access point in place of the bucket name. If the Object Lambda access
|
||||
// point alias in a request is not valid, the error code
|
||||
// InvalidAccessPointAliasError is returned. For more information about
|
||||
// InvalidAccessPointAliasError , see List of Error Codes (https://docs.aws.amazon.com/AmazonS3/latest/API/ErrorResponses.html#ErrorCodeList)
|
||||
// . Access points and Object Lambda access points are not supported by directory
|
||||
// buckets. S3 on Outposts - When you use this action with Amazon S3 on Outposts,
|
||||
// you must direct requests to the S3 on Outposts hostname. The S3 on Outposts
|
||||
// hostname takes the form
|
||||
// AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com . When you
|
||||
// use this action with S3 on Outposts through the Amazon Web Services SDKs, you
|
||||
// provide the Outposts access point ARN in place of the bucket name. For more
|
||||
@@ -80,9 +106,9 @@ type HeadBucketInput struct {
|
||||
// This member is required.
|
||||
Bucket *string
|
||||
|
||||
// The account ID of the expected bucket owner. If the bucket is owned by a
|
||||
// different account, the request fails with the HTTP status code 403 Forbidden
|
||||
// (access denied).
|
||||
// The account ID of the expected bucket owner. If the account ID that you provide
|
||||
// does not match the actual owner of the bucket, the request fails with the HTTP
|
||||
// status code 403 Forbidden (access denied).
|
||||
ExpectedBucketOwner *string
|
||||
|
||||
noSmithyDocumentSerde
|
||||
@@ -94,6 +120,25 @@ func (in *HeadBucketInput) bindEndpointParams(p *EndpointParameters) {
|
||||
}
|
||||
|
||||
type HeadBucketOutput struct {
|
||||
|
||||
// Indicates whether the bucket name used in the request is an access point alias.
|
||||
// This functionality is not supported for directory buckets.
|
||||
AccessPointAlias *bool
|
||||
|
||||
// The name of the location where the bucket will be created. For directory
|
||||
// buckets, the AZ ID of the Availability Zone where the bucket is created. An
|
||||
// example AZ ID value is usw2-az2 . This functionality is only supported by
|
||||
// directory buckets.
|
||||
BucketLocationName *string
|
||||
|
||||
// The type of location where the bucket is created. This functionality is only
|
||||
// supported by directory buckets.
|
||||
BucketLocationType types.LocationType
|
||||
|
||||
// The Region that the bucket is located. This functionality is not supported for
|
||||
// directory buckets.
|
||||
BucketRegion *string
|
||||
|
||||
// Metadata pertaining to the operation's result.
|
||||
ResultMetadata middleware.Metadata
|
||||
|
||||
@@ -155,6 +200,9 @@ func (c *Client) addOperationHeadBucketMiddlewares(stack *middleware.Stack, opti
|
||||
if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addPutBucketContextMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addOpHeadBucketValidationMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
+195
-112
@@ -17,66 +17,87 @@ import (
|
||||
"time"
|
||||
)
|
||||
|
||||
// The HEAD action retrieves metadata from an object without returning the object
|
||||
// itself. This action is useful if you're only interested in an object's metadata.
|
||||
// To use HEAD , you must have READ access to the object. A HEAD request has the
|
||||
// same options as a GET action on an object. The response is identical to the GET
|
||||
// response except that there is no response body. Because of this, if the HEAD
|
||||
// request generates an error, it returns a generic code, such as 400 Bad Request ,
|
||||
// 403 Forbidden , 404 Not Found , 405 Method Not Allowed , 412 Precondition Failed
|
||||
// , or 304 Not Modified . It's not possible to retrieve the exact exception of
|
||||
// these error codes. 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:
|
||||
// The HEAD operation retrieves metadata from an object without returning the
|
||||
// object itself. This operation is useful if you're interested only in an object's
|
||||
// metadata. A HEAD request has the same options as a GET operation on an object.
|
||||
// The response is identical to the GET response except that there is no response
|
||||
// body. Because of this, if the HEAD request generates an error, it returns a
|
||||
// generic code, such as 400 Bad Request , 403 Forbidden , 404 Not Found , 405
|
||||
// Method Not Allowed , 412 Precondition Failed , or 304 Not Modified . It's not
|
||||
// possible to retrieve the exact exception of these error codes. Request headers
|
||||
// are limited to 8 KB in size. For more information, see Common Request Headers (https://docs.aws.amazon.com/AmazonS3/latest/API/RESTCommonRequestHeaders.html)
|
||||
// . Directory buckets - For directory buckets, you must make requests for this API
|
||||
// operation to the Zonal endpoint. These endpoints support virtual-hosted-style
|
||||
// requests in the format
|
||||
// https://bucket_name.s3express-az_id.region.amazonaws.com/key-name . Path-style
|
||||
// requests are not supported. For more information, see Regional and Zonal
|
||||
// endpoints (https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-express-Regions-and-Zones.html)
|
||||
// in the Amazon S3 User Guide. Permissions
|
||||
// - General purpose bucket permissions - To use HEAD , you must have the
|
||||
// s3:GetObject permission. You need the relevant read object (or version)
|
||||
// permission for this operation. For more information, see Actions, resources,
|
||||
// and condition keys for Amazon S3 (https://docs.aws.amazon.com/AmazonS3/latest/dev/list_amazons3.html)
|
||||
// in the Amazon S3 User Guide. If the object you request doesn't exist, the error
|
||||
// that Amazon S3 returns depends on whether you also have the s3:ListBucket
|
||||
// permission.
|
||||
// - If you have the s3:ListBucket permission on the bucket, Amazon S3 returns an
|
||||
// HTTP status code 404 Not Found error.
|
||||
// - If you don’t have the s3:ListBucket permission, Amazon S3 returns an HTTP
|
||||
// status code 403 Forbidden error.
|
||||
// - Directory bucket permissions - To grant access to this API operation on a
|
||||
// directory bucket, we recommend that you use the CreateSession (https://docs.aws.amazon.com/AmazonS3/latest/API/API_CreateSession.html)
|
||||
// API operation for session-based authorization. Specifically, you grant the
|
||||
// s3express:CreateSession permission to the directory bucket in a bucket policy
|
||||
// or an IAM identity-based policy. Then, you make the CreateSession API call on
|
||||
// the bucket to obtain a session token. With the session token in your request
|
||||
// header, you can make API requests to this operation. After the session token
|
||||
// expires, you make another CreateSession API call to generate a new session
|
||||
// token for use. Amazon Web Services CLI or SDKs create session and refresh the
|
||||
// session token automatically to avoid service interruptions when a session
|
||||
// expires. For more information about authorization, see CreateSession (https://docs.aws.amazon.com/AmazonS3/latest/API/API_CreateSession.html)
|
||||
// .
|
||||
//
|
||||
// Encryption Encryption request headers, like x-amz-server-side-encryption ,
|
||||
// should not be sent for HEAD requests if your object uses server-side encryption
|
||||
// with Key Management Service (KMS) keys (SSE-KMS), dual-layer server-side
|
||||
// encryption with Amazon Web Services KMS keys (DSSE-KMS), or server-side
|
||||
// encryption with Amazon S3 managed encryption keys (SSE-S3). The
|
||||
// x-amz-server-side-encryption header is used when you PUT an object to S3 and
|
||||
// want to specify the encryption method. If you include this header in a HEAD
|
||||
// request for an object that uses these types of keys, you’ll get an HTTP 400 Bad
|
||||
// Request error. It's because the encryption method can't be changed when you
|
||||
// retrieve the object. If you encrypt an object by using server-side encryption
|
||||
// with customer-provided encryption keys (SSE-C) when you store the object in
|
||||
// Amazon S3, then when you retrieve the metadata from the object, you must use the
|
||||
// following headers to provide the encryption key for the server to be able to
|
||||
// retrieve the object's metadata. The headers are:
|
||||
// - x-amz-server-side-encryption-customer-algorithm
|
||||
// - x-amz-server-side-encryption-customer-key
|
||||
// - x-amz-server-side-encryption-customer-key-MD5
|
||||
//
|
||||
// For more information about SSE-C, see Server-Side Encryption (Using
|
||||
// Customer-Provided Encryption Keys) (https://docs.aws.amazon.com/AmazonS3/latest/dev/ServerSideEncryptionCustomerKeys.html)
|
||||
// .
|
||||
// - Encryption request headers, like x-amz-server-side-encryption , should not
|
||||
// be sent for GET requests if your object uses server-side encryption with Key
|
||||
// Management Service (KMS) keys (SSE-KMS), dual-layer server-side encryption with
|
||||
// Amazon Web Services KMS keys (DSSE-KMS), or server-side encryption with Amazon
|
||||
// S3 managed encryption keys (SSE-S3). If your object does use these types of
|
||||
// keys, you’ll get an HTTP 400 Bad Request error.
|
||||
// - The last modified property in this case is the creation date of the object.
|
||||
// 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
|
||||
//
|
||||
// Request headers are limited to 8 KB in size. For more information, see Common
|
||||
// Request Headers (https://docs.aws.amazon.com/AmazonS3/latest/API/RESTCommonRequestHeaders.html)
|
||||
// . Consider the following when using request headers:
|
||||
// - Consideration 1 – If both of the If-Match and If-Unmodified-Since headers
|
||||
// are present in the request as follows:
|
||||
// - If-Match condition evaluates to true , and;
|
||||
// - If-Unmodified-Since condition evaluates to false ; Then Amazon S3 returns
|
||||
// 200 OK and the data requested.
|
||||
// - Consideration 2 – If both of the If-None-Match and If-Modified-Since headers
|
||||
// are present in the request as follows:
|
||||
// - If-None-Match condition evaluates to false , and;
|
||||
// - If-Modified-Since condition evaluates to true ; Then Amazon S3 returns the
|
||||
// 304 Not Modified response code.
|
||||
//
|
||||
// For more information about conditional requests, see RFC 7232 (https://tools.ietf.org/html/rfc7232)
|
||||
// . Permissions You need the relevant read object (or version) permission for this
|
||||
// operation. For more information, see Actions, resources, and condition keys for
|
||||
// Amazon S3 (https://docs.aws.amazon.com/AmazonS3/latest/dev/list_amazons3.html) .
|
||||
// If the object you request doesn't exist, the error that Amazon S3 returns
|
||||
// depends on whether you also have the s3:ListBucket permission.
|
||||
// - If you have the s3:ListBucket permission on the bucket, Amazon S3 returns an
|
||||
// HTTP status code 404 error.
|
||||
// - If you don’t have the s3:ListBucket permission, Amazon S3 returns an HTTP
|
||||
// status code 403 error.
|
||||
//
|
||||
// Versioning
|
||||
// - If the current version of the object is a delete marker, Amazon S3 behaves
|
||||
// as if the object was deleted and includes x-amz-delete-marker: true in the
|
||||
// response.
|
||||
// - If the specified version is a delete marker, the response returns a 405
|
||||
// (Method Not Allowed) error and the Last-Modified: timestamp response header.
|
||||
//
|
||||
// The following actions are related to HeadObject :
|
||||
// - If the specified version is a delete marker, the response returns a 405
|
||||
// Method Not Allowed error and the Last-Modified: timestamp response header.
|
||||
//
|
||||
// - Directory buckets - Delete marker is not supported by directory buckets.
|
||||
//
|
||||
// - Directory buckets - S3 Versioning isn't enabled and supported for directory
|
||||
// buckets. For this API operation, only the null value of the version ID is
|
||||
// supported by directory buckets. You can only specify null to the versionId
|
||||
// query parameter in the request.
|
||||
//
|
||||
// HTTP Host header syntax Directory buckets - The HTTP Host header syntax is
|
||||
// Bucket_name.s3express-az_id.region.amazonaws.com . The following actions are
|
||||
// related to HeadObject :
|
||||
// - GetObject (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetObject.html)
|
||||
// - GetObjectAttributes (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetObjectAttributes.html)
|
||||
func (c *Client) HeadObject(ctx context.Context, params *HeadObjectInput, optFns ...func(*Options)) (*HeadObjectOutput, error) {
|
||||
@@ -96,16 +117,26 @@ func (c *Client) HeadObject(ctx context.Context, params *HeadObjectInput, optFns
|
||||
|
||||
type HeadObjectInput struct {
|
||||
|
||||
// The name of the bucket containing the object. When using this action with an
|
||||
// access point, 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. 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-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
|
||||
// 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
|
||||
@@ -126,25 +157,46 @@ type HeadObjectInput struct {
|
||||
// the kms:Decrypt action for the request to succeed.
|
||||
ChecksumMode types.ChecksumMode
|
||||
|
||||
// The account ID of the expected bucket owner. If the bucket is owned by a
|
||||
// different account, the request fails with the HTTP status code 403 Forbidden
|
||||
// (access denied).
|
||||
// The account ID of the expected bucket owner. If the account ID that you provide
|
||||
// does not match the actual owner of the bucket, the request fails with the HTTP
|
||||
// status code 403 Forbidden (access denied).
|
||||
ExpectedBucketOwner *string
|
||||
|
||||
// Return the object only if its entity tag (ETag) is the same as the one
|
||||
// specified; otherwise, return a 412 (precondition failed) error.
|
||||
// specified; otherwise, return a 412 (precondition failed) error. If both of the
|
||||
// If-Match and If-Unmodified-Since headers are present in the request as follows:
|
||||
// - If-Match condition evaluates to true , and;
|
||||
// - If-Unmodified-Since condition evaluates to false ;
|
||||
// Then Amazon S3 returns 200 OK and the data requested. For more information
|
||||
// about conditional requests, see RFC 7232 (https://tools.ietf.org/html/rfc7232) .
|
||||
IfMatch *string
|
||||
|
||||
// Return the object only if it has been modified since the specified time;
|
||||
// otherwise, return a 304 (not modified) error.
|
||||
// otherwise, return a 304 (not modified) error. If both of the If-None-Match and
|
||||
// If-Modified-Since headers are present in the request as follows:
|
||||
// - If-None-Match condition evaluates to false , and;
|
||||
// - If-Modified-Since condition evaluates to true ;
|
||||
// Then Amazon S3 returns the 304 Not Modified response code. For more information
|
||||
// about conditional requests, see RFC 7232 (https://tools.ietf.org/html/rfc7232) .
|
||||
IfModifiedSince *time.Time
|
||||
|
||||
// Return the object only if its entity tag (ETag) is different from the one
|
||||
// specified; otherwise, return a 304 (not modified) error.
|
||||
// specified; otherwise, return a 304 (not modified) error. If both of the
|
||||
// If-None-Match and If-Modified-Since headers are present in the request as
|
||||
// follows:
|
||||
// - If-None-Match condition evaluates to false , and;
|
||||
// - If-Modified-Since condition evaluates to true ;
|
||||
// Then Amazon S3 returns the 304 Not Modified response code. For more information
|
||||
// about conditional requests, see RFC 7232 (https://tools.ietf.org/html/rfc7232) .
|
||||
IfNoneMatch *string
|
||||
|
||||
// Return the object only if it has not been modified since the specified time;
|
||||
// otherwise, return a 412 (precondition failed) error.
|
||||
// otherwise, return a 412 (precondition failed) error. If both of the If-Match
|
||||
// and If-Unmodified-Since headers are present in the request as follows:
|
||||
// - If-Match condition evaluates to true , and;
|
||||
// - If-Unmodified-Since condition evaluates to false ;
|
||||
// Then Amazon S3 returns 200 OK and the data requested. For more information
|
||||
// about conditional requests, see RFC 7232 (https://tools.ietf.org/html/rfc7232) .
|
||||
IfUnmodifiedSince *time.Time
|
||||
|
||||
// Part number of the object being read. This is a positive integer between 1 and
|
||||
@@ -160,30 +212,35 @@ type HeadObjectInput struct {
|
||||
|
||||
// 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 Amazon S3 bucket has Requester Pays enabled, the requester
|
||||
// will pay for corresponding charges to copy the object. For information about
|
||||
// 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.
|
||||
// in the Amazon S3 User Guide. This functionality is not supported for directory
|
||||
// buckets.
|
||||
RequestPayer types.RequestPayer
|
||||
|
||||
// Specifies the algorithm to use to when encrypting the object (for example,
|
||||
// AES256).
|
||||
// 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.
|
||||
// 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.
|
||||
// encryption key was transmitted without error. This functionality is not
|
||||
// supported for directory buckets.
|
||||
SSECustomerKeyMD5 *string
|
||||
|
||||
// VersionId used to reference a specific version of the object.
|
||||
// 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
|
||||
@@ -200,48 +257,58 @@ type HeadObjectOutput struct {
|
||||
// Indicates that a range of bytes was specified.
|
||||
AcceptRanges *string
|
||||
|
||||
// The archive state of the head object.
|
||||
// The archive state of the head object. This functionality is not supported for
|
||||
// directory buckets.
|
||||
ArchiveStatus types.ArchiveStatus
|
||||
|
||||
// Indicates whether the object uses an S3 Bucket Key for server-side encryption
|
||||
// with Key Management Service (KMS) keys (SSE-KMS).
|
||||
// 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. With multipart uploads, this may not
|
||||
// be a checksum value of the object. 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)
|
||||
// present if it was uploaded with the object. When you use an API operation on an
|
||||
// object that was uploaded using multipart uploads, this value may not be a direct
|
||||
// checksum value of the full object. Instead, it's a calculation based on the
|
||||
// checksum values of each individual part. For more information about how
|
||||
// checksums are calculated with multipart uploads, see Checking object integrity (https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html#large-object-checksums)
|
||||
// in the Amazon S3 User Guide.
|
||||
ChecksumCRC32 *string
|
||||
|
||||
// The base64-encoded, 32-bit CRC32C checksum of the object. This will only be
|
||||
// present if it was uploaded with the object. With multipart uploads, this may not
|
||||
// be a checksum value of the object. 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)
|
||||
// present if it was uploaded with the object. When you use an API operation on an
|
||||
// object that was uploaded using multipart uploads, this value may not be a direct
|
||||
// checksum value of the full object. Instead, it's a calculation based on the
|
||||
// checksum values of each individual part. For more information about how
|
||||
// checksums are calculated with multipart uploads, see Checking object integrity (https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html#large-object-checksums)
|
||||
// in the Amazon S3 User Guide.
|
||||
ChecksumCRC32C *string
|
||||
|
||||
// The base64-encoded, 160-bit SHA-1 digest of the object. This will only be
|
||||
// present if it was uploaded with the object. With multipart uploads, this may not
|
||||
// be a checksum value of the object. 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)
|
||||
// present if it was uploaded with the object. When you use the API operation on an
|
||||
// object that was uploaded using multipart uploads, this value may not be a direct
|
||||
// checksum value of the full object. Instead, it's a calculation based on the
|
||||
// checksum values of each individual part. For more information about how
|
||||
// checksums are calculated with multipart uploads, see Checking object integrity (https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html#large-object-checksums)
|
||||
// in the Amazon S3 User Guide.
|
||||
ChecksumSHA1 *string
|
||||
|
||||
// The base64-encoded, 256-bit SHA-256 digest of the object. This will only be
|
||||
// present if it was uploaded with the object. With multipart uploads, this may not
|
||||
// be a checksum value of the object. 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)
|
||||
// present if it was uploaded with the object. When you use an API operation on an
|
||||
// object that was uploaded using multipart uploads, this value may not be a direct
|
||||
// checksum value of the full object. Instead, it's a calculation based on the
|
||||
// checksum values of each individual part. For more information about how
|
||||
// checksums are calculated with multipart uploads, see Checking object integrity (https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html#large-object-checksums)
|
||||
// in the Amazon S3 User Guide.
|
||||
ChecksumSHA256 *string
|
||||
|
||||
// Specifies presentational information for the object.
|
||||
ContentDisposition *string
|
||||
|
||||
// Specifies what content encodings have been applied to the object and thus what
|
||||
// Indicates what content encodings have been applied to the object and thus what
|
||||
// decoding mechanisms must be applied to obtain the media-type referenced by the
|
||||
// Content-Type header field.
|
||||
ContentEncoding *string
|
||||
@@ -256,17 +323,19 @@ type HeadObjectOutput struct {
|
||||
ContentType *string
|
||||
|
||||
// Specifies whether the object retrieved was (true) or was not (false) a Delete
|
||||
// Marker. If false, this response header does not appear in the response.
|
||||
// Marker. If false, this response header does not appear in the response. This
|
||||
// functionality is not supported for directory buckets.
|
||||
DeleteMarker *bool
|
||||
|
||||
// An entity tag (ETag) is an opaque identifier assigned by a web server to a
|
||||
// specific version of a resource found at a URL.
|
||||
ETag *string
|
||||
|
||||
// If the object expiration is configured (see PUT Bucket lifecycle), the response
|
||||
// includes this header. It includes the expiry-date and rule-id key-value pairs
|
||||
// providing object expiration information. The value of the rule-id is
|
||||
// URL-encoded.
|
||||
// If the object expiration is configured (see PutBucketLifecycleConfiguration (https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketLifecycleConfiguration.html)
|
||||
// ), the response includes this header. It includes the expiry-date and rule-id
|
||||
// key-value pairs providing object expiration information. The value of the
|
||||
// rule-id is URL-encoded. This functionality is not supported for directory
|
||||
// buckets.
|
||||
Expiration *string
|
||||
|
||||
// The date and time at which the object is no longer cacheable.
|
||||
@@ -283,24 +352,26 @@ type HeadObjectOutput struct {
|
||||
// This is set to the number of metadata entries not returned in x-amz-meta
|
||||
// headers. This can happen if you create metadata using an API like SOAP that
|
||||
// supports more flexible metadata than the REST API. For example, using SOAP, you
|
||||
// can create metadata whose values are not legal HTTP headers.
|
||||
// can create metadata whose values are not legal HTTP headers. This functionality
|
||||
// is not supported for directory buckets.
|
||||
MissingMeta *int32
|
||||
|
||||
// Specifies whether a legal hold is in effect for this object. This header is
|
||||
// only returned if the requester has the s3:GetObjectLegalHold permission. This
|
||||
// header is not returned if the specified version of this object has never had a
|
||||
// legal hold applied. For more information about S3 Object Lock, see Object Lock (https://docs.aws.amazon.com/AmazonS3/latest/dev/object-lock.html)
|
||||
// .
|
||||
// . This functionality is not supported for directory buckets.
|
||||
ObjectLockLegalHoldStatus types.ObjectLockLegalHoldStatus
|
||||
|
||||
// The Object Lock mode, if any, that's in effect for this object. This header is
|
||||
// only returned if the requester has the s3:GetObjectRetention permission. For
|
||||
// more information about S3 Object Lock, see Object Lock (https://docs.aws.amazon.com/AmazonS3/latest/dev/object-lock.html)
|
||||
// .
|
||||
// . This functionality is not supported for directory buckets.
|
||||
ObjectLockMode types.ObjectLockMode
|
||||
|
||||
// The date and time when the Object Lock retention period expires. This header is
|
||||
// only returned if the requester has the s3:GetObjectRetention permission.
|
||||
// only returned if the requester has the s3:GetObjectRetention permission. 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
|
||||
@@ -333,11 +404,11 @@ type HeadObjectOutput struct {
|
||||
// completed for all destinations. If one or more destinations fails replication
|
||||
// the header will return FAILED.
|
||||
// For more information, see Replication (https://docs.aws.amazon.com/AmazonS3/latest/dev/NotificationHowTo.html)
|
||||
// .
|
||||
// . This functionality is not supported for directory buckets.
|
||||
ReplicationStatus types.ReplicationStatus
|
||||
|
||||
// If present, indicates that the requester was successfully charged for the
|
||||
// request.
|
||||
// request. This functionality is not supported for directory buckets.
|
||||
RequestCharged types.RequestCharged
|
||||
|
||||
// If the object is an archived object (an object whose storage class is GLACIER),
|
||||
@@ -349,39 +420,48 @@ type HeadObjectOutput struct {
|
||||
// Dec 2012 00:00:00 GMT" If the object restoration is in progress, the header
|
||||
// returns the value ongoing-request="true" . For more information about archiving
|
||||
// objects, see Transitioning Objects: General Considerations (https://docs.aws.amazon.com/AmazonS3/latest/dev/object-lifecycle-mgmt.html#lifecycle-transition-general-considerations)
|
||||
// .
|
||||
// . This functionality is not supported for directory buckets. Only the S3 Express
|
||||
// One Zone storage class is supported by directory buckets to store objects.
|
||||
Restore *string
|
||||
|
||||
// If server-side encryption with a customer-provided encryption key was
|
||||
// requested, the response will include this header confirming the encryption
|
||||
// algorithm used.
|
||||
// requested, the response will include this header to confirm the encryption
|
||||
// algorithm that's used. This functionality is not supported for directory
|
||||
// buckets.
|
||||
SSECustomerAlgorithm *string
|
||||
|
||||
// If server-side encryption with a customer-provided encryption key was
|
||||
// requested, the response will include this header to provide round-trip message
|
||||
// integrity verification of the customer-provided encryption key.
|
||||
// requested, the response will include this header to provide the round-trip
|
||||
// message integrity verification of the customer-provided encryption key. This
|
||||
// functionality is not supported for directory buckets.
|
||||
SSECustomerKeyMD5 *string
|
||||
|
||||
// If present, specifies the ID of the Key Management Service (KMS) symmetric
|
||||
// encryption customer managed key that was used for the object.
|
||||
// If present, indicates the ID of the Key Management Service (KMS) symmetric
|
||||
// encryption customer managed key that was used for the object. This functionality
|
||||
// is not supported for directory buckets.
|
||||
SSEKMSKeyId *string
|
||||
|
||||
// The server-side encryption algorithm used when storing this object in Amazon S3
|
||||
// (for example, AES256 , aws:kms , aws:kms:dsse ).
|
||||
// The server-side encryption algorithm used when you store this object in Amazon
|
||||
// S3 (for example, AES256 , aws:kms , aws:kms:dsse ). For directory buckets, only
|
||||
// server-side encryption with Amazon S3 managed keys (SSE-S3) ( AES256 ) is
|
||||
// supported.
|
||||
ServerSideEncryption types.ServerSideEncryption
|
||||
|
||||
// Provides storage class information of the object. Amazon S3 returns this header
|
||||
// for all objects except for S3 Standard storage class objects. For more
|
||||
// information, see Storage Classes (https://docs.aws.amazon.com/AmazonS3/latest/dev/storage-class-intro.html)
|
||||
// .
|
||||
// . Directory buckets - Only the S3 Express One Zone storage class is supported by
|
||||
// directory buckets to store objects.
|
||||
StorageClass types.StorageClass
|
||||
|
||||
// Version of the object.
|
||||
// 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.
|
||||
// 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.
|
||||
@@ -445,6 +525,9 @@ func (c *Client) addOperationHeadObjectMiddlewares(stack *middleware.Stack, opti
|
||||
if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addPutBucketContextMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addOpHeadObjectValidationMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
Generated
Vendored
+18
-13
@@ -10,18 +10,20 @@ import (
|
||||
s3cust "github.com/aws/aws-sdk-go-v2/service/s3/internal/customizations"
|
||||
"github.com/aws/aws-sdk-go-v2/service/s3/types"
|
||||
"github.com/aws/smithy-go/middleware"
|
||||
"github.com/aws/smithy-go/ptr"
|
||||
smithyhttp "github.com/aws/smithy-go/transport/http"
|
||||
)
|
||||
|
||||
// Lists the analytics configurations for the bucket. You can have up to 1,000
|
||||
// analytics configurations per bucket. This action supports list pagination and
|
||||
// does not return more than 100 configurations at a time. You should always check
|
||||
// the IsTruncated element in the response. If there are no more configurations to
|
||||
// list, IsTruncated is set to false. If there are more configurations to list,
|
||||
// IsTruncated is set to true, and there will be a value in NextContinuationToken .
|
||||
// You use the NextContinuationToken value to continue the pagination of the list
|
||||
// by passing the value in continuation-token in the request to GET the next page.
|
||||
// To use this operation, you must have permissions to perform the
|
||||
// This operation is not supported by directory buckets. Lists the analytics
|
||||
// configurations for the bucket. You can have up to 1,000 analytics configurations
|
||||
// per bucket. This action supports list pagination and does not return more than
|
||||
// 100 configurations at a time. You should always check the IsTruncated element
|
||||
// in the response. If there are no more configurations to list, IsTruncated is
|
||||
// set to false. If there are more configurations to list, IsTruncated is set to
|
||||
// true, and there will be a value in NextContinuationToken . You use the
|
||||
// NextContinuationToken value to continue the pagination of the list by passing
|
||||
// the value in continuation-token in the request to GET the next page. To use
|
||||
// this operation, you must have permissions to perform the
|
||||
// s3:GetAnalyticsConfiguration action. The bucket owner has this permission by
|
||||
// default. The bucket owner can grant this permission to others. For more
|
||||
// information about permissions, see Permissions Related to Bucket Subresource
|
||||
@@ -59,9 +61,9 @@ type ListBucketAnalyticsConfigurationsInput struct {
|
||||
// should begin.
|
||||
ContinuationToken *string
|
||||
|
||||
// The account ID of the expected bucket owner. If the bucket is owned by a
|
||||
// different account, the request fails with the HTTP status code 403 Forbidden
|
||||
// (access denied).
|
||||
// The account ID of the expected bucket owner. If the account ID that you provide
|
||||
// does not match the actual owner of the bucket, the request fails with the HTTP
|
||||
// status code 403 Forbidden (access denied).
|
||||
ExpectedBucketOwner *string
|
||||
|
||||
noSmithyDocumentSerde
|
||||
@@ -69,7 +71,7 @@ type ListBucketAnalyticsConfigurationsInput struct {
|
||||
|
||||
func (in *ListBucketAnalyticsConfigurationsInput) bindEndpointParams(p *EndpointParameters) {
|
||||
p.Bucket = in.Bucket
|
||||
|
||||
p.UseS3ExpressControlEndpoint = ptr.Bool(true)
|
||||
}
|
||||
|
||||
type ListBucketAnalyticsConfigurationsOutput struct {
|
||||
@@ -152,6 +154,9 @@ func (c *Client) addOperationListBucketAnalyticsConfigurationsMiddlewares(stack
|
||||
if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addPutBucketContextMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addOpListBucketAnalyticsConfigurationsValidationMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
Generated
Vendored
+8
-3
@@ -10,11 +10,13 @@ import (
|
||||
s3cust "github.com/aws/aws-sdk-go-v2/service/s3/internal/customizations"
|
||||
"github.com/aws/aws-sdk-go-v2/service/s3/types"
|
||||
"github.com/aws/smithy-go/middleware"
|
||||
"github.com/aws/smithy-go/ptr"
|
||||
smithyhttp "github.com/aws/smithy-go/transport/http"
|
||||
)
|
||||
|
||||
// Lists the S3 Intelligent-Tiering configuration from the specified bucket. The
|
||||
// S3 Intelligent-Tiering storage class is designed to optimize storage costs by
|
||||
// This operation is not supported by directory buckets. Lists the S3
|
||||
// Intelligent-Tiering configuration from the specified bucket. The S3
|
||||
// Intelligent-Tiering storage class is designed to optimize storage costs by
|
||||
// automatically moving data to the most cost-effective storage access tier,
|
||||
// without performance impact or operational overhead. S3 Intelligent-Tiering
|
||||
// delivers automatic cost savings in three low latency and high throughput access
|
||||
@@ -63,7 +65,7 @@ type ListBucketIntelligentTieringConfigurationsInput struct {
|
||||
|
||||
func (in *ListBucketIntelligentTieringConfigurationsInput) bindEndpointParams(p *EndpointParameters) {
|
||||
p.Bucket = in.Bucket
|
||||
|
||||
p.UseS3ExpressControlEndpoint = ptr.Bool(true)
|
||||
}
|
||||
|
||||
type ListBucketIntelligentTieringConfigurationsOutput struct {
|
||||
@@ -146,6 +148,9 @@ func (c *Client) addOperationListBucketIntelligentTieringConfigurationsMiddlewar
|
||||
if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addPutBucketContextMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addOpListBucketIntelligentTieringConfigurationsValidationMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
Generated
Vendored
+14
-9
@@ -10,14 +10,16 @@ import (
|
||||
s3cust "github.com/aws/aws-sdk-go-v2/service/s3/internal/customizations"
|
||||
"github.com/aws/aws-sdk-go-v2/service/s3/types"
|
||||
"github.com/aws/smithy-go/middleware"
|
||||
"github.com/aws/smithy-go/ptr"
|
||||
smithyhttp "github.com/aws/smithy-go/transport/http"
|
||||
)
|
||||
|
||||
// Returns a list of inventory configurations for the bucket. You can have up to
|
||||
// 1,000 analytics configurations per bucket. This action supports list pagination
|
||||
// and does not return more than 100 configurations at a time. Always check the
|
||||
// IsTruncated element in the response. If there are no more configurations to
|
||||
// list, IsTruncated is set to false. If there are more configurations to list,
|
||||
// This operation is not supported by directory buckets. Returns a list of
|
||||
// inventory configurations for the bucket. You can have up to 1,000 analytics
|
||||
// configurations per bucket. This action supports list pagination and does not
|
||||
// return more than 100 configurations at a time. Always check the IsTruncated
|
||||
// element in the response. If there are no more configurations to list,
|
||||
// IsTruncated is set to false. If there are more configurations to list,
|
||||
// IsTruncated is set to true, and there is a value in NextContinuationToken . You
|
||||
// use the NextContinuationToken value to continue the pagination of the list by
|
||||
// passing the value in continuation-token in the request to GET the next page. To
|
||||
@@ -60,9 +62,9 @@ type ListBucketInventoryConfigurationsInput struct {
|
||||
// Amazon S3 understands.
|
||||
ContinuationToken *string
|
||||
|
||||
// The account ID of the expected bucket owner. If the bucket is owned by a
|
||||
// different account, the request fails with the HTTP status code 403 Forbidden
|
||||
// (access denied).
|
||||
// The account ID of the expected bucket owner. If the account ID that you provide
|
||||
// does not match the actual owner of the bucket, the request fails with the HTTP
|
||||
// status code 403 Forbidden (access denied).
|
||||
ExpectedBucketOwner *string
|
||||
|
||||
noSmithyDocumentSerde
|
||||
@@ -70,7 +72,7 @@ type ListBucketInventoryConfigurationsInput struct {
|
||||
|
||||
func (in *ListBucketInventoryConfigurationsInput) bindEndpointParams(p *EndpointParameters) {
|
||||
p.Bucket = in.Bucket
|
||||
|
||||
p.UseS3ExpressControlEndpoint = ptr.Bool(true)
|
||||
}
|
||||
|
||||
type ListBucketInventoryConfigurationsOutput struct {
|
||||
@@ -153,6 +155,9 @@ func (c *Client) addOperationListBucketInventoryConfigurationsMiddlewares(stack
|
||||
if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addPutBucketContextMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addOpListBucketInventoryConfigurationsValidationMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
Generated
Vendored
+13
-9
@@ -13,12 +13,13 @@ import (
|
||||
smithyhttp "github.com/aws/smithy-go/transport/http"
|
||||
)
|
||||
|
||||
// Lists the metrics configurations for the bucket. The metrics configurations are
|
||||
// only for the request metrics of the bucket and do not provide information on
|
||||
// daily storage metrics. You can have up to 1,000 configurations per bucket. This
|
||||
// action supports list pagination and does not return more than 100 configurations
|
||||
// at a time. Always check the IsTruncated element in the response. If there are
|
||||
// no more configurations to list, IsTruncated is set to false. If there are more
|
||||
// This operation is not supported by directory buckets. Lists the metrics
|
||||
// configurations for the bucket. The metrics configurations are only for the
|
||||
// request metrics of the bucket and do not provide information on daily storage
|
||||
// metrics. You can have up to 1,000 configurations per bucket. This action
|
||||
// supports list pagination and does not return more than 100 configurations at a
|
||||
// time. Always check the IsTruncated element in the response. If there are no
|
||||
// more configurations to list, IsTruncated is set to false. If there are more
|
||||
// configurations to list, IsTruncated is set to true, and there is a value in
|
||||
// NextContinuationToken . You use the NextContinuationToken value to continue the
|
||||
// pagination of the list by passing the value in continuation-token in the
|
||||
@@ -62,9 +63,9 @@ type ListBucketMetricsConfigurationsInput struct {
|
||||
// Amazon S3 understands.
|
||||
ContinuationToken *string
|
||||
|
||||
// The account ID of the expected bucket owner. If the bucket is owned by a
|
||||
// different account, the request fails with the HTTP status code 403 Forbidden
|
||||
// (access denied).
|
||||
// The account ID of the expected bucket owner. If the account ID that you provide
|
||||
// does not match the actual owner of the bucket, the request fails with the HTTP
|
||||
// status code 403 Forbidden (access denied).
|
||||
ExpectedBucketOwner *string
|
||||
|
||||
noSmithyDocumentSerde
|
||||
@@ -156,6 +157,9 @@ func (c *Client) addOperationListBucketMetricsConfigurationsMiddlewares(stack *m
|
||||
if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addPutBucketContextMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addOpListBucketMetricsConfigurationsValidationMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
+7
-4
@@ -13,10 +13,10 @@ import (
|
||||
smithyhttp "github.com/aws/smithy-go/transport/http"
|
||||
)
|
||||
|
||||
// Returns a list of all buckets owned by the authenticated sender of the request.
|
||||
// To use this operation, you must have the s3:ListAllMyBuckets permission. For
|
||||
// information about Amazon S3 buckets, see Creating, configuring, and working
|
||||
// with Amazon S3 buckets (https://docs.aws.amazon.com/AmazonS3/latest/userguide/creating-buckets-s3.html)
|
||||
// This operation is not supported by directory buckets. Returns a list of all
|
||||
// buckets owned by the authenticated sender of the request. To use this operation,
|
||||
// you must have the s3:ListAllMyBuckets permission. For information about Amazon
|
||||
// S3 buckets, see Creating, configuring, and working with Amazon S3 buckets (https://docs.aws.amazon.com/AmazonS3/latest/userguide/creating-buckets-s3.html)
|
||||
// .
|
||||
func (c *Client) ListBuckets(ctx context.Context, params *ListBucketsInput, optFns ...func(*Options)) (*ListBucketsOutput, error) {
|
||||
if params == nil {
|
||||
@@ -106,6 +106,9 @@ func (c *Client) addOperationListBucketsMiddlewares(stack *middleware.Stack, opt
|
||||
if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addPutBucketContextMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListBuckets(options.Region), middleware.Before); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
+291
@@ -0,0 +1,291 @@
|
||||
// Code generated by smithy-go-codegen DO NOT EDIT.
|
||||
|
||||
package s3
|
||||
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
|
||||
"github.com/aws/aws-sdk-go-v2/aws/signer/v4"
|
||||
s3cust "github.com/aws/aws-sdk-go-v2/service/s3/internal/customizations"
|
||||
"github.com/aws/aws-sdk-go-v2/service/s3/types"
|
||||
"github.com/aws/smithy-go/middleware"
|
||||
"github.com/aws/smithy-go/ptr"
|
||||
smithyhttp "github.com/aws/smithy-go/transport/http"
|
||||
)
|
||||
|
||||
// Returns a list of all Amazon S3 directory buckets owned by the authenticated
|
||||
// sender of the request. For more information about directory buckets, see
|
||||
// Directory buckets (https://docs.aws.amazon.com/AmazonS3/latest/userguide/directory-buckets-overview.html)
|
||||
// in the Amazon S3 User Guide. Directory buckets - For directory buckets, you must
|
||||
// make requests for this API operation to the Regional endpoint. These endpoints
|
||||
// support path-style requests in the format
|
||||
// https://s3express-control.region_code.amazonaws.com/bucket-name .
|
||||
// Virtual-hosted-style requests aren't supported. For more information, see
|
||||
// Regional and Zonal endpoints (https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-express-Regions-and-Zones.html)
|
||||
// in the Amazon S3 User Guide. Permissions You must have the
|
||||
// s3express:ListAllMyDirectoryBuckets permission in an IAM identity-based policy
|
||||
// instead of a bucket policy. Cross-account access to this API operation isn't
|
||||
// supported. This operation can only be performed by the Amazon Web Services
|
||||
// account that owns the resource. For more information about directory bucket
|
||||
// policies and permissions, see Amazon Web Services Identity and Access
|
||||
// Management (IAM) for S3 Express One Zone (https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-express-security-iam.html)
|
||||
// in the Amazon S3 User Guide. HTTP Host header syntax Directory buckets - The
|
||||
// HTTP Host header syntax is s3express-control.region.amazonaws.com .
|
||||
func (c *Client) ListDirectoryBuckets(ctx context.Context, params *ListDirectoryBucketsInput, optFns ...func(*Options)) (*ListDirectoryBucketsOutput, error) {
|
||||
if params == nil {
|
||||
params = &ListDirectoryBucketsInput{}
|
||||
}
|
||||
|
||||
result, metadata, err := c.invokeOperation(ctx, "ListDirectoryBuckets", params, optFns, c.addOperationListDirectoryBucketsMiddlewares)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
out := result.(*ListDirectoryBucketsOutput)
|
||||
out.ResultMetadata = metadata
|
||||
return out, nil
|
||||
}
|
||||
|
||||
type ListDirectoryBucketsInput struct {
|
||||
|
||||
// ContinuationToken indicates to Amazon S3 that the list is being continued on
|
||||
// this bucket with a token. ContinuationToken is obfuscated and is not a real
|
||||
// key. You can use this ContinuationToken for pagination of the list results.
|
||||
ContinuationToken *string
|
||||
|
||||
// Maximum number of buckets to be returned in response. When the number is more
|
||||
// than the count of buckets that are owned by an Amazon Web Services account,
|
||||
// return all the buckets in response.
|
||||
MaxDirectoryBuckets *int32
|
||||
|
||||
noSmithyDocumentSerde
|
||||
}
|
||||
|
||||
func (in *ListDirectoryBucketsInput) bindEndpointParams(p *EndpointParameters) {
|
||||
|
||||
p.UseS3ExpressControlEndpoint = ptr.Bool(true)
|
||||
}
|
||||
|
||||
type ListDirectoryBucketsOutput struct {
|
||||
|
||||
// The list of buckets owned by the requester.
|
||||
Buckets []types.Bucket
|
||||
|
||||
// If ContinuationToken was sent with the request, it is included in the response.
|
||||
// You can use the returned ContinuationToken for pagination of the list response.
|
||||
ContinuationToken *string
|
||||
|
||||
// Metadata pertaining to the operation's result.
|
||||
ResultMetadata middleware.Metadata
|
||||
|
||||
noSmithyDocumentSerde
|
||||
}
|
||||
|
||||
func (c *Client) addOperationListDirectoryBucketsMiddlewares(stack *middleware.Stack, options Options) (err error) {
|
||||
if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil {
|
||||
return err
|
||||
}
|
||||
err = stack.Serialize.Add(&awsRestxml_serializeOpListDirectoryBuckets{}, middleware.After)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
err = stack.Deserialize.Add(&awsRestxml_deserializeOpListDirectoryBuckets{}, middleware.After)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if err := addProtocolFinalizerMiddlewares(stack, options, "ListDirectoryBuckets"); err != nil {
|
||||
return fmt.Errorf("add protocol finalizers: %v", err)
|
||||
}
|
||||
|
||||
if err = addlegacyEndpointContextSetter(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addSetLoggerMiddleware(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addResolveEndpointMiddleware(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addRetryMiddlewares(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addClientUserAgent(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addPutBucketContextMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListDirectoryBuckets(options.Region), middleware.Before); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addMetadataRetrieverMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = awsmiddleware.AddRecursionDetection(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addListDirectoryBucketsUpdateEndpoint(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addResponseErrorMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = v4.AddContentSHA256HeaderMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = disableAcceptEncodingGzip(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addRequestResponseLogging(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addDisableHTTPSMiddleware(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addSerializeImmutableHostnameBucketMiddleware(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
// ListDirectoryBucketsAPIClient is a client that implements the
|
||||
// ListDirectoryBuckets operation.
|
||||
type ListDirectoryBucketsAPIClient interface {
|
||||
ListDirectoryBuckets(context.Context, *ListDirectoryBucketsInput, ...func(*Options)) (*ListDirectoryBucketsOutput, error)
|
||||
}
|
||||
|
||||
var _ ListDirectoryBucketsAPIClient = (*Client)(nil)
|
||||
|
||||
// ListDirectoryBucketsPaginatorOptions is the paginator options for
|
||||
// ListDirectoryBuckets
|
||||
type ListDirectoryBucketsPaginatorOptions struct {
|
||||
// Maximum number of buckets to be returned in response. When the number is more
|
||||
// than the count of buckets that are owned by an Amazon Web Services account,
|
||||
// return all the buckets in response.
|
||||
Limit int32
|
||||
|
||||
// Set to true if pagination should stop if the service returns a pagination token
|
||||
// that matches the most recent token provided to the service.
|
||||
StopOnDuplicateToken bool
|
||||
}
|
||||
|
||||
// ListDirectoryBucketsPaginator is a paginator for ListDirectoryBuckets
|
||||
type ListDirectoryBucketsPaginator struct {
|
||||
options ListDirectoryBucketsPaginatorOptions
|
||||
client ListDirectoryBucketsAPIClient
|
||||
params *ListDirectoryBucketsInput
|
||||
nextToken *string
|
||||
firstPage bool
|
||||
}
|
||||
|
||||
// NewListDirectoryBucketsPaginator returns a new ListDirectoryBucketsPaginator
|
||||
func NewListDirectoryBucketsPaginator(client ListDirectoryBucketsAPIClient, params *ListDirectoryBucketsInput, optFns ...func(*ListDirectoryBucketsPaginatorOptions)) *ListDirectoryBucketsPaginator {
|
||||
if params == nil {
|
||||
params = &ListDirectoryBucketsInput{}
|
||||
}
|
||||
|
||||
options := ListDirectoryBucketsPaginatorOptions{}
|
||||
if params.MaxDirectoryBuckets != nil {
|
||||
options.Limit = *params.MaxDirectoryBuckets
|
||||
}
|
||||
|
||||
for _, fn := range optFns {
|
||||
fn(&options)
|
||||
}
|
||||
|
||||
return &ListDirectoryBucketsPaginator{
|
||||
options: options,
|
||||
client: client,
|
||||
params: params,
|
||||
firstPage: true,
|
||||
nextToken: params.ContinuationToken,
|
||||
}
|
||||
}
|
||||
|
||||
// HasMorePages returns a boolean indicating whether more pages are available
|
||||
func (p *ListDirectoryBucketsPaginator) HasMorePages() bool {
|
||||
return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0)
|
||||
}
|
||||
|
||||
// NextPage retrieves the next ListDirectoryBuckets page.
|
||||
func (p *ListDirectoryBucketsPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*ListDirectoryBucketsOutput, error) {
|
||||
if !p.HasMorePages() {
|
||||
return nil, fmt.Errorf("no more pages available")
|
||||
}
|
||||
|
||||
params := *p.params
|
||||
params.ContinuationToken = p.nextToken
|
||||
|
||||
var limit *int32
|
||||
if p.options.Limit > 0 {
|
||||
limit = &p.options.Limit
|
||||
}
|
||||
params.MaxDirectoryBuckets = limit
|
||||
|
||||
result, err := p.client.ListDirectoryBuckets(ctx, ¶ms, optFns...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
p.firstPage = false
|
||||
|
||||
prevToken := p.nextToken
|
||||
p.nextToken = result.ContinuationToken
|
||||
|
||||
if p.options.StopOnDuplicateToken &&
|
||||
prevToken != nil &&
|
||||
p.nextToken != nil &&
|
||||
*prevToken == *p.nextToken {
|
||||
p.nextToken = nil
|
||||
}
|
||||
|
||||
return result, nil
|
||||
}
|
||||
|
||||
func newServiceMetadataMiddleware_opListDirectoryBuckets(region string) *awsmiddleware.RegisterServiceMetadata {
|
||||
return &awsmiddleware.RegisterServiceMetadata{
|
||||
Region: region,
|
||||
ServiceID: ServiceID,
|
||||
OperationName: "ListDirectoryBuckets",
|
||||
}
|
||||
}
|
||||
|
||||
func addListDirectoryBucketsUpdateEndpoint(stack *middleware.Stack, options Options) error {
|
||||
return s3cust.UpdateEndpoint(stack, s3cust.UpdateEndpointOptions{
|
||||
Accessor: s3cust.UpdateEndpointParameterAccessor{
|
||||
GetBucketFromInput: nopGetBucketAccessor,
|
||||
},
|
||||
UsePathStyle: options.UsePathStyle,
|
||||
UseAccelerate: options.UseAccelerate,
|
||||
SupportsAccelerate: true,
|
||||
TargetS3ObjectLambda: false,
|
||||
EndpointResolver: options.EndpointResolver,
|
||||
EndpointResolverOptions: options.EndpointOptions,
|
||||
UseARNRegion: options.UseARNRegion,
|
||||
DisableMultiRegionAccessPoints: options.DisableMultiRegionAccessPoints,
|
||||
})
|
||||
}
|
||||
+123
-49
@@ -13,24 +13,66 @@ import (
|
||||
smithyhttp "github.com/aws/smithy-go/transport/http"
|
||||
)
|
||||
|
||||
// This action lists in-progress multipart uploads. An in-progress multipart
|
||||
// upload is a multipart upload that has been initiated using the Initiate
|
||||
// Multipart Upload request, but has not yet been completed or aborted. This action
|
||||
// returns at most 1,000 multipart uploads in the response. 1,000 multipart uploads
|
||||
// is the maximum number of uploads a response can include, which is also the
|
||||
// default value. You can further limit the number of uploads in a response by
|
||||
// specifying the max-uploads parameter in the response. If additional multipart
|
||||
// uploads satisfy the list criteria, the response will contain an IsTruncated
|
||||
// element with the value true. To list the additional multipart uploads, use the
|
||||
// key-marker and upload-id-marker request parameters. In the response, the
|
||||
// uploads are sorted by key. If your application has initiated more than one
|
||||
// multipart upload using the same object key, then uploads in the response are
|
||||
// first sorted by key. Additionally, uploads are sorted in ascending order within
|
||||
// each key by the upload initiation time. For more information on multipart
|
||||
// uploads, see Uploading Objects Using Multipart Upload (https://docs.aws.amazon.com/AmazonS3/latest/dev/uploadobjusingmpu.html)
|
||||
// . For information on permissions required to use the multipart upload API, see
|
||||
// Multipart Upload and Permissions (https://docs.aws.amazon.com/AmazonS3/latest/dev/mpuAndPermissions.html)
|
||||
// . The following operations are related to ListMultipartUploads :
|
||||
// This operation lists in-progress multipart uploads in a bucket. An in-progress
|
||||
// multipart upload is a multipart upload that has been initiated by the
|
||||
// CreateMultipartUpload request, but has not yet been completed or aborted.
|
||||
// Directory buckets - If multipart uploads in a directory bucket are in progress,
|
||||
// you can't delete the bucket until all the in-progress multipart uploads are
|
||||
// aborted or completed. The ListMultipartUploads operation returns a maximum of
|
||||
// 1,000 multipart uploads in the response. The limit of 1,000 multipart uploads is
|
||||
// also the default value. You can further limit the number of uploads in a
|
||||
// response by specifying the max-uploads request parameter. If there are more
|
||||
// than 1,000 multipart uploads that satisfy your ListMultipartUploads request,
|
||||
// the response returns an IsTruncated element with the value of true , a
|
||||
// NextKeyMarker element, and a NextUploadIdMarker element. To list the remaining
|
||||
// multipart uploads, you need to make subsequent ListMultipartUploads requests.
|
||||
// In these requests, include two query parameters: key-marker and upload-id-marker
|
||||
// . Set the value of key-marker to the NextKeyMarker value from the previous
|
||||
// response. Similarly, set the value of upload-id-marker to the NextUploadIdMarker
|
||||
// value from the previous response. Directory buckets - The upload-id-marker
|
||||
// element and the NextUploadIdMarker element aren't supported by directory
|
||||
// buckets. To list the additional multipart uploads, you only need to set the
|
||||
// value of key-marker to the NextKeyMarker value from the previous response. For
|
||||
// more information about multipart uploads, see Uploading Objects Using Multipart
|
||||
// Upload (https://docs.aws.amazon.com/AmazonS3/latest/dev/uploadobjusingmpu.html)
|
||||
// in the Amazon S3 User Guide. Directory buckets - For directory buckets, you must
|
||||
// make requests for this API operation to the Zonal endpoint. These endpoints
|
||||
// support virtual-hosted-style requests in the format
|
||||
// https://bucket_name.s3express-az_id.region.amazonaws.com/key-name . Path-style
|
||||
// requests are not supported. For more information, see Regional and Zonal
|
||||
// endpoints (https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-express-Regions-and-Zones.html)
|
||||
// in the Amazon S3 User Guide. Permissions
|
||||
// - General purpose bucket permissions - For information about permissions
|
||||
// required to use the multipart upload API, see Multipart Upload and Permissions (https://docs.aws.amazon.com/AmazonS3/latest/dev/mpuAndPermissions.html)
|
||||
// in the Amazon S3 User Guide.
|
||||
// - Directory bucket permissions - To grant access to this API operation on a
|
||||
// directory bucket, we recommend that you use the CreateSession (https://docs.aws.amazon.com/AmazonS3/latest/API/API_CreateSession.html)
|
||||
// API operation for session-based authorization. Specifically, you grant the
|
||||
// s3express:CreateSession permission to the directory bucket in a bucket policy
|
||||
// or an IAM identity-based policy. Then, you make the CreateSession API call on
|
||||
// the bucket to obtain a session token. With the session token in your request
|
||||
// header, you can make API requests to this operation. After the session token
|
||||
// expires, you make another CreateSession API call to generate a new session
|
||||
// token for use. Amazon Web Services CLI or SDKs create session and refresh the
|
||||
// session token automatically to avoid service interruptions when a session
|
||||
// expires. For more information about authorization, see CreateSession (https://docs.aws.amazon.com/AmazonS3/latest/API/API_CreateSession.html)
|
||||
// .
|
||||
//
|
||||
// Sorting of multipart uploads in response
|
||||
// - General purpose bucket - In the ListMultipartUploads response, the multipart
|
||||
// uploads are sorted based on two criteria:
|
||||
// - Key-based sorting - Multipart uploads are initially sorted in ascending
|
||||
// order based on their object keys.
|
||||
// - Time-based sorting - For uploads that share the same object key, they are
|
||||
// further sorted in ascending order based on the upload initiation time. Among
|
||||
// uploads with the same key, the one that was initiated first will appear before
|
||||
// the ones that were initiated later.
|
||||
// - Directory bucket - In the ListMultipartUploads response, the multipart
|
||||
// uploads aren't sorted lexicographically based on the object keys.
|
||||
//
|
||||
// HTTP Host header syntax Directory buckets - The HTTP Host header syntax is
|
||||
// Bucket_name.s3express-az_id.region.amazonaws.com . The following operations are
|
||||
// related to ListMultipartUploads :
|
||||
// - CreateMultipartUpload (https://docs.aws.amazon.com/AmazonS3/latest/API/API_CreateMultipartUpload.html)
|
||||
// - UploadPart (https://docs.aws.amazon.com/AmazonS3/latest/API/API_UploadPart.html)
|
||||
// - CompleteMultipartUpload (https://docs.aws.amazon.com/AmazonS3/latest/API/API_CompleteMultipartUpload.html)
|
||||
@@ -53,16 +95,26 @@ func (c *Client) ListMultipartUploads(ctx context.Context, params *ListMultipart
|
||||
|
||||
type ListMultipartUploadsInput struct {
|
||||
|
||||
// The name of the bucket to which the multipart upload was initiated. When using
|
||||
// this action with an access point, 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. 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 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
|
||||
// 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
|
||||
@@ -77,7 +129,8 @@ type ListMultipartUploadsInput struct {
|
||||
// prefix are grouped under a single result element, CommonPrefixes . If you don't
|
||||
// specify the prefix parameter, then the substring starts at the beginning of the
|
||||
// key. The keys that are grouped under CommonPrefixes result element are not
|
||||
// returned elsewhere in the response.
|
||||
// returned elsewhere in the response. Directory buckets - For directory buckets, /
|
||||
// is the only supported delimiter.
|
||||
Delimiter *string
|
||||
|
||||
// Requests Amazon S3 to encode the object keys in the response and specifies the
|
||||
@@ -88,18 +141,26 @@ type ListMultipartUploadsInput struct {
|
||||
// response.
|
||||
EncodingType types.EncodingType
|
||||
|
||||
// The account ID of the expected bucket owner. If the bucket is owned by a
|
||||
// different account, the request fails with the HTTP status code 403 Forbidden
|
||||
// (access denied).
|
||||
// The account ID of the expected bucket owner. If the account ID that you provide
|
||||
// does not match the actual owner of the bucket, the request fails with the HTTP
|
||||
// status code 403 Forbidden (access denied).
|
||||
ExpectedBucketOwner *string
|
||||
|
||||
// Together with upload-id-marker , this parameter specifies the multipart upload
|
||||
// after which listing should begin. If upload-id-marker is not specified, only
|
||||
// the keys lexicographically greater than the specified key-marker will be
|
||||
// included in the list. If upload-id-marker is specified, any multipart uploads
|
||||
// for a key equal to the key-marker might also be included, provided those
|
||||
// multipart uploads have upload IDs lexicographically greater than the specified
|
||||
// upload-id-marker .
|
||||
// Specifies the multipart upload after which listing should begin.
|
||||
// - General purpose buckets - For general purpose buckets, key-marker is an
|
||||
// object key. Together with upload-id-marker , this parameter specifies the
|
||||
// multipart upload after which listing should begin. If upload-id-marker is not
|
||||
// specified, only the keys lexicographically greater than the specified
|
||||
// key-marker will be included in the list. If upload-id-marker is specified, any
|
||||
// multipart uploads for a key equal to the key-marker might also be included,
|
||||
// provided those multipart uploads have upload IDs lexicographically greater than
|
||||
// the specified upload-id-marker .
|
||||
// - Directory buckets - For directory buckets, key-marker is obfuscated and
|
||||
// isn't a real object key. The upload-id-marker parameter isn't supported by
|
||||
// directory buckets. To list the additional multipart uploads, you only need to
|
||||
// set the value of key-marker to the NextKeyMarker value from the previous
|
||||
// response. In the ListMultipartUploads response, the multipart uploads aren't
|
||||
// sorted lexicographically based on the object keys.
|
||||
KeyMarker *string
|
||||
|
||||
// Sets the maximum number of multipart uploads, from 1 to 1,000, to return in the
|
||||
@@ -110,23 +171,26 @@ type ListMultipartUploadsInput struct {
|
||||
// Lists in-progress uploads only for those keys that begin with the specified
|
||||
// prefix. You can use prefixes to separate a bucket into different grouping of
|
||||
// keys. (You can think of using prefix to make groups in the same way that you'd
|
||||
// use a folder in a file system.)
|
||||
// use a folder in a file system.) Directory buckets - For directory buckets, only
|
||||
// prefixes that end in a delimiter ( / ) are supported.
|
||||
Prefix *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 Amazon S3 bucket has Requester Pays enabled, the requester
|
||||
// will pay for corresponding charges to copy the object. For information about
|
||||
// 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.
|
||||
// in the Amazon S3 User Guide. This functionality is not supported for directory
|
||||
// buckets.
|
||||
RequestPayer types.RequestPayer
|
||||
|
||||
// Together with key-marker, specifies the multipart upload after which listing
|
||||
// should begin. If key-marker is not specified, the upload-id-marker parameter is
|
||||
// ignored. Otherwise, any multipart uploads for a key equal to the key-marker
|
||||
// might be included in the list only if they have an upload ID lexicographically
|
||||
// greater than the specified upload-id-marker .
|
||||
// greater than the specified upload-id-marker . This functionality is not
|
||||
// supported for directory buckets.
|
||||
UploadIdMarker *string
|
||||
|
||||
noSmithyDocumentSerde
|
||||
@@ -146,11 +210,14 @@ type ListMultipartUploadsOutput struct {
|
||||
|
||||
// If you specify a delimiter in the request, then the result returns each
|
||||
// distinct key prefix containing the delimiter in a CommonPrefixes element. The
|
||||
// distinct key prefixes are returned in the Prefix child element.
|
||||
// distinct key prefixes are returned in the Prefix child element. Directory
|
||||
// buckets - For directory buckets, only prefixes that end in a delimiter ( / ) are
|
||||
// supported.
|
||||
CommonPrefixes []types.CommonPrefix
|
||||
|
||||
// Contains the delimiter you specified in the request. If you don't specify a
|
||||
// delimiter in your request, this element is absent from the response.
|
||||
// delimiter in your request, this element is absent from the response. Directory
|
||||
// buckets - For directory buckets, / is the only supported delimiter.
|
||||
Delimiter *string
|
||||
|
||||
// Encoding type used by Amazon S3 to encode object keys in the response. If you
|
||||
@@ -177,18 +244,22 @@ type ListMultipartUploadsOutput struct {
|
||||
NextKeyMarker *string
|
||||
|
||||
// When a list is truncated, this element specifies the value that should be used
|
||||
// for the upload-id-marker request parameter in a subsequent request.
|
||||
// for the upload-id-marker request parameter in a subsequent request. This
|
||||
// functionality is not supported for directory buckets.
|
||||
NextUploadIdMarker *string
|
||||
|
||||
// When a prefix is provided in the request, this field contains the specified
|
||||
// prefix. The result contains only keys starting with the specified prefix.
|
||||
// Directory buckets - For directory buckets, only prefixes that end in a delimiter
|
||||
// ( / ) are supported.
|
||||
Prefix *string
|
||||
|
||||
// If present, indicates that the requester was successfully charged for the
|
||||
// request.
|
||||
// request. This functionality is not supported for directory buckets.
|
||||
RequestCharged types.RequestCharged
|
||||
|
||||
// Upload ID after which listing began.
|
||||
// Upload ID after which listing began. This functionality is not supported for
|
||||
// directory buckets.
|
||||
UploadIdMarker *string
|
||||
|
||||
// Container for elements related to a particular multipart upload. A response can
|
||||
@@ -256,6 +327,9 @@ func (c *Client) addOperationListMultipartUploadsMiddlewares(stack *middleware.S
|
||||
if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addPutBucketContextMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addOpListMultipartUploadsValidationMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
+20
-15
@@ -13,14 +13,15 @@ import (
|
||||
smithyhttp "github.com/aws/smithy-go/transport/http"
|
||||
)
|
||||
|
||||
// Returns metadata about all versions of the objects in a bucket. You can also
|
||||
// use request parameters as selection criteria to return metadata about a subset
|
||||
// of all the object versions. To use this operation, you must have permission to
|
||||
// perform the s3:ListBucketVersions action. Be aware of the name difference. A
|
||||
// 200 OK response can contain valid or invalid XML. Make sure to design your
|
||||
// application to parse the contents of the response and handle it appropriately.
|
||||
// To use this operation, you must have READ access to the bucket. The following
|
||||
// operations are related to ListObjectVersions :
|
||||
// This operation is not supported by directory buckets. Returns metadata about
|
||||
// all versions of the objects in a bucket. You can also use request parameters as
|
||||
// selection criteria to return metadata about a subset of all the object versions.
|
||||
// To use this operation, you must have permission to perform the
|
||||
// s3:ListBucketVersions action. Be aware of the name difference. A 200 OK
|
||||
// response can contain valid or invalid XML. Make sure to design your application
|
||||
// to parse the contents of the response and handle it appropriately. To use this
|
||||
// operation, you must have READ access to the bucket. The following operations are
|
||||
// related to ListObjectVersions :
|
||||
// - ListObjectsV2 (https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListObjectsV2.html)
|
||||
// - GetObject (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetObject.html)
|
||||
// - PutObject (https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutObject.html)
|
||||
@@ -62,9 +63,9 @@ type ListObjectVersionsInput struct {
|
||||
// response.
|
||||
EncodingType types.EncodingType
|
||||
|
||||
// The account ID of the expected bucket owner. If the bucket is owned by a
|
||||
// different account, the request fails with the HTTP status code 403 Forbidden
|
||||
// (access denied).
|
||||
// The account ID of the expected bucket owner. If the account ID that you provide
|
||||
// does not match the actual owner of the bucket, the request fails with the HTTP
|
||||
// status code 403 Forbidden (access denied).
|
||||
ExpectedBucketOwner *string
|
||||
|
||||
// Specifies the key to start with when listing objects in a bucket.
|
||||
@@ -90,11 +91,12 @@ type ListObjectVersionsInput struct {
|
||||
|
||||
// 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 Amazon S3 bucket has Requester Pays enabled, the requester
|
||||
// will pay for corresponding charges to copy the object. For information about
|
||||
// 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.
|
||||
// in the Amazon S3 User Guide. This functionality is not supported for directory
|
||||
// buckets.
|
||||
RequestPayer types.RequestPayer
|
||||
|
||||
// Specifies the object version you want to start listing from.
|
||||
@@ -162,7 +164,7 @@ type ListObjectVersionsOutput struct {
|
||||
Prefix *string
|
||||
|
||||
// If present, indicates that the requester was successfully charged for the
|
||||
// request.
|
||||
// request. This functionality is not supported for directory buckets.
|
||||
RequestCharged types.RequestCharged
|
||||
|
||||
// Marks the last version of the key returned in a truncated response.
|
||||
@@ -232,6 +234,9 @@ func (c *Client) addOperationListObjectVersionsMiddlewares(stack *middleware.Sta
|
||||
if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addPutBucketContextMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addOpListObjectVersionsValidationMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
+33
-20
@@ -13,12 +13,12 @@ import (
|
||||
smithyhttp "github.com/aws/smithy-go/transport/http"
|
||||
)
|
||||
|
||||
// Returns some or all (up to 1,000) of the objects in a bucket. You can use the
|
||||
// request parameters as selection criteria to return a subset of the objects in a
|
||||
// bucket. A 200 OK response can contain valid or invalid XML. Be sure to design
|
||||
// your application to parse the contents of the response and handle it
|
||||
// appropriately. This action has been revised. We recommend that you use the newer
|
||||
// version, ListObjectsV2 (https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListObjectsV2.html)
|
||||
// This operation is not supported by directory buckets. Returns some or all (up
|
||||
// to 1,000) of the objects in a bucket. You can use the request parameters as
|
||||
// selection criteria to return a subset of the objects in a bucket. A 200 OK
|
||||
// response can contain valid or invalid XML. Be sure to design your application to
|
||||
// parse the contents of the response and handle it appropriately. This action has
|
||||
// been revised. We recommend that you use the newer version, ListObjectsV2 (https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListObjectsV2.html)
|
||||
// , when developing applications. For backward compatibility, Amazon S3 continues
|
||||
// to support ListObjects . The following operations are related to ListObjects :
|
||||
// - ListObjectsV2 (https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListObjectsV2.html)
|
||||
@@ -43,16 +43,26 @@ func (c *Client) ListObjects(ctx context.Context, params *ListObjectsInput, optF
|
||||
|
||||
type ListObjectsInput struct {
|
||||
|
||||
// The name of the bucket containing the objects. When using this action with an
|
||||
// access point, 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. 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 containing the objects. Directory buckets - When you use
|
||||
// this operation with a directory bucket, you must use virtual-hosted-style
|
||||
// requests in the format Bucket_name.s3express-az_id.region.amazonaws.com .
|
||||
// Path-style requests are not supported. Directory bucket names must be unique in
|
||||
// the chosen Availability Zone. Bucket names must follow the format
|
||||
// bucket_base_name--az-id--x-s3 (for example, DOC-EXAMPLE-BUCKET--usw2-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
|
||||
// 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
|
||||
@@ -73,9 +83,9 @@ type ListObjectsInput struct {
|
||||
// response.
|
||||
EncodingType types.EncodingType
|
||||
|
||||
// The account ID of the expected bucket owner. If the bucket is owned by a
|
||||
// different account, the request fails with the HTTP status code 403 Forbidden
|
||||
// (access denied).
|
||||
// The account ID of the expected bucket owner. If the account ID that you provide
|
||||
// does not match the actual owner of the bucket, the request fails with the HTTP
|
||||
// status code 403 Forbidden (access denied).
|
||||
ExpectedBucketOwner *string
|
||||
|
||||
// Marker is where you want Amazon S3 to start listing from. Amazon S3 starts
|
||||
@@ -162,7 +172,7 @@ type ListObjectsOutput struct {
|
||||
Prefix *string
|
||||
|
||||
// If present, indicates that the requester was successfully charged for the
|
||||
// request.
|
||||
// request. This functionality is not supported for directory buckets.
|
||||
RequestCharged types.RequestCharged
|
||||
|
||||
// Metadata pertaining to the operation's result.
|
||||
@@ -226,6 +236,9 @@ func (c *Client) addOperationListObjectsMiddlewares(stack *middleware.Stack, opt
|
||||
if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addPutBucketContextMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addOpListObjectsValidationMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
+112
-60
@@ -17,21 +17,47 @@ import (
|
||||
// You can use the request parameters as selection criteria to return a subset of
|
||||
// the objects in a bucket. A 200 OK response can contain valid or invalid XML.
|
||||
// Make sure to design your application to parse the contents of the response and
|
||||
// handle it appropriately. Objects are returned sorted in an ascending order of
|
||||
// the respective key names in the list. For more information about listing
|
||||
// objects, see Listing object keys programmatically (https://docs.aws.amazon.com/AmazonS3/latest/userguide/ListingKeysUsingAPIs.html)
|
||||
// in the Amazon S3 User Guide. To use this operation, you must have READ access to
|
||||
// the bucket. To use this action in an Identity and Access Management (IAM)
|
||||
// policy, you must have permission to perform the s3:ListBucket action. The
|
||||
// bucket owner has this permission by default and can grant this permission to
|
||||
// others. For more information about permissions, see Permissions Related to
|
||||
// Bucket Subresource Operations (https://docs.aws.amazon.com/AmazonS3/latest/userguide/using-with-s3-actions.html#using-with-s3-actions-related-to-bucket-subresources)
|
||||
// and Managing Access Permissions to Your Amazon S3 Resources (https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-access-control.html)
|
||||
// in the Amazon S3 User Guide. This section describes the latest revision of this
|
||||
// action. We recommend that you use this revised API operation for application
|
||||
// development. For backward compatibility, Amazon S3 continues to support the
|
||||
// prior version of this API operation, ListObjects (https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListObjects.html)
|
||||
// . To get a list of your buckets, see ListBuckets (https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListBuckets.html)
|
||||
// handle it appropriately. For more information about listing objects, see
|
||||
// Listing object keys programmatically (https://docs.aws.amazon.com/AmazonS3/latest/userguide/ListingKeysUsingAPIs.html)
|
||||
// in the Amazon S3 User Guide. To get a list of your buckets, see ListBuckets (https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListBuckets.html)
|
||||
// . Directory buckets - For directory buckets, you must make requests for this API
|
||||
// operation to the Zonal endpoint. These endpoints support virtual-hosted-style
|
||||
// requests in the format
|
||||
// https://bucket_name.s3express-az_id.region.amazonaws.com/key-name . Path-style
|
||||
// requests are not supported. For more information, see Regional and Zonal
|
||||
// endpoints (https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-express-Regions-and-Zones.html)
|
||||
// in the Amazon S3 User Guide. Permissions
|
||||
// - General purpose bucket permissions - To use this operation, you must have
|
||||
// READ access to the bucket. You must have permission to perform the
|
||||
// s3:ListBucket action. The bucket owner has this permission by default and can
|
||||
// grant this permission to others. For more information about permissions, see
|
||||
// Permissions Related to Bucket Subresource Operations (https://docs.aws.amazon.com/AmazonS3/latest/userguide/using-with-s3-actions.html#using-with-s3-actions-related-to-bucket-subresources)
|
||||
// and Managing Access Permissions to Your Amazon S3 Resources (https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-access-control.html)
|
||||
// in the Amazon S3 User Guide.
|
||||
// - Directory bucket permissions - To grant access to this API operation on a
|
||||
// directory bucket, we recommend that you use the CreateSession (https://docs.aws.amazon.com/AmazonS3/latest/API/API_CreateSession.html)
|
||||
// API operation for session-based authorization. Specifically, you grant the
|
||||
// s3express:CreateSession permission to the directory bucket in a bucket policy
|
||||
// or an IAM identity-based policy. Then, you make the CreateSession API call on
|
||||
// the bucket to obtain a session token. With the session token in your request
|
||||
// header, you can make API requests to this operation. After the session token
|
||||
// expires, you make another CreateSession API call to generate a new session
|
||||
// token for use. Amazon Web Services CLI or SDKs create session and refresh the
|
||||
// session token automatically to avoid service interruptions when a session
|
||||
// expires. For more information about authorization, see CreateSession (https://docs.aws.amazon.com/AmazonS3/latest/API/API_CreateSession.html)
|
||||
// .
|
||||
//
|
||||
// Sorting order of returned objects
|
||||
// - General purpose bucket - For general purpose buckets, ListObjectsV2 returns
|
||||
// objects in lexicographical order based on their key names.
|
||||
// - Directory bucket - For directory buckets, ListObjectsV2 does not return
|
||||
// objects in lexicographical order.
|
||||
//
|
||||
// HTTP Host header syntax Directory buckets - The HTTP Host header syntax is
|
||||
// Bucket_name.s3express-az_id.region.amazonaws.com . This section describes the
|
||||
// latest revision of this action. We recommend that you use this revised API
|
||||
// operation for application development. For backward compatibility, Amazon S3
|
||||
// continues to support the prior version of this API operation, ListObjects (https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListObjects.html)
|
||||
// . The following operations are related to ListObjectsV2 :
|
||||
// - GetObject (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetObject.html)
|
||||
// - PutObject (https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutObject.html)
|
||||
@@ -53,15 +79,25 @@ func (c *Client) ListObjectsV2(ctx context.Context, params *ListObjectsV2Input,
|
||||
|
||||
type ListObjectsV2Input struct {
|
||||
|
||||
// Bucket name to list. When using this action with an access point, 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. 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
|
||||
// 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
|
||||
// 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
|
||||
@@ -72,23 +108,32 @@ type ListObjectsV2Input struct {
|
||||
Bucket *string
|
||||
|
||||
// ContinuationToken indicates to Amazon S3 that the list is being continued on
|
||||
// this bucket with a token. ContinuationToken is obfuscated and is not a real key.
|
||||
// this bucket with a token. ContinuationToken is obfuscated and is not a real
|
||||
// key. You can use this ContinuationToken for pagination of the list results.
|
||||
ContinuationToken *string
|
||||
|
||||
// A delimiter is a character that you use to group keys.
|
||||
// - Directory buckets - For directory buckets, / is the only supported
|
||||
// delimiter.
|
||||
// - Directory buckets - When you query ListObjectsV2 with a delimiter during
|
||||
// in-progress multipart uploads, the CommonPrefixes response parameter contains
|
||||
// the prefixes that are associated with the in-progress multipart uploads. For
|
||||
// more information about multipart uploads, see Multipart Upload Overview (https://docs.aws.amazon.com/AmazonS3/latest/dev/mpuoverview.html)
|
||||
// in the Amazon S3 User Guide.
|
||||
Delimiter *string
|
||||
|
||||
// Encoding type used by Amazon S3 to encode object keys in the response.
|
||||
EncodingType types.EncodingType
|
||||
|
||||
// The account ID of the expected bucket owner. If the bucket is owned by a
|
||||
// different account, the request fails with the HTTP status code 403 Forbidden
|
||||
// (access denied).
|
||||
// The account ID of the expected bucket owner. If the account ID that you provide
|
||||
// does not match the actual owner of the bucket, the request fails with the HTTP
|
||||
// status code 403 Forbidden (access denied).
|
||||
ExpectedBucketOwner *string
|
||||
|
||||
// The owner field is not present in ListObjectsV2 by default. If you want to
|
||||
// return the owner field with each key in the result, then set the FetchOwner
|
||||
// field to true .
|
||||
// field to true . Directory buckets - For directory buckets, the bucket owner is
|
||||
// returned as the object owner for all objects.
|
||||
FetchOwner *bool
|
||||
|
||||
// Sets the maximum number of keys returned in the response. By default, the
|
||||
@@ -97,19 +142,23 @@ type ListObjectsV2Input struct {
|
||||
MaxKeys *int32
|
||||
|
||||
// Specifies the optional fields that you want returned in the response. Fields
|
||||
// that you do not specify are not returned.
|
||||
// that you do not specify are not returned. This functionality is not supported
|
||||
// for directory buckets.
|
||||
OptionalObjectAttributes []types.OptionalObjectAttributes
|
||||
|
||||
// Limits the response to keys that begin with the specified prefix.
|
||||
// Limits the response to keys that begin with the specified prefix. Directory
|
||||
// buckets - For directory buckets, only prefixes that end in a delimiter ( / ) are
|
||||
// supported.
|
||||
Prefix *string
|
||||
|
||||
// Confirms that the requester knows that she or he will be charged for the list
|
||||
// objects request in V2 style. Bucket owners need not specify this parameter in
|
||||
// their requests.
|
||||
// their requests. This functionality is not supported for directory buckets.
|
||||
RequestPayer types.RequestPayer
|
||||
|
||||
// StartAfter is where you want Amazon S3 to start listing from. Amazon S3 starts
|
||||
// listing after this specified key. StartAfter can be any key in the bucket.
|
||||
// listing after this specified key. StartAfter can be any key in the bucket. This
|
||||
// functionality is not supported for directory buckets.
|
||||
StartAfter *string
|
||||
|
||||
noSmithyDocumentSerde
|
||||
@@ -123,28 +172,39 @@ func (in *ListObjectsV2Input) bindEndpointParams(p *EndpointParameters) {
|
||||
|
||||
type ListObjectsV2Output struct {
|
||||
|
||||
// All of the keys (up to 1,000) rolled up into a common prefix count as a single
|
||||
// return when calculating the number of returns. A response can contain
|
||||
// CommonPrefixes only if you specify a delimiter. CommonPrefixes contains all (if
|
||||
// there are any) keys between Prefix and the next occurrence of the string
|
||||
// specified by a delimiter. CommonPrefixes lists keys that act like
|
||||
// subdirectories in the directory specified by Prefix . For example, if the prefix
|
||||
// is notes/ and the delimiter is a slash ( / ) as in notes/summer/july , the
|
||||
// common prefix is notes/summer/ . All of the keys that roll up into a common
|
||||
// prefix count as a single return when calculating the number of returns.
|
||||
// All of the keys (up to 1,000) that share the same prefix are grouped together.
|
||||
// When counting the total numbers of returns by this API operation, this group of
|
||||
// keys is considered as one item. A response can contain CommonPrefixes only if
|
||||
// you specify a delimiter. CommonPrefixes contains all (if there are any) keys
|
||||
// between Prefix and the next occurrence of the string specified by a delimiter.
|
||||
// CommonPrefixes lists keys that act like subdirectories in the directory
|
||||
// specified by Prefix . For example, if the prefix is notes/ and the delimiter is
|
||||
// a slash ( / ) as in notes/summer/july , the common prefix is notes/summer/ . All
|
||||
// of the keys that roll up into a common prefix count as a single return when
|
||||
// calculating the number of returns.
|
||||
// - Directory buckets - For directory buckets, only prefixes that end in a
|
||||
// delimiter ( / ) are supported.
|
||||
// - Directory buckets - When you query ListObjectsV2 with a delimiter during
|
||||
// in-progress multipart uploads, the CommonPrefixes response parameter contains
|
||||
// the prefixes that are associated with the in-progress multipart uploads. For
|
||||
// more information about multipart uploads, see Multipart Upload Overview (https://docs.aws.amazon.com/AmazonS3/latest/dev/mpuoverview.html)
|
||||
// in the Amazon S3 User Guide.
|
||||
CommonPrefixes []types.CommonPrefix
|
||||
|
||||
// Metadata about each object returned.
|
||||
Contents []types.Object
|
||||
|
||||
// If ContinuationToken was sent with the request, it is included in the response.
|
||||
// You can use the returned ContinuationToken for pagination of the list response.
|
||||
// You can use this ContinuationToken for pagination of the list results.
|
||||
ContinuationToken *string
|
||||
|
||||
// Causes keys that contain the same string between the prefix and the first
|
||||
// occurrence of the delimiter to be rolled up into a single result element in the
|
||||
// CommonPrefixes collection. These rolled-up keys are not returned elsewhere in
|
||||
// the response. Each rolled-up result counts as only one return against the
|
||||
// MaxKeys value.
|
||||
// MaxKeys value. Directory buckets - For directory buckets, / is the only
|
||||
// supported delimiter.
|
||||
Delimiter *string
|
||||
|
||||
// Encoding type used by Amazon S3 to encode object key names in the XML response.
|
||||
@@ -168,20 +228,7 @@ type ListObjectsV2Output struct {
|
||||
// will never contain more.
|
||||
MaxKeys *int32
|
||||
|
||||
// The bucket name. When using this action with an access point, 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. 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.
|
||||
// The bucket name.
|
||||
Name *string
|
||||
|
||||
// NextContinuationToken is sent when isTruncated is true, which means there are
|
||||
@@ -190,14 +237,16 @@ type ListObjectsV2Output struct {
|
||||
// obfuscated and is not a real key
|
||||
NextContinuationToken *string
|
||||
|
||||
// Keys that begin with the indicated prefix.
|
||||
// Keys that begin with the indicated prefix. Directory buckets - For directory
|
||||
// buckets, only prefixes that end in a delimiter ( / ) are supported.
|
||||
Prefix *string
|
||||
|
||||
// If present, indicates that the requester was successfully charged for the
|
||||
// request.
|
||||
// request. This functionality is not supported for directory buckets.
|
||||
RequestCharged types.RequestCharged
|
||||
|
||||
// If StartAfter was sent with the request, it is included in the response.
|
||||
// If StartAfter was sent with the request, it is included in the response. This
|
||||
// functionality is not supported for directory buckets.
|
||||
StartAfter *string
|
||||
|
||||
// Metadata pertaining to the operation's result.
|
||||
@@ -261,6 +310,9 @@ func (c *Client) addOperationListObjectsV2Middlewares(stack *middleware.Stack, o
|
||||
if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addPutBucketContextMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addOpListObjectsV2ValidationMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
+87
-39
@@ -14,22 +14,49 @@ import (
|
||||
"time"
|
||||
)
|
||||
|
||||
// Lists the parts that have been uploaded for a specific multipart upload. This
|
||||
// operation must include the upload ID, which you obtain by sending the initiate
|
||||
// multipart upload request (see CreateMultipartUpload (https://docs.aws.amazon.com/AmazonS3/latest/API/API_CreateMultipartUpload.html)
|
||||
// ). This request returns a maximum of 1,000 uploaded parts. The default number of
|
||||
// parts returned is 1,000 parts. You can restrict the number of parts returned by
|
||||
// specifying the max-parts request parameter. If your multipart upload consists
|
||||
// of more than 1,000 parts, the response returns an IsTruncated field with the
|
||||
// value of true, and a NextPartNumberMarker element. In subsequent ListParts
|
||||
// requests you can include the part-number-marker query string parameter and set
|
||||
// its value to the NextPartNumberMarker field value from the previous response.
|
||||
// If the upload was created using a checksum algorithm, you will need to have
|
||||
// permission to the kms:Decrypt action for the request to succeed. For more
|
||||
// Lists the parts that have been uploaded for a specific multipart upload. To use
|
||||
// this operation, you must provide the upload ID in the request. You obtain this
|
||||
// uploadID by sending the initiate multipart upload request through
|
||||
// CreateMultipartUpload (https://docs.aws.amazon.com/AmazonS3/latest/API/API_CreateMultipartUpload.html)
|
||||
// . The ListParts request returns a maximum of 1,000 uploaded parts. The limit of
|
||||
// 1,000 parts is also the default value. You can restrict the number of parts in a
|
||||
// response by specifying the max-parts request parameter. If your multipart
|
||||
// upload consists of more than 1,000 parts, the response returns an IsTruncated
|
||||
// field with the value of true , and a NextPartNumberMarker element. To list
|
||||
// remaining uploaded parts, in subsequent ListParts requests, include the
|
||||
// part-number-marker query string parameter and set its value to the
|
||||
// NextPartNumberMarker field value from the previous response. For more
|
||||
// information on multipart uploads, see Uploading Objects Using Multipart Upload (https://docs.aws.amazon.com/AmazonS3/latest/dev/uploadobjusingmpu.html)
|
||||
// . For information on permissions required to use the multipart upload API, see
|
||||
// Multipart Upload and Permissions (https://docs.aws.amazon.com/AmazonS3/latest/dev/mpuAndPermissions.html)
|
||||
// . The following operations are related to ListParts :
|
||||
// in the Amazon S3 User Guide. Directory buckets - For directory buckets, you must
|
||||
// make requests for this API operation to the Zonal endpoint. These endpoints
|
||||
// support virtual-hosted-style requests in the format
|
||||
// https://bucket_name.s3express-az_id.region.amazonaws.com/key-name . Path-style
|
||||
// requests are not supported. For more information, see Regional and Zonal
|
||||
// endpoints (https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-express-Regions-and-Zones.html)
|
||||
// in the Amazon S3 User Guide. Permissions
|
||||
// - General purpose bucket permissions - For information about permissions
|
||||
// required to use the multipart upload API, see Multipart Upload and Permissions (https://docs.aws.amazon.com/AmazonS3/latest/dev/mpuAndPermissions.html)
|
||||
// in the Amazon S3 User Guide. If the upload was created using server-side
|
||||
// encryption with Key Management Service (KMS) keys (SSE-KMS) or dual-layer
|
||||
// server-side encryption with Amazon Web Services KMS keys (DSSE-KMS), you must
|
||||
// have permission to the kms:Decrypt action for the ListParts request to
|
||||
// succeed.
|
||||
// - Directory bucket permissions - To grant access to this API operation on a
|
||||
// directory bucket, we recommend that you use the CreateSession (https://docs.aws.amazon.com/AmazonS3/latest/API/API_CreateSession.html)
|
||||
// API operation for session-based authorization. Specifically, you grant the
|
||||
// s3express:CreateSession permission to the directory bucket in a bucket policy
|
||||
// or an IAM identity-based policy. Then, you make the CreateSession API call on
|
||||
// the bucket to obtain a session token. With the session token in your request
|
||||
// header, you can make API requests to this operation. After the session token
|
||||
// expires, you make another CreateSession API call to generate a new session
|
||||
// token for use. Amazon Web Services CLI or SDKs create session and refresh the
|
||||
// session token automatically to avoid service interruptions when a session
|
||||
// expires. For more information about authorization, see CreateSession (https://docs.aws.amazon.com/AmazonS3/latest/API/API_CreateSession.html)
|
||||
// .
|
||||
//
|
||||
// HTTP Host header syntax Directory buckets - The HTTP Host header syntax is
|
||||
// Bucket_name.s3express-az_id.region.amazonaws.com . The following operations are
|
||||
// related to ListParts :
|
||||
// - CreateMultipartUpload (https://docs.aws.amazon.com/AmazonS3/latest/API/API_CreateMultipartUpload.html)
|
||||
// - UploadPart (https://docs.aws.amazon.com/AmazonS3/latest/API/API_UploadPart.html)
|
||||
// - CompleteMultipartUpload (https://docs.aws.amazon.com/AmazonS3/latest/API/API_CompleteMultipartUpload.html)
|
||||
@@ -53,16 +80,26 @@ func (c *Client) ListParts(ctx context.Context, params *ListPartsInput, optFns .
|
||||
|
||||
type ListPartsInput struct {
|
||||
|
||||
// The name of the bucket to which the parts are being uploaded. When using this
|
||||
// action with an access point, 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. 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 to which the parts are being uploaded. Directory buckets
|
||||
// - When you use this operation with a directory bucket, you must use
|
||||
// virtual-hosted-style requests in the format
|
||||
// Bucket_name.s3express-az_id.region.amazonaws.com . Path-style requests are not
|
||||
// supported. Directory bucket names must be unique in the chosen Availability
|
||||
// Zone. Bucket names must follow the format bucket_base_name--az-id--x-s3 (for
|
||||
// example, DOC-EXAMPLE-BUCKET--usw2-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
|
||||
// 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
|
||||
@@ -82,9 +119,9 @@ type ListPartsInput struct {
|
||||
// This member is required.
|
||||
UploadId *string
|
||||
|
||||
// The account ID of the expected bucket owner. If the bucket is owned by a
|
||||
// different account, the request fails with the HTTP status code 403 Forbidden
|
||||
// (access denied).
|
||||
// The account ID of the expected bucket owner. If the account ID that you provide
|
||||
// does not match the actual owner of the bucket, the request fails with the HTTP
|
||||
// status code 403 Forbidden (access denied).
|
||||
ExpectedBucketOwner *string
|
||||
|
||||
// Sets the maximum number of parts to return.
|
||||
@@ -96,29 +133,33 @@ type ListPartsInput struct {
|
||||
|
||||
// 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 Amazon S3 bucket has Requester Pays enabled, the requester
|
||||
// will pay for corresponding charges to copy the object. For information about
|
||||
// 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.
|
||||
// in the Amazon S3 User Guide. This functionality is not supported for directory
|
||||
// buckets.
|
||||
RequestPayer types.RequestPayer
|
||||
|
||||
// The server-side encryption (SSE) algorithm used to encrypt the object. This
|
||||
// parameter is needed only when the object was created using a checksum algorithm.
|
||||
// For more information, see Protecting data using SSE-C keys (https://docs.aws.amazon.com/AmazonS3/latest/dev/ServerSideEncryptionCustomerKeys.html)
|
||||
// in the Amazon S3 User Guide.
|
||||
// in the Amazon S3 User Guide. This functionality is not supported for directory
|
||||
// buckets.
|
||||
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.
|
||||
// in the Amazon S3 User Guide. This functionality is not supported for directory
|
||||
// buckets.
|
||||
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.
|
||||
// in the Amazon S3 User Guide. This functionality is not supported for directory
|
||||
// buckets.
|
||||
SSECustomerKeyMD5 *string
|
||||
|
||||
noSmithyDocumentSerde
|
||||
@@ -140,11 +181,13 @@ type ListPartsOutput struct {
|
||||
// Lifecycle Configuration (https://docs.aws.amazon.com/AmazonS3/latest/dev/mpuoverview.html#mpu-abort-incomplete-mpu-lifecycle-config)
|
||||
// . The response will also include the x-amz-abort-rule-id header that will
|
||||
// provide the ID of the lifecycle configuration rule that defines this action.
|
||||
// This functionality is not supported for directory buckets.
|
||||
AbortDate *time.Time
|
||||
|
||||
// This header is returned along with the x-amz-abort-date header. It identifies
|
||||
// applicable lifecycle configuration rule that defines the action to abort
|
||||
// incomplete multipart uploads.
|
||||
// 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
|
||||
@@ -178,7 +221,8 @@ type ListPartsOutput struct {
|
||||
|
||||
// Container element that identifies the object owner, after the object is
|
||||
// created. If multipart upload is initiated by an IAM user, this element provides
|
||||
// the parent account ID and display name.
|
||||
// the parent account ID and display name. Directory buckets - The bucket owner is
|
||||
// returned as the object owner for all the parts.
|
||||
Owner *types.Owner
|
||||
|
||||
// When a list is truncated, this element specifies the last part in the list, as
|
||||
@@ -191,11 +235,12 @@ type ListPartsOutput struct {
|
||||
Parts []types.Part
|
||||
|
||||
// If present, indicates that the requester was successfully charged for the
|
||||
// request.
|
||||
// request. This functionality is not supported for directory buckets.
|
||||
RequestCharged types.RequestCharged
|
||||
|
||||
// Class of storage (STANDARD or REDUCED_REDUNDANCY) used to store the uploaded
|
||||
// object.
|
||||
// The class of storage used to store the uploaded object. Directory buckets -
|
||||
// Only the S3 Express One Zone storage class is supported by directory buckets to
|
||||
// store objects.
|
||||
StorageClass types.StorageClass
|
||||
|
||||
// Upload ID identifying the multipart upload whose parts are being listed.
|
||||
@@ -262,6 +307,9 @@ func (c *Client) addOperationListPartsMiddlewares(stack *middleware.Stack, optio
|
||||
if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addPutBucketContextMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addOpListPartsValidationMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
Generated
Vendored
+22
-17
@@ -11,16 +11,18 @@ import (
|
||||
s3cust "github.com/aws/aws-sdk-go-v2/service/s3/internal/customizations"
|
||||
"github.com/aws/aws-sdk-go-v2/service/s3/types"
|
||||
"github.com/aws/smithy-go/middleware"
|
||||
"github.com/aws/smithy-go/ptr"
|
||||
smithyhttp "github.com/aws/smithy-go/transport/http"
|
||||
)
|
||||
|
||||
// Sets the accelerate configuration of an existing bucket. Amazon S3 Transfer
|
||||
// Acceleration is a bucket-level feature that enables you to perform faster data
|
||||
// transfers to Amazon S3. To use this operation, you must have permission to
|
||||
// perform the s3:PutAccelerateConfiguration action. The bucket owner has this
|
||||
// permission by default. The bucket owner can grant this permission to others. For
|
||||
// more information about permissions, see Permissions Related to Bucket
|
||||
// Subresource Operations (https://docs.aws.amazon.com/AmazonS3/latest/userguide/using-with-s3-actions.html#using-with-s3-actions-related-to-bucket-subresources)
|
||||
// This operation is not supported by directory buckets. Sets the accelerate
|
||||
// configuration of an existing bucket. Amazon S3 Transfer Acceleration is a
|
||||
// bucket-level feature that enables you to perform faster data transfers to Amazon
|
||||
// S3. To use this operation, you must have permission to perform the
|
||||
// s3:PutAccelerateConfiguration action. The bucket owner has this permission by
|
||||
// default. The bucket owner can grant this permission to others. For more
|
||||
// information about permissions, see Permissions Related to Bucket Subresource
|
||||
// Operations (https://docs.aws.amazon.com/AmazonS3/latest/userguide/using-with-s3-actions.html#using-with-s3-actions-related-to-bucket-subresources)
|
||||
// and Managing Access Permissions to Your Amazon S3 Resources (https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-access-control.html)
|
||||
// . The Transfer Acceleration state of a bucket can be set to one of the following
|
||||
// two values:
|
||||
@@ -64,19 +66,19 @@ type PutBucketAccelerateConfigurationInput struct {
|
||||
// This member is required.
|
||||
Bucket *string
|
||||
|
||||
// Indicates the algorithm used to create the checksum for the object when using
|
||||
// the SDK. This header will not provide any additional functionality if not using
|
||||
// the SDK. When sending this header, there must be a corresponding x-amz-checksum
|
||||
// or x-amz-trailer header sent. Otherwise, Amazon S3 fails the request with the
|
||||
// HTTP status code 400 Bad Request . For more information, see Checking object
|
||||
// integrity (https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html)
|
||||
// Indicates the algorithm used to create the checksum for the object when you use
|
||||
// the SDK. This header will not provide any additional functionality if you don't
|
||||
// use the SDK. When you send this header, there must be a corresponding
|
||||
// x-amz-checksum or x-amz-trailer header sent. Otherwise, Amazon S3 fails the
|
||||
// request with the HTTP status code 400 Bad Request . For more information, see
|
||||
// Checking object integrity (https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html)
|
||||
// in the Amazon S3 User Guide. If you provide an individual checksum, Amazon S3
|
||||
// ignores any provided ChecksumAlgorithm parameter.
|
||||
ChecksumAlgorithm types.ChecksumAlgorithm
|
||||
|
||||
// The account ID of the expected bucket owner. If the bucket is owned by a
|
||||
// different account, the request fails with the HTTP status code 403 Forbidden
|
||||
// (access denied).
|
||||
// The account ID of the expected bucket owner. If the account ID that you provide
|
||||
// does not match the actual owner of the bucket, the request fails with the HTTP
|
||||
// status code 403 Forbidden (access denied).
|
||||
ExpectedBucketOwner *string
|
||||
|
||||
noSmithyDocumentSerde
|
||||
@@ -84,7 +86,7 @@ type PutBucketAccelerateConfigurationInput struct {
|
||||
|
||||
func (in *PutBucketAccelerateConfigurationInput) bindEndpointParams(p *EndpointParameters) {
|
||||
p.Bucket = in.Bucket
|
||||
|
||||
p.UseS3ExpressControlEndpoint = ptr.Bool(true)
|
||||
}
|
||||
|
||||
type PutBucketAccelerateConfigurationOutput struct {
|
||||
@@ -149,6 +151,9 @@ func (c *Client) addOperationPutBucketAccelerateConfigurationMiddlewares(stack *
|
||||
if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addPutBucketContextMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addOpPutBucketAccelerateConfigurationValidationMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
+22
-14
@@ -11,13 +11,15 @@ import (
|
||||
s3cust "github.com/aws/aws-sdk-go-v2/service/s3/internal/customizations"
|
||||
"github.com/aws/aws-sdk-go-v2/service/s3/types"
|
||||
"github.com/aws/smithy-go/middleware"
|
||||
"github.com/aws/smithy-go/ptr"
|
||||
smithyhttp "github.com/aws/smithy-go/transport/http"
|
||||
)
|
||||
|
||||
// Sets the permissions on an existing bucket using access control lists (ACL).
|
||||
// For more information, see Using ACLs (https://docs.aws.amazon.com/AmazonS3/latest/dev/S3_ACLs_UsingACLs.html)
|
||||
// . To set the ACL of a bucket, you must have WRITE_ACP permission. You can use
|
||||
// one of the following two ways to set a bucket's permissions:
|
||||
// This operation is not supported by directory buckets. Sets the permissions on
|
||||
// an existing bucket using access control lists (ACL). For more information, see
|
||||
// Using ACLs (https://docs.aws.amazon.com/AmazonS3/latest/dev/S3_ACLs_UsingACLs.html)
|
||||
// . To set the ACL of a bucket, you must have the WRITE_ACP permission. You can
|
||||
// use one of the following two ways to set a bucket's permissions:
|
||||
// - Specify the ACL in the request body
|
||||
// - Specify permissions using request headers
|
||||
//
|
||||
@@ -124,12 +126,12 @@ type PutBucketAclInput struct {
|
||||
// Contains the elements that set the ACL permissions for an object per grantee.
|
||||
AccessControlPolicy *types.AccessControlPolicy
|
||||
|
||||
// Indicates the algorithm used to create the checksum for the object when using
|
||||
// the SDK. This header will not provide any additional functionality if not using
|
||||
// the SDK. When sending this header, there must be a corresponding x-amz-checksum
|
||||
// or x-amz-trailer header sent. Otherwise, Amazon S3 fails the request with the
|
||||
// HTTP status code 400 Bad Request . For more information, see Checking object
|
||||
// integrity (https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html)
|
||||
// Indicates the algorithm used to create the checksum for the object when you use
|
||||
// the SDK. This header will not provide any additional functionality if you don't
|
||||
// use the SDK. When you send this header, there must be a corresponding
|
||||
// x-amz-checksum or x-amz-trailer header sent. Otherwise, Amazon S3 fails the
|
||||
// request with the HTTP status code 400 Bad Request . For more information, see
|
||||
// Checking object integrity (https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html)
|
||||
// in the Amazon S3 User Guide. If you provide an individual checksum, Amazon S3
|
||||
// ignores any provided ChecksumAlgorithm parameter.
|
||||
ChecksumAlgorithm types.ChecksumAlgorithm
|
||||
@@ -141,9 +143,9 @@ type PutBucketAclInput struct {
|
||||
// Amazon Web Services SDKs, this field is calculated automatically.
|
||||
ContentMD5 *string
|
||||
|
||||
// The account ID of the expected bucket owner. If the bucket is owned by a
|
||||
// different account, the request fails with the HTTP status code 403 Forbidden
|
||||
// (access denied).
|
||||
// The account ID of the expected bucket owner. If the account ID that you provide
|
||||
// does not match the actual owner of the bucket, the request fails with the HTTP
|
||||
// status code 403 Forbidden (access denied).
|
||||
ExpectedBucketOwner *string
|
||||
|
||||
// Allows grantee the read, write, read ACP, and write ACP permissions on the
|
||||
@@ -169,7 +171,7 @@ type PutBucketAclInput struct {
|
||||
|
||||
func (in *PutBucketAclInput) bindEndpointParams(p *EndpointParameters) {
|
||||
p.Bucket = in.Bucket
|
||||
|
||||
p.UseS3ExpressControlEndpoint = ptr.Bool(true)
|
||||
}
|
||||
|
||||
type PutBucketAclOutput struct {
|
||||
@@ -234,6 +236,9 @@ func (c *Client) addOperationPutBucketAclMiddlewares(stack *middleware.Stack, op
|
||||
if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addPutBucketContextMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addOpPutBucketAclValidationMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
@@ -270,6 +275,9 @@ func (c *Client) addOperationPutBucketAclMiddlewares(stack *middleware.Stack, op
|
||||
if err = addSerializeImmutableHostnameBucketMiddleware(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = s3cust.AddExpressDefaultChecksumMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user