aws-sdk-s3 1.164.0 → 1.182.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (64) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +102 -0
  3. data/VERSION +1 -1
  4. data/lib/aws-sdk-s3/bucket.rb +112 -43
  5. data/lib/aws-sdk-s3/bucket_acl.rb +6 -5
  6. data/lib/aws-sdk-s3/bucket_cors.rb +6 -5
  7. data/lib/aws-sdk-s3/bucket_lifecycle.rb +7 -2
  8. data/lib/aws-sdk-s3/bucket_lifecycle_configuration.rb +60 -3
  9. data/lib/aws-sdk-s3/bucket_logging.rb +2 -2
  10. data/lib/aws-sdk-s3/bucket_policy.rb +10 -9
  11. data/lib/aws-sdk-s3/bucket_request_payment.rb +3 -3
  12. data/lib/aws-sdk-s3/bucket_tagging.rb +3 -3
  13. data/lib/aws-sdk-s3/bucket_versioning.rb +9 -9
  14. data/lib/aws-sdk-s3/bucket_website.rb +3 -3
  15. data/lib/aws-sdk-s3/client.rb +2144 -1325
  16. data/lib/aws-sdk-s3/client_api.rb +175 -3
  17. data/lib/aws-sdk-s3/customizations/object.rb +6 -0
  18. data/lib/aws-sdk-s3/customizations/object_summary.rb +5 -0
  19. data/lib/aws-sdk-s3/customizations/object_version.rb +13 -0
  20. data/lib/aws-sdk-s3/customizations.rb +24 -38
  21. data/lib/aws-sdk-s3/endpoint_parameters.rb +13 -18
  22. data/lib/aws-sdk-s3/endpoint_provider.rb +272 -253
  23. data/lib/aws-sdk-s3/endpoints.rb +445 -1403
  24. data/lib/aws-sdk-s3/errors.rb +47 -0
  25. data/lib/aws-sdk-s3/file_downloader.rb +4 -21
  26. data/lib/aws-sdk-s3/multipart_file_uploader.rb +31 -13
  27. data/lib/aws-sdk-s3/multipart_upload.rb +84 -6
  28. data/lib/aws-sdk-s3/multipart_upload_part.rb +52 -36
  29. data/lib/aws-sdk-s3/object.rb +254 -113
  30. data/lib/aws-sdk-s3/object_acl.rb +4 -4
  31. data/lib/aws-sdk-s3/object_summary.rb +199 -82
  32. data/lib/aws-sdk-s3/object_version.rb +67 -17
  33. data/lib/aws-sdk-s3/plugins/checksum_algorithm.rb +31 -0
  34. data/lib/aws-sdk-s3/plugins/endpoints.rb +1 -204
  35. data/lib/aws-sdk-s3/plugins/express_session_auth.rb +11 -20
  36. data/lib/aws-sdk-s3/plugins/http_200_errors.rb +3 -3
  37. data/lib/aws-sdk-s3/plugins/md5s.rb +10 -71
  38. data/lib/aws-sdk-s3/presigner.rb +5 -5
  39. data/lib/aws-sdk-s3/resource.rb +35 -10
  40. data/lib/aws-sdk-s3/types.rb +1921 -856
  41. data/lib/aws-sdk-s3.rb +35 -31
  42. data/sig/bucket.rbs +15 -6
  43. data/sig/bucket_acl.rbs +1 -1
  44. data/sig/bucket_cors.rbs +1 -1
  45. data/sig/bucket_lifecycle.rbs +1 -1
  46. data/sig/bucket_lifecycle_configuration.rbs +8 -4
  47. data/sig/bucket_logging.rbs +1 -1
  48. data/sig/bucket_policy.rbs +1 -1
  49. data/sig/bucket_request_payment.rbs +1 -1
  50. data/sig/bucket_tagging.rbs +1 -1
  51. data/sig/bucket_versioning.rbs +3 -3
  52. data/sig/bucket_website.rbs +1 -1
  53. data/sig/client.rbs +115 -40
  54. data/sig/errors.rbs +8 -0
  55. data/sig/multipart_upload.rbs +11 -2
  56. data/sig/multipart_upload_part.rbs +5 -1
  57. data/sig/object.rbs +22 -6
  58. data/sig/object_acl.rbs +1 -1
  59. data/sig/object_summary.rbs +17 -7
  60. data/sig/object_version.rbs +9 -3
  61. data/sig/resource.rbs +7 -3
  62. data/sig/types.rbs +163 -36
  63. metadata +6 -5
  64. data/lib/aws-sdk-s3/plugins/skip_whole_multipart_get_checksums.rb +0 -31
@@ -84,6 +84,18 @@ module Aws::S3
84
84
  data[:checksum_algorithm]
85
85
  end
86
86
 
87
+ # The checksum type that is used to calculate the object’s checksum
88
+ # value. For more information, see [Checking object integrity][1] in the
89
+ # *Amazon S3 User Guide*.
90
+ #
91
+ #
92
+ #
93
+ # [1]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html
94
+ # @return [String]
95
+ def checksum_type
96
+ data[:checksum_type]
97
+ end
98
+
87
99
  # Size in bytes of the object
88
100
  # @return [Integer]
89
101
  def size
@@ -324,7 +336,7 @@ module Aws::S3
324
336
  # object_summary.copy_from({
325
337
  # acl: "private", # accepts private, public-read, public-read-write, authenticated-read, aws-exec-read, bucket-owner-read, bucket-owner-full-control
326
338
  # cache_control: "CacheControl",
327
- # checksum_algorithm: "CRC32", # accepts CRC32, CRC32C, SHA1, SHA256
339
+ # checksum_algorithm: "CRC32", # accepts CRC32, CRC32C, SHA1, SHA256, CRC64NVME
328
340
  # content_disposition: "ContentDisposition",
329
341
  # content_encoding: "ContentEncoding",
330
342
  # content_language: "ContentLanguage",
@@ -723,17 +735,17 @@ module Aws::S3
723
735
  # * To encrypt new object copies to a directory bucket with SSE-KMS, we
724
736
  # recommend you specify SSE-KMS as the directory bucket's default
725
737
  # encryption configuration with a KMS key (specifically, a [customer
726
- # managed key][4]). [Amazon Web Services managed key][5] (`aws/s3`)
727
- # isn't supported. Your SSE-KMS configuration can only support 1
728
- # [customer managed key][4] per directory bucket for the lifetime of
729
- # the bucket. After you specify a customer managed key for SSE-KMS,
730
- # you can't override the customer managed key for the bucket's
731
- # SSE-KMS configuration. Then, when you perform a `CopyObject`
732
- # operation and want to specify server-side encryption settings for
733
- # new object copies with SSE-KMS in the encryption-related request
734
- # headers, you must ensure the encryption key is the same customer
735
- # managed key that you specified for the directory bucket's default
736
- # encryption configuration.
738
+ # managed key][4]). The [Amazon Web Services managed key][5]
739
+ # (`aws/s3`) isn't supported. Your SSE-KMS configuration can only
740
+ # support 1 [customer managed key][4] per directory bucket for the
741
+ # lifetime of the bucket. After you specify a customer managed key for
742
+ # SSE-KMS, you can't override the customer managed key for the
743
+ # bucket's SSE-KMS configuration. Then, when you perform a
744
+ # `CopyObject` operation and want to specify server-side encryption
745
+ # settings for new object copies with SSE-KMS in the
746
+ # encryption-related request headers, you must ensure the encryption
747
+ # key is the same customer managed key that you specified for the
748
+ # directory bucket's default encryption configuration.
737
749
  #
738
750
  #
739
751
  #
@@ -840,15 +852,17 @@ module Aws::S3
840
852
  # Signature Version in Request Authentication][1] in the *Amazon S3 User
841
853
  # Guide*.
842
854
  #
843
- # **Directory buckets** - If you specify `x-amz-server-side-encryption`
844
- # with `aws:kms`, you must specify the `
845
- # x-amz-server-side-encryption-aws-kms-key-id` header with the ID (Key
846
- # ID or Key ARN) of the KMS symmetric encryption customer managed key to
847
- # use. Otherwise, you get an HTTP `400 Bad Request` error. Only use the
848
- # key ID or key ARN. The key alias format of the KMS key isn't
849
- # supported. Your SSE-KMS configuration can only support 1 [customer
850
- # managed key][2] per directory bucket for the lifetime of the bucket.
851
- # [Amazon Web Services managed key][3] (`aws/s3`) isn't supported.
855
+ # **Directory buckets** - To encrypt data using SSE-KMS, it's
856
+ # recommended to specify the `x-amz-server-side-encryption` header to
857
+ # `aws:kms`. Then, the `x-amz-server-side-encryption-aws-kms-key-id`
858
+ # header implicitly uses the bucket's default KMS customer managed key
859
+ # ID. If you want to explicitly set the `
860
+ # x-amz-server-side-encryption-aws-kms-key-id` header, it must match the
861
+ # bucket's default customer managed key (using key ID or ARN, not
862
+ # alias). Your SSE-KMS configuration can only support 1 [customer
863
+ # managed key][2] per directory bucket's lifetime. The [Amazon Web
864
+ # Services managed key][3] (`aws/s3`) isn't supported. Incorrect key
865
+ # specification results in an HTTP `400 Bad Request` error.
852
866
  #
853
867
  #
854
868
  #
@@ -1055,6 +1069,9 @@ module Aws::S3
1055
1069
  # request_payer: "requester", # accepts requester
1056
1070
  # bypass_governance_retention: false,
1057
1071
  # expected_bucket_owner: "AccountId",
1072
+ # if_match: "IfMatch",
1073
+ # if_match_last_modified_time: Time.now,
1074
+ # if_match_size: 1,
1058
1075
  # })
1059
1076
  # @param [Hash] options ({})
1060
1077
  # @option options [String] :mfa
@@ -1101,6 +1118,46 @@ module Aws::S3
1101
1118
  # The account ID of the expected bucket owner. If the account ID that
1102
1119
  # you provide does not match the actual owner of the bucket, the request
1103
1120
  # fails with the HTTP status code `403 Forbidden` (access denied).
1121
+ # @option options [String] :if_match
1122
+ # The `If-Match` header field makes the request method conditional on
1123
+ # ETags. If the ETag value does not match, the operation returns a `412
1124
+ # Precondition Failed` error. If the ETag matches or if the object
1125
+ # doesn't exist, the operation will return a `204 Success (No Content)
1126
+ # response`.
1127
+ #
1128
+ # For more information about conditional requests, see [RFC 7232][1].
1129
+ #
1130
+ # <note markdown="1"> This functionality is only supported for directory buckets.
1131
+ #
1132
+ # </note>
1133
+ #
1134
+ #
1135
+ #
1136
+ # [1]: https://tools.ietf.org/html/rfc7232
1137
+ # @option options [Time,DateTime,Date,Integer,String] :if_match_last_modified_time
1138
+ # If present, the object is deleted only if its modification times
1139
+ # matches the provided `Timestamp`. If the `Timestamp` values do not
1140
+ # match, the operation returns a `412 Precondition Failed` error. If the
1141
+ # `Timestamp` matches or if the object doesn’t exist, the operation
1142
+ # returns a `204 Success (No Content)` response.
1143
+ #
1144
+ # <note markdown="1"> This functionality is only supported for directory buckets.
1145
+ #
1146
+ # </note>
1147
+ # @option options [Integer] :if_match_size
1148
+ # If present, the object is deleted only if its size matches the
1149
+ # provided size in bytes. If the `Size` value does not match, the
1150
+ # operation returns a `412 Precondition Failed` error. If the `Size`
1151
+ # matches or if the object doesn’t exist, the operation returns a `204
1152
+ # Success (No Content)` response.
1153
+ #
1154
+ # <note markdown="1"> This functionality is only supported for directory buckets.
1155
+ #
1156
+ # </note>
1157
+ #
1158
+ # You can use the `If-Match`, `x-amz-if-match-last-modified-time` and
1159
+ # `x-amz-if-match-size` conditional headers in conjunction with
1160
+ # each-other or individually.
1104
1161
  # @return [Types::DeleteObjectOutput]
1105
1162
  def delete(options = {})
1106
1163
  options = options.merge(
@@ -1357,15 +1414,6 @@ module Aws::S3
1357
1414
  # fails with the HTTP status code `403 Forbidden` (access denied).
1358
1415
  # @option options [String] :checksum_mode
1359
1416
  # To retrieve the checksum, this mode must be enabled.
1360
- #
1361
- # **General purpose buckets** - In addition, if you enable checksum mode
1362
- # and the object is uploaded with a [checksum][1] and encrypted with an
1363
- # Key Management Service (KMS) key, you must have permission to use the
1364
- # `kms:Decrypt` action to retrieve the checksum.
1365
- #
1366
- #
1367
- #
1368
- # [1]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_Checksum.html
1369
1417
  # @return [Types::GetObjectOutput]
1370
1418
  def get(options = {}, &block)
1371
1419
  options = options.merge(
@@ -1410,7 +1458,8 @@ module Aws::S3
1410
1458
  # object_lock_retain_until_date: Time.now,
1411
1459
  # object_lock_legal_hold_status: "ON", # accepts ON, OFF
1412
1460
  # expected_bucket_owner: "AccountId",
1413
- # checksum_algorithm: "CRC32", # accepts CRC32, CRC32C, SHA1, SHA256
1461
+ # checksum_algorithm: "CRC32", # accepts CRC32, CRC32C, SHA1, SHA256, CRC64NVME
1462
+ # checksum_type: "COMPOSITE", # accepts COMPOSITE, FULL_OBJECT
1414
1463
  # })
1415
1464
  # @param [Hash] options ({})
1416
1465
  # @option options [String] :acl
@@ -1825,15 +1874,17 @@ module Aws::S3
1825
1874
  # `x-amz-server-side-encryption-aws-kms-key-id`, Amazon S3 uses the
1826
1875
  # Amazon Web Services managed key (`aws/s3`) to protect the data.
1827
1876
  #
1828
- # **Directory buckets** - If you specify `x-amz-server-side-encryption`
1829
- # with `aws:kms`, you must specify the `
1830
- # x-amz-server-side-encryption-aws-kms-key-id` header with the ID (Key
1831
- # ID or Key ARN) of the KMS symmetric encryption customer managed key to
1832
- # use. Otherwise, you get an HTTP `400 Bad Request` error. Only use the
1833
- # key ID or key ARN. The key alias format of the KMS key isn't
1834
- # supported. Your SSE-KMS configuration can only support 1 [customer
1835
- # managed key][1] per directory bucket for the lifetime of the bucket.
1836
- # [Amazon Web Services managed key][2] (`aws/s3`) isn't supported.
1877
+ # **Directory buckets** - To encrypt data using SSE-KMS, it's
1878
+ # recommended to specify the `x-amz-server-side-encryption` header to
1879
+ # `aws:kms`. Then, the `x-amz-server-side-encryption-aws-kms-key-id`
1880
+ # header implicitly uses the bucket's default KMS customer managed key
1881
+ # ID. If you want to explicitly set the `
1882
+ # x-amz-server-side-encryption-aws-kms-key-id` header, it must match the
1883
+ # bucket's default customer managed key (using key ID or ARN, not
1884
+ # alias). Your SSE-KMS configuration can only support 1 [customer
1885
+ # managed key][1] per directory bucket's lifetime. The [Amazon Web
1886
+ # Services managed key][2] (`aws/s3`) isn't supported. Incorrect key
1887
+ # specification results in an HTTP `400 Bad Request` error.
1837
1888
  #
1838
1889
  #
1839
1890
  #
@@ -1841,7 +1892,7 @@ module Aws::S3
1841
1892
  # [2]: https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#aws-managed-cmk
1842
1893
  # @option options [String] :ssekms_encryption_context
1843
1894
  # Specifies the Amazon Web Services KMS Encryption Context to use for
1844
- # object encryption. The value of this header is a Base64-encoded string
1895
+ # object encryption. The value of this header is a Base64 encoded string
1845
1896
  # of a UTF-8 encoded JSON, which contains the encryption context as
1846
1897
  # key-value pairs.
1847
1898
  #
@@ -1930,6 +1981,14 @@ module Aws::S3
1930
1981
  #
1931
1982
  #
1932
1983
  # [1]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html
1984
+ # @option options [String] :checksum_type
1985
+ # Indicates the checksum type that you want Amazon S3 to use to
1986
+ # calculate the object’s checksum value. For more information, see
1987
+ # [Checking object integrity in the Amazon S3 User Guide][1].
1988
+ #
1989
+ #
1990
+ #
1991
+ # [1]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html
1933
1992
  # @return [MultipartUpload]
1934
1993
  def initiate_multipart_upload(options = {})
1935
1994
  options = options.merge(
@@ -1959,17 +2018,20 @@ module Aws::S3
1959
2018
  # content_length: 1,
1960
2019
  # content_md5: "ContentMD5",
1961
2020
  # content_type: "ContentType",
1962
- # checksum_algorithm: "CRC32", # accepts CRC32, CRC32C, SHA1, SHA256
2021
+ # checksum_algorithm: "CRC32", # accepts CRC32, CRC32C, SHA1, SHA256, CRC64NVME
1963
2022
  # checksum_crc32: "ChecksumCRC32",
1964
2023
  # checksum_crc32c: "ChecksumCRC32C",
2024
+ # checksum_crc64nvme: "ChecksumCRC64NVME",
1965
2025
  # checksum_sha1: "ChecksumSHA1",
1966
2026
  # checksum_sha256: "ChecksumSHA256",
1967
2027
  # expires: Time.now,
2028
+ # if_match: "IfMatch",
1968
2029
  # if_none_match: "IfNoneMatch",
1969
2030
  # grant_full_control: "GrantFullControl",
1970
2031
  # grant_read: "GrantRead",
1971
2032
  # grant_read_acp: "GrantReadACP",
1972
2033
  # grant_write_acp: "GrantWriteACP",
2034
+ # write_offset_bytes: 1,
1973
2035
  # metadata: {
1974
2036
  # "MetadataKey" => "MetadataValue",
1975
2037
  # },
@@ -2065,7 +2127,7 @@ module Aws::S3
2065
2127
  #
2066
2128
  # [1]: https://www.rfc-editor.org/rfc/rfc9110.html#name-content-length
2067
2129
  # @option options [String] :content_md5
2068
- # The base64-encoded 128-bit MD5 digest of the message (without the
2130
+ # The Base64 encoded 128-bit `MD5` digest of the message (without the
2069
2131
  # headers) according to RFC 1864. This header can be used as a message
2070
2132
  # integrity check to verify that the data is the same data that was
2071
2133
  # originally sent. Although it is optional, we recommend using the
@@ -2073,10 +2135,11 @@ module Aws::S3
2073
2135
  # information about REST request authentication, see [REST
2074
2136
  # Authentication][1].
2075
2137
  #
2076
- # <note markdown="1"> The `Content-MD5` header is required for any request to upload an
2077
- # object with a retention period configured using Amazon S3 Object Lock.
2078
- # For more information about Amazon S3 Object Lock, see [Amazon S3
2079
- # Object Lock Overview][2] in the *Amazon S3 User Guide*.
2138
+ # <note markdown="1"> The `Content-MD5` or `x-amz-sdk-checksum-algorithm` header is required
2139
+ # for any request to upload an object with a retention period configured
2140
+ # using Amazon S3 Object Lock. For more information, see [Uploading
2141
+ # objects to an Object Lock enabled bucket ][2] in the *Amazon S3 User
2142
+ # Guide*.
2080
2143
  #
2081
2144
  # </note>
2082
2145
  #
@@ -2087,7 +2150,7 @@ module Aws::S3
2087
2150
  #
2088
2151
  #
2089
2152
  # [1]: https://docs.aws.amazon.com/AmazonS3/latest/dev/RESTAuthentication.html
2090
- # [2]: https://docs.aws.amazon.com/AmazonS3/latest/dev/object-lock-overview.html
2153
+ # [2]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/object-lock-managing.html#object-lock-put-object
2091
2154
  # @option options [String] :content_type
2092
2155
  # A standard MIME type describing the format of the contents. For more
2093
2156
  # information, see
@@ -2107,37 +2170,45 @@ module Aws::S3
2107
2170
  # For the `x-amz-checksum-algorithm ` header, replace ` algorithm ` with
2108
2171
  # the supported algorithm from the following list:
2109
2172
  #
2110
- # * CRC32
2173
+ # * `CRC32`
2111
2174
  #
2112
- # * CRC32C
2175
+ # * `CRC32C`
2113
2176
  #
2114
- # * SHA1
2177
+ # * `CRC64NVME`
2115
2178
  #
2116
- # * SHA256
2179
+ # * `SHA1`
2180
+ #
2181
+ # * `SHA256`
2117
2182
  #
2118
2183
  # For more information, see [Checking object integrity][1] in the
2119
2184
  # *Amazon S3 User Guide*.
2120
2185
  #
2121
2186
  # If the individual checksum value you provide through
2122
2187
  # `x-amz-checksum-algorithm ` doesn't match the checksum algorithm you
2123
- # set through `x-amz-sdk-checksum-algorithm`, Amazon S3 ignores any
2124
- # provided `ChecksumAlgorithm` parameter and uses the checksum algorithm
2125
- # that matches the provided value in `x-amz-checksum-algorithm `.
2188
+ # set through `x-amz-sdk-checksum-algorithm`, Amazon S3 fails the
2189
+ # request with a `BadDigest` error.
2126
2190
  #
2127
- # <note markdown="1"> For directory buckets, when you use Amazon Web Services SDKs, `CRC32`
2128
- # is the default checksum algorithm that's used for performance.
2191
+ # <note markdown="1"> The `Content-MD5` or `x-amz-sdk-checksum-algorithm` header is required
2192
+ # for any request to upload an object with a retention period configured
2193
+ # using Amazon S3 Object Lock. For more information, see [Uploading
2194
+ # objects to an Object Lock enabled bucket ][2] in the *Amazon S3 User
2195
+ # Guide*.
2129
2196
  #
2130
2197
  # </note>
2131
2198
  #
2199
+ # For directory buckets, when you use Amazon Web Services SDKs, `CRC32`
2200
+ # is the default checksum algorithm that's used for performance.
2201
+ #
2132
2202
  #
2133
2203
  #
2134
2204
  # [1]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html
2205
+ # [2]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/object-lock-managing.html#object-lock-put-object
2135
2206
  # @option options [String] :checksum_crc32
2136
2207
  # This header can be used as a data integrity check to verify that the
2137
2208
  # data received is the same data that was originally sent. This header
2138
- # specifies the base64-encoded, 32-bit CRC32 checksum of the object. For
2139
- # more information, see [Checking object integrity][1] in the *Amazon S3
2140
- # User Guide*.
2209
+ # specifies the Base64 encoded, 32-bit `CRC32` checksum of the object.
2210
+ # For more information, see [Checking object integrity][1] in the
2211
+ # *Amazon S3 User Guide*.
2141
2212
  #
2142
2213
  #
2143
2214
  #
@@ -2145,17 +2216,28 @@ module Aws::S3
2145
2216
  # @option options [String] :checksum_crc32c
2146
2217
  # This header can be used as a data integrity check to verify that the
2147
2218
  # data received is the same data that was originally sent. This header
2148
- # specifies the base64-encoded, 32-bit CRC32C checksum of the object.
2219
+ # specifies the Base64 encoded, 32-bit `CRC32C` checksum of the object.
2149
2220
  # For more information, see [Checking object integrity][1] in the
2150
2221
  # *Amazon S3 User Guide*.
2151
2222
  #
2152
2223
  #
2153
2224
  #
2154
2225
  # [1]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html
2226
+ # @option options [String] :checksum_crc64nvme
2227
+ # This header can be used as a data integrity check to verify that the
2228
+ # data received is the same data that was originally sent. This header
2229
+ # specifies the Base64 encoded, 64-bit `CRC64NVME` checksum of the
2230
+ # object. The `CRC64NVME` checksum is always a full object checksum. For
2231
+ # more information, see [Checking object integrity in the Amazon S3 User
2232
+ # Guide][1].
2233
+ #
2234
+ #
2235
+ #
2236
+ # [1]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html
2155
2237
  # @option options [String] :checksum_sha1
2156
2238
  # This header can be used as a data integrity check to verify that the
2157
2239
  # data received is the same data that was originally sent. This header
2158
- # specifies the base64-encoded, 160-bit SHA-1 digest of the object. For
2240
+ # specifies the Base64 encoded, 160-bit `SHA1` digest of the object. For
2159
2241
  # more information, see [Checking object integrity][1] in the *Amazon S3
2160
2242
  # User Guide*.
2161
2243
  #
@@ -2165,7 +2247,7 @@ module Aws::S3
2165
2247
  # @option options [String] :checksum_sha256
2166
2248
  # This header can be used as a data integrity check to verify that the
2167
2249
  # data received is the same data that was originally sent. This header
2168
- # specifies the base64-encoded, 256-bit SHA-256 digest of the object.
2250
+ # specifies the Base64 encoded, 256-bit `SHA256` digest of the object.
2169
2251
  # For more information, see [Checking object integrity][1] in the
2170
2252
  # *Amazon S3 User Guide*.
2171
2253
  #
@@ -2180,6 +2262,25 @@ module Aws::S3
2180
2262
  #
2181
2263
  #
2182
2264
  # [1]: https://www.rfc-editor.org/rfc/rfc7234#section-5.3
2265
+ # @option options [String] :if_match
2266
+ # Uploads the object only if the ETag (entity tag) value provided during
2267
+ # the WRITE operation matches the ETag of the object in S3. If the ETag
2268
+ # values do not match, the operation returns a `412 Precondition Failed`
2269
+ # error.
2270
+ #
2271
+ # If a conflicting operation occurs during the upload S3 returns a `409
2272
+ # ConditionalRequestConflict` response. On a 409 failure you should
2273
+ # fetch the object's ETag and retry the upload.
2274
+ #
2275
+ # Expects the ETag value as a string.
2276
+ #
2277
+ # For more information about conditional requests, see [RFC 7232][1], or
2278
+ # [Conditional requests][2] in the *Amazon S3 User Guide*.
2279
+ #
2280
+ #
2281
+ #
2282
+ # [1]: https://tools.ietf.org/html/rfc7232
2283
+ # [2]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/conditional-requests.html
2183
2284
  # @option options [String] :if_none_match
2184
2285
  # Uploads the object only if the object key name does not already exist
2185
2286
  # in the bucket specified. Otherwise, Amazon S3 returns a `412
@@ -2231,6 +2332,16 @@ module Aws::S3
2231
2332
  # * This functionality is not supported for Amazon S3 on Outposts.
2232
2333
  #
2233
2334
  # </note>
2335
+ # @option options [Integer] :write_offset_bytes
2336
+ # Specifies the offset for appending data to existing objects in bytes.
2337
+ # The offset must be equal to the size of the existing object being
2338
+ # appended to. If no object exists, setting this header to 0 will create
2339
+ # a new object.
2340
+ #
2341
+ # <note markdown="1"> This functionality is only supported for objects in the Amazon S3
2342
+ # Express One Zone storage class in directory buckets.
2343
+ #
2344
+ # </note>
2234
2345
  # @option options [Hash<String,String>] :metadata
2235
2346
  # A map of metadata to store with the object in S3.
2236
2347
  # @option options [String] :server_side_encryption
@@ -2383,15 +2494,17 @@ module Aws::S3
2383
2494
  # `x-amz-server-side-encryption-aws-kms-key-id`, Amazon S3 uses the
2384
2495
  # Amazon Web Services managed key (`aws/s3`) to protect the data.
2385
2496
  #
2386
- # **Directory buckets** - If you specify `x-amz-server-side-encryption`
2387
- # with `aws:kms`, you must specify the `
2388
- # x-amz-server-side-encryption-aws-kms-key-id` header with the ID (Key
2389
- # ID or Key ARN) of the KMS symmetric encryption customer managed key to
2390
- # use. Otherwise, you get an HTTP `400 Bad Request` error. Only use the
2391
- # key ID or key ARN. The key alias format of the KMS key isn't
2392
- # supported. Your SSE-KMS configuration can only support 1 [customer
2393
- # managed key][1] per directory bucket for the lifetime of the bucket.
2394
- # [Amazon Web Services managed key][2] (`aws/s3`) isn't supported.
2497
+ # **Directory buckets** - To encrypt data using SSE-KMS, it's
2498
+ # recommended to specify the `x-amz-server-side-encryption` header to
2499
+ # `aws:kms`. Then, the `x-amz-server-side-encryption-aws-kms-key-id`
2500
+ # header implicitly uses the bucket's default KMS customer managed key
2501
+ # ID. If you want to explicitly set the `
2502
+ # x-amz-server-side-encryption-aws-kms-key-id` header, it must match the
2503
+ # bucket's default customer managed key (using key ID or ARN, not
2504
+ # alias). Your SSE-KMS configuration can only support 1 [customer
2505
+ # managed key][1] per directory bucket's lifetime. The [Amazon Web
2506
+ # Services managed key][2] (`aws/s3`) isn't supported. Incorrect key
2507
+ # specification results in an HTTP `400 Bad Request` error.
2395
2508
  #
2396
2509
  #
2397
2510
  #
@@ -2400,7 +2513,7 @@ module Aws::S3
2400
2513
  # @option options [String] :ssekms_encryption_context
2401
2514
  # Specifies the Amazon Web Services KMS Encryption Context as an
2402
2515
  # additional encryption context to use for object encryption. The value
2403
- # of this header is a Base64-encoded string of a UTF-8 encoded JSON,
2516
+ # of this header is a Base64 encoded string of a UTF-8 encoded JSON,
2404
2517
  # which contains the encryption context as key-value pairs. This value
2405
2518
  # is stored as object metadata and automatically gets passed on to
2406
2519
  # Amazon Web Services KMS for future `GetObject` operations on this
@@ -2595,7 +2708,7 @@ module Aws::S3
2595
2708
  # },
2596
2709
  # },
2597
2710
  # request_payer: "requester", # accepts requester
2598
- # checksum_algorithm: "CRC32", # accepts CRC32, CRC32C, SHA1, SHA256
2711
+ # checksum_algorithm: "CRC32", # accepts CRC32, CRC32C, SHA1, SHA256, CRC64NVME
2599
2712
  # expected_bucket_owner: "AccountId",
2600
2713
  # })
2601
2714
  # @param [Hash] options ({})
@@ -2772,7 +2885,7 @@ module Aws::S3
2772
2885
  # request_payer: "requester", # accepts requester
2773
2886
  # bypass_governance_retention: false,
2774
2887
  # expected_bucket_owner: "AccountId",
2775
- # checksum_algorithm: "CRC32", # accepts CRC32, CRC32C, SHA1, SHA256
2888
+ # checksum_algorithm: "CRC32", # accepts CRC32, CRC32C, SHA1, SHA256, CRC64NVME
2776
2889
  # })
2777
2890
  # @param options ({})
2778
2891
  # @option options [String] :mfa
@@ -2836,22 +2949,23 @@ module Aws::S3
2836
2949
  # For the `x-amz-checksum-algorithm ` header, replace ` algorithm ` with
2837
2950
  # the supported algorithm from the following list:
2838
2951
  #
2839
- # * CRC32
2952
+ # * `CRC32`
2840
2953
  #
2841
- # * CRC32C
2954
+ # * `CRC32C`
2842
2955
  #
2843
- # * SHA1
2956
+ # * `CRC64NVME`
2844
2957
  #
2845
- # * SHA256
2958
+ # * `SHA1`
2959
+ #
2960
+ # * `SHA256`
2846
2961
  #
2847
2962
  # For more information, see [Checking object integrity][1] in the
2848
2963
  # *Amazon S3 User Guide*.
2849
2964
  #
2850
2965
  # If the individual checksum value you provide through
2851
2966
  # `x-amz-checksum-algorithm ` doesn't match the checksum algorithm you
2852
- # set through `x-amz-sdk-checksum-algorithm`, Amazon S3 ignores any
2853
- # provided `ChecksumAlgorithm` parameter and uses the checksum algorithm
2854
- # that matches the provided value in `x-amz-checksum-algorithm `.
2967
+ # set through `x-amz-sdk-checksum-algorithm`, Amazon S3 fails the
2968
+ # request with a `BadDigest` error.
2855
2969
  #
2856
2970
  # If you provide an individual checksum, Amazon S3 ignores any provided
2857
2971
  # `ChecksumAlgorithm` parameter.
@@ -2883,3 +2997,6 @@ module Aws::S3
2883
2997
  end
2884
2998
  end
2885
2999
  end
3000
+
3001
+ # Load customizations if they exist
3002
+ require 'aws-sdk-s3/customizations/object_summary'
@@ -62,6 +62,18 @@ module Aws::S3
62
62
  data[:checksum_algorithm]
63
63
  end
64
64
 
65
+ # The checksum type that is used to calculate the object’s checksum
66
+ # value. For more information, see [Checking object integrity][1] in the
67
+ # *Amazon S3 User Guide*.
68
+ #
69
+ #
70
+ #
71
+ # [1]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html
72
+ # @return [String]
73
+ def checksum_type
74
+ data[:checksum_type]
75
+ end
76
+
65
77
  # Size in bytes of the object.
66
78
  # @return [Integer]
67
79
  def size
@@ -257,6 +269,9 @@ module Aws::S3
257
269
  # request_payer: "requester", # accepts requester
258
270
  # bypass_governance_retention: false,
259
271
  # expected_bucket_owner: "AccountId",
272
+ # if_match: "IfMatch",
273
+ # if_match_last_modified_time: Time.now,
274
+ # if_match_size: 1,
260
275
  # })
261
276
  # @param [Hash] options ({})
262
277
  # @option options [String] :mfa
@@ -296,6 +311,46 @@ module Aws::S3
296
311
  # The account ID of the expected bucket owner. If the account ID that
297
312
  # you provide does not match the actual owner of the bucket, the request
298
313
  # fails with the HTTP status code `403 Forbidden` (access denied).
314
+ # @option options [String] :if_match
315
+ # The `If-Match` header field makes the request method conditional on
316
+ # ETags. If the ETag value does not match, the operation returns a `412
317
+ # Precondition Failed` error. If the ETag matches or if the object
318
+ # doesn't exist, the operation will return a `204 Success (No Content)
319
+ # response`.
320
+ #
321
+ # For more information about conditional requests, see [RFC 7232][1].
322
+ #
323
+ # <note markdown="1"> This functionality is only supported for directory buckets.
324
+ #
325
+ # </note>
326
+ #
327
+ #
328
+ #
329
+ # [1]: https://tools.ietf.org/html/rfc7232
330
+ # @option options [Time,DateTime,Date,Integer,String] :if_match_last_modified_time
331
+ # If present, the object is deleted only if its modification times
332
+ # matches the provided `Timestamp`. If the `Timestamp` values do not
333
+ # match, the operation returns a `412 Precondition Failed` error. If the
334
+ # `Timestamp` matches or if the object doesn’t exist, the operation
335
+ # returns a `204 Success (No Content)` response.
336
+ #
337
+ # <note markdown="1"> This functionality is only supported for directory buckets.
338
+ #
339
+ # </note>
340
+ # @option options [Integer] :if_match_size
341
+ # If present, the object is deleted only if its size matches the
342
+ # provided size in bytes. If the `Size` value does not match, the
343
+ # operation returns a `412 Precondition Failed` error. If the `Size`
344
+ # matches or if the object doesn’t exist, the operation returns a `204
345
+ # Success (No Content)` response.
346
+ #
347
+ # <note markdown="1"> This functionality is only supported for directory buckets.
348
+ #
349
+ # </note>
350
+ #
351
+ # You can use the `If-Match`, `x-amz-if-match-last-modified-time` and
352
+ # `x-amz-if-match-size` conditional headers in conjunction with
353
+ # each-other or individually.
299
354
  # @return [Types::DeleteObjectOutput]
300
355
  def delete(options = {})
301
356
  options = options.merge(
@@ -523,15 +578,6 @@ module Aws::S3
523
578
  # fails with the HTTP status code `403 Forbidden` (access denied).
524
579
  # @option options [String] :checksum_mode
525
580
  # To retrieve the checksum, this mode must be enabled.
526
- #
527
- # **General purpose buckets** - In addition, if you enable checksum mode
528
- # and the object is uploaded with a [checksum][1] and encrypted with an
529
- # Key Management Service (KMS) key, you must have permission to use the
530
- # `kms:Decrypt` action to retrieve the checksum.
531
- #
532
- #
533
- #
534
- # [1]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_Checksum.html
535
581
  # @return [Types::GetObjectOutput]
536
582
  def get(options = {}, &block)
537
583
  options = options.merge(
@@ -805,7 +851,7 @@ module Aws::S3
805
851
  # request_payer: "requester", # accepts requester
806
852
  # bypass_governance_retention: false,
807
853
  # expected_bucket_owner: "AccountId",
808
- # checksum_algorithm: "CRC32", # accepts CRC32, CRC32C, SHA1, SHA256
854
+ # checksum_algorithm: "CRC32", # accepts CRC32, CRC32C, SHA1, SHA256, CRC64NVME
809
855
  # })
810
856
  # @param options ({})
811
857
  # @option options [String] :mfa
@@ -869,22 +915,23 @@ module Aws::S3
869
915
  # For the `x-amz-checksum-algorithm ` header, replace ` algorithm ` with
870
916
  # the supported algorithm from the following list:
871
917
  #
872
- # * CRC32
918
+ # * `CRC32`
873
919
  #
874
- # * CRC32C
920
+ # * `CRC32C`
875
921
  #
876
- # * SHA1
922
+ # * `CRC64NVME`
877
923
  #
878
- # * SHA256
924
+ # * `SHA1`
925
+ #
926
+ # * `SHA256`
879
927
  #
880
928
  # For more information, see [Checking object integrity][1] in the
881
929
  # *Amazon S3 User Guide*.
882
930
  #
883
931
  # If the individual checksum value you provide through
884
932
  # `x-amz-checksum-algorithm ` doesn't match the checksum algorithm you
885
- # set through `x-amz-sdk-checksum-algorithm`, Amazon S3 ignores any
886
- # provided `ChecksumAlgorithm` parameter and uses the checksum algorithm
887
- # that matches the provided value in `x-amz-checksum-algorithm `.
933
+ # set through `x-amz-sdk-checksum-algorithm`, Amazon S3 fails the
934
+ # request with a `BadDigest` error.
888
935
  #
889
936
  # If you provide an individual checksum, Amazon S3 ignores any provided
890
937
  # `ChecksumAlgorithm` parameter.
@@ -917,3 +964,6 @@ module Aws::S3
917
964
  end
918
965
  end
919
966
  end
967
+
968
+ # Load customizations if they exist
969
+ require 'aws-sdk-s3/customizations/object_version'