aws-sdk-s3 1.136.0 → 1.208.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.
- checksums.yaml +4 -4
- data/CHANGELOG.md +452 -1
- data/VERSION +1 -1
- data/lib/aws-sdk-s3/access_grants_credentials.rb +57 -0
- data/lib/aws-sdk-s3/access_grants_credentials_provider.rb +250 -0
- data/lib/aws-sdk-s3/bucket.rb +728 -145
- data/lib/aws-sdk-s3/bucket_acl.rb +19 -18
- data/lib/aws-sdk-s3/bucket_cors.rb +22 -21
- data/lib/aws-sdk-s3/bucket_lifecycle.rb +23 -18
- data/lib/aws-sdk-s3/bucket_lifecycle_configuration.rb +76 -19
- data/lib/aws-sdk-s3/bucket_logging.rb +21 -14
- data/lib/aws-sdk-s3/bucket_notification.rb +6 -6
- data/lib/aws-sdk-s3/bucket_policy.rb +65 -20
- data/lib/aws-sdk-s3/bucket_region_cache.rb +9 -5
- data/lib/aws-sdk-s3/bucket_request_payment.rb +15 -15
- data/lib/aws-sdk-s3/bucket_tagging.rb +19 -19
- data/lib/aws-sdk-s3/bucket_versioning.rb +74 -41
- data/lib/aws-sdk-s3/bucket_website.rb +19 -19
- data/lib/aws-sdk-s3/client.rb +9951 -3365
- data/lib/aws-sdk-s3/client_api.rb +758 -164
- data/lib/aws-sdk-s3/customizations/bucket.rb +1 -1
- data/lib/aws-sdk-s3/customizations/errors.rb +15 -2
- data/lib/aws-sdk-s3/customizations/object.rb +87 -91
- data/lib/aws-sdk-s3/customizations/object_summary.rb +5 -0
- data/lib/aws-sdk-s3/customizations/object_version.rb +13 -0
- data/lib/aws-sdk-s3/customizations.rb +28 -31
- data/lib/aws-sdk-s3/default_executor.rb +103 -0
- data/lib/aws-sdk-s3/encryption/client.rb +4 -4
- data/lib/aws-sdk-s3/encryption/default_cipher_provider.rb +2 -0
- data/lib/aws-sdk-s3/encryption/encrypt_handler.rb +2 -0
- data/lib/aws-sdk-s3/encryption/kms_cipher_provider.rb +4 -2
- data/lib/aws-sdk-s3/encryptionV2/client.rb +100 -25
- data/lib/aws-sdk-s3/encryptionV2/decrypt_handler.rb +7 -162
- data/lib/aws-sdk-s3/encryptionV2/decryption.rb +205 -0
- data/lib/aws-sdk-s3/encryptionV2/default_cipher_provider.rb +17 -0
- data/lib/aws-sdk-s3/encryptionV2/encrypt_handler.rb +2 -0
- data/lib/aws-sdk-s3/encryptionV2/io_encrypter.rb +2 -0
- data/lib/aws-sdk-s3/encryptionV2/kms_cipher_provider.rb +10 -2
- data/lib/aws-sdk-s3/encryptionV2/utils.rb +5 -0
- data/lib/aws-sdk-s3/encryptionV3/client.rb +885 -0
- data/lib/aws-sdk-s3/encryptionV3/decrypt_handler.rb +98 -0
- data/lib/aws-sdk-s3/encryptionV3/decryption.rb +244 -0
- data/lib/aws-sdk-s3/encryptionV3/default_cipher_provider.rb +159 -0
- data/lib/aws-sdk-s3/encryptionV3/default_key_provider.rb +35 -0
- data/lib/aws-sdk-s3/encryptionV3/encrypt_handler.rb +98 -0
- data/lib/aws-sdk-s3/encryptionV3/errors.rb +47 -0
- data/lib/aws-sdk-s3/encryptionV3/io_auth_decrypter.rb +60 -0
- data/lib/aws-sdk-s3/encryptionV3/io_decrypter.rb +35 -0
- data/lib/aws-sdk-s3/encryptionV3/io_encrypter.rb +84 -0
- data/lib/aws-sdk-s3/encryptionV3/key_provider.rb +28 -0
- data/lib/aws-sdk-s3/encryptionV3/kms_cipher_provider.rb +159 -0
- data/lib/aws-sdk-s3/encryptionV3/materials.rb +58 -0
- data/lib/aws-sdk-s3/encryptionV3/utils.rb +321 -0
- data/lib/aws-sdk-s3/encryption_v2.rb +1 -0
- data/lib/aws-sdk-s3/encryption_v3.rb +24 -0
- data/lib/aws-sdk-s3/endpoint_parameters.rb +65 -30
- data/lib/aws-sdk-s3/endpoint_provider.rb +604 -227
- data/lib/aws-sdk-s3/endpoints.rb +655 -1261
- data/lib/aws-sdk-s3/errors.rb +58 -0
- data/lib/aws-sdk-s3/express_credentials.rb +55 -0
- data/lib/aws-sdk-s3/express_credentials_provider.rb +59 -0
- data/lib/aws-sdk-s3/file_downloader.rb +192 -147
- data/lib/aws-sdk-s3/file_uploader.rb +10 -14
- data/lib/aws-sdk-s3/legacy_signer.rb +2 -1
- data/lib/aws-sdk-s3/multipart_download_error.rb +8 -0
- data/lib/aws-sdk-s3/multipart_file_uploader.rb +106 -103
- data/lib/aws-sdk-s3/multipart_stream_uploader.rb +99 -109
- data/lib/aws-sdk-s3/multipart_upload.rb +185 -38
- data/lib/aws-sdk-s3/multipart_upload_error.rb +3 -4
- data/lib/aws-sdk-s3/multipart_upload_part.rb +205 -68
- data/lib/aws-sdk-s3/object.rb +2052 -315
- data/lib/aws-sdk-s3/object_acl.rb +46 -28
- data/lib/aws-sdk-s3/object_copier.rb +1 -1
- data/lib/aws-sdk-s3/object_multipart_copier.rb +12 -9
- data/lib/aws-sdk-s3/object_summary.rb +1778 -262
- data/lib/aws-sdk-s3/object_version.rb +400 -68
- data/lib/aws-sdk-s3/plugins/access_grants.rb +178 -0
- data/lib/aws-sdk-s3/plugins/checksum_algorithm.rb +31 -0
- data/lib/aws-sdk-s3/plugins/endpoints.rb +32 -208
- data/lib/aws-sdk-s3/plugins/express_session_auth.rb +88 -0
- data/lib/aws-sdk-s3/plugins/http_200_errors.rb +55 -18
- data/lib/aws-sdk-s3/plugins/location_constraint.rb +3 -1
- data/lib/aws-sdk-s3/plugins/md5s.rb +10 -70
- data/lib/aws-sdk-s3/plugins/s3_signer.rb +7 -2
- data/lib/aws-sdk-s3/plugins/streaming_retry.rb +5 -7
- data/lib/aws-sdk-s3/plugins/url_encoded_keys.rb +2 -1
- data/lib/aws-sdk-s3/presigner.rb +9 -7
- data/lib/aws-sdk-s3/resource.rb +127 -22
- data/lib/aws-sdk-s3/transfer_manager.rb +303 -0
- data/lib/aws-sdk-s3/types.rb +8065 -1783
- data/lib/aws-sdk-s3.rb +35 -31
- data/sig/bucket.rbs +231 -0
- data/sig/bucket_acl.rbs +78 -0
- data/sig/bucket_cors.rbs +69 -0
- data/sig/bucket_lifecycle.rbs +88 -0
- data/sig/bucket_lifecycle_configuration.rbs +115 -0
- data/sig/bucket_logging.rbs +76 -0
- data/sig/bucket_notification.rbs +114 -0
- data/sig/bucket_policy.rbs +59 -0
- data/sig/bucket_request_payment.rbs +54 -0
- data/sig/bucket_tagging.rbs +65 -0
- data/sig/bucket_versioning.rbs +77 -0
- data/sig/bucket_website.rbs +93 -0
- data/sig/client.rbs +2612 -0
- data/sig/customizations/bucket.rbs +19 -0
- data/sig/customizations/object.rbs +38 -0
- data/sig/customizations/object_summary.rbs +35 -0
- data/sig/errors.rbs +44 -0
- data/sig/multipart_upload.rbs +120 -0
- data/sig/multipart_upload_part.rbs +109 -0
- data/sig/object.rbs +464 -0
- data/sig/object_acl.rbs +86 -0
- data/sig/object_summary.rbs +347 -0
- data/sig/object_version.rbs +143 -0
- data/sig/resource.rbs +141 -0
- data/sig/types.rbs +2899 -0
- data/sig/waiters.rbs +95 -0
- metadata +61 -12
- data/lib/aws-sdk-s3/plugins/skip_whole_multipart_get_checksums.rb +0 -31
data/lib/aws-sdk-s3/object.rb
CHANGED
|
@@ -45,6 +45,10 @@ module Aws::S3
|
|
|
45
45
|
# Specifies whether the object retrieved was (true) or was not (false) a
|
|
46
46
|
# Delete Marker. If false, this response header does not appear in the
|
|
47
47
|
# response.
|
|
48
|
+
#
|
|
49
|
+
# <note markdown="1"> This functionality is not supported for directory buckets.
|
|
50
|
+
#
|
|
51
|
+
# </note>
|
|
48
52
|
# @return [Boolean]
|
|
49
53
|
def delete_marker
|
|
50
54
|
data[:delete_marker]
|
|
@@ -56,10 +60,21 @@ module Aws::S3
|
|
|
56
60
|
data[:accept_ranges]
|
|
57
61
|
end
|
|
58
62
|
|
|
59
|
-
# If the object expiration is configured (see
|
|
60
|
-
#
|
|
61
|
-
# `rule-id` key-value pairs
|
|
62
|
-
# value of the `rule-id` is
|
|
63
|
+
# If the object expiration is configured (see [
|
|
64
|
+
# `PutBucketLifecycleConfiguration` ][1]), the response includes this
|
|
65
|
+
# header. It includes the `expiry-date` and `rule-id` key-value pairs
|
|
66
|
+
# providing object expiration information. The value of the `rule-id` is
|
|
67
|
+
# URL-encoded.
|
|
68
|
+
#
|
|
69
|
+
# <note markdown="1"> Object expiration information is not returned in directory buckets and
|
|
70
|
+
# this header returns the value "`NotImplemented`" in all responses
|
|
71
|
+
# for directory buckets.
|
|
72
|
+
#
|
|
73
|
+
# </note>
|
|
74
|
+
#
|
|
75
|
+
#
|
|
76
|
+
#
|
|
77
|
+
# [1]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketLifecycleConfiguration.html
|
|
63
78
|
# @return [String]
|
|
64
79
|
def expiration
|
|
65
80
|
data[:expiration]
|
|
@@ -82,6 +97,13 @@ module Aws::S3
|
|
|
82
97
|
# For more information about archiving objects, see [Transitioning
|
|
83
98
|
# Objects: General Considerations][2].
|
|
84
99
|
#
|
|
100
|
+
# <note markdown="1"> This functionality is not supported for directory buckets. Directory
|
|
101
|
+
# buckets only support `EXPRESS_ONEZONE` (the S3 Express One Zone
|
|
102
|
+
# storage class) in Availability Zones and `ONEZONE_IA` (the S3 One
|
|
103
|
+
# Zone-Infrequent Access storage class) in Dedicated Local Zones.
|
|
104
|
+
#
|
|
105
|
+
# </note>
|
|
106
|
+
#
|
|
85
107
|
#
|
|
86
108
|
#
|
|
87
109
|
# [1]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_RestoreObject.html
|
|
@@ -92,12 +114,16 @@ module Aws::S3
|
|
|
92
114
|
end
|
|
93
115
|
|
|
94
116
|
# The archive state of the head object.
|
|
117
|
+
#
|
|
118
|
+
# <note markdown="1"> This functionality is not supported for directory buckets.
|
|
119
|
+
#
|
|
120
|
+
# </note>
|
|
95
121
|
# @return [String]
|
|
96
122
|
def archive_status
|
|
97
123
|
data[:archive_status]
|
|
98
124
|
end
|
|
99
125
|
|
|
100
|
-
#
|
|
126
|
+
# Date and time when the object was last modified.
|
|
101
127
|
# @return [Time]
|
|
102
128
|
def last_modified
|
|
103
129
|
data[:last_modified]
|
|
@@ -109,11 +135,14 @@ module Aws::S3
|
|
|
109
135
|
data[:content_length]
|
|
110
136
|
end
|
|
111
137
|
|
|
112
|
-
# The
|
|
113
|
-
# only
|
|
114
|
-
#
|
|
115
|
-
#
|
|
116
|
-
#
|
|
138
|
+
# The Base64 encoded, 32-bit `CRC32 checksum` of the object. This
|
|
139
|
+
# checksum is only present if the checksum was uploaded with the object.
|
|
140
|
+
# When you use an API operation on an object that was uploaded using
|
|
141
|
+
# multipart uploads, this value may not be a direct checksum value of
|
|
142
|
+
# the full object. Instead, it's a calculation based on the checksum
|
|
143
|
+
# values of each individual part. For more information about how
|
|
144
|
+
# checksums are calculated with multipart uploads, see [ Checking object
|
|
145
|
+
# integrity][1] in the *Amazon S3 User Guide*.
|
|
117
146
|
#
|
|
118
147
|
#
|
|
119
148
|
#
|
|
@@ -123,11 +152,14 @@ module Aws::S3
|
|
|
123
152
|
data[:checksum_crc32]
|
|
124
153
|
end
|
|
125
154
|
|
|
126
|
-
# The
|
|
127
|
-
# only
|
|
128
|
-
#
|
|
129
|
-
#
|
|
130
|
-
#
|
|
155
|
+
# The Base64 encoded, 32-bit `CRC32C` checksum of the object. This
|
|
156
|
+
# checksum is only present if the checksum was uploaded with the object.
|
|
157
|
+
# When you use an API operation on an object that was uploaded using
|
|
158
|
+
# multipart uploads, this value may not be a direct checksum value of
|
|
159
|
+
# the full object. Instead, it's a calculation based on the checksum
|
|
160
|
+
# values of each individual part. For more information about how
|
|
161
|
+
# checksums are calculated with multipart uploads, see [ Checking object
|
|
162
|
+
# integrity][1] in the *Amazon S3 User Guide*.
|
|
131
163
|
#
|
|
132
164
|
#
|
|
133
165
|
#
|
|
@@ -137,11 +169,26 @@ module Aws::S3
|
|
|
137
169
|
data[:checksum_crc32c]
|
|
138
170
|
end
|
|
139
171
|
|
|
140
|
-
# The
|
|
141
|
-
#
|
|
142
|
-
#
|
|
143
|
-
#
|
|
144
|
-
#
|
|
172
|
+
# The Base64 encoded, 64-bit `CRC64NVME` checksum of the object. For
|
|
173
|
+
# more information, see [Checking object integrity in the Amazon S3 User
|
|
174
|
+
# Guide][1].
|
|
175
|
+
#
|
|
176
|
+
#
|
|
177
|
+
#
|
|
178
|
+
# [1]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html
|
|
179
|
+
# @return [String]
|
|
180
|
+
def checksum_crc64nvme
|
|
181
|
+
data[:checksum_crc64nvme]
|
|
182
|
+
end
|
|
183
|
+
|
|
184
|
+
# The Base64 encoded, 160-bit `SHA1` digest of the object. This checksum
|
|
185
|
+
# is only present if the checksum was uploaded with the object. When you
|
|
186
|
+
# use the API operation on an object that was uploaded using multipart
|
|
187
|
+
# uploads, this value may not be a direct checksum value of the full
|
|
188
|
+
# object. Instead, it's a calculation based on the checksum values of
|
|
189
|
+
# each individual part. For more information about how checksums are
|
|
190
|
+
# calculated with multipart uploads, see [ Checking object integrity][1]
|
|
191
|
+
# in the *Amazon S3 User Guide*.
|
|
145
192
|
#
|
|
146
193
|
#
|
|
147
194
|
#
|
|
@@ -151,11 +198,14 @@ module Aws::S3
|
|
|
151
198
|
data[:checksum_sha1]
|
|
152
199
|
end
|
|
153
200
|
|
|
154
|
-
# The
|
|
155
|
-
# only
|
|
156
|
-
#
|
|
157
|
-
#
|
|
158
|
-
#
|
|
201
|
+
# The Base64 encoded, 256-bit `SHA256` digest of the object. This
|
|
202
|
+
# checksum is only present if the checksum was uploaded with the object.
|
|
203
|
+
# When you use an API operation on an object that was uploaded using
|
|
204
|
+
# multipart uploads, this value may not be a direct checksum value of
|
|
205
|
+
# the full object. Instead, it's a calculation based on the checksum
|
|
206
|
+
# values of each individual part. For more information about how
|
|
207
|
+
# checksums are calculated with multipart uploads, see [ Checking object
|
|
208
|
+
# integrity][1] in the *Amazon S3 User Guide*.
|
|
159
209
|
#
|
|
160
210
|
#
|
|
161
211
|
#
|
|
@@ -165,6 +215,21 @@ module Aws::S3
|
|
|
165
215
|
data[:checksum_sha256]
|
|
166
216
|
end
|
|
167
217
|
|
|
218
|
+
# The checksum type, which determines how part-level checksums are
|
|
219
|
+
# combined to create an object-level checksum for multipart objects. You
|
|
220
|
+
# can use this header response to verify that the checksum type that is
|
|
221
|
+
# received is the same checksum type that was specified in
|
|
222
|
+
# `CreateMultipartUpload` request. For more information, see [Checking
|
|
223
|
+
# object integrity in the Amazon S3 User Guide][1].
|
|
224
|
+
#
|
|
225
|
+
#
|
|
226
|
+
#
|
|
227
|
+
# [1]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html
|
|
228
|
+
# @return [String]
|
|
229
|
+
def checksum_type
|
|
230
|
+
data[:checksum_type]
|
|
231
|
+
end
|
|
232
|
+
|
|
168
233
|
# An entity tag (ETag) is an opaque identifier assigned by a web server
|
|
169
234
|
# to a specific version of a resource found at a URL.
|
|
170
235
|
# @return [String]
|
|
@@ -177,12 +242,20 @@ module Aws::S3
|
|
|
177
242
|
# API like SOAP that supports more flexible metadata than the REST API.
|
|
178
243
|
# For example, using SOAP, you can create metadata whose values are not
|
|
179
244
|
# legal HTTP headers.
|
|
245
|
+
#
|
|
246
|
+
# <note markdown="1"> This functionality is not supported for directory buckets.
|
|
247
|
+
#
|
|
248
|
+
# </note>
|
|
180
249
|
# @return [Integer]
|
|
181
250
|
def missing_meta
|
|
182
251
|
data[:missing_meta]
|
|
183
252
|
end
|
|
184
253
|
|
|
185
|
-
# Version of the object.
|
|
254
|
+
# Version ID of the object.
|
|
255
|
+
#
|
|
256
|
+
# <note markdown="1"> This functionality is not supported for directory buckets.
|
|
257
|
+
#
|
|
258
|
+
# </note>
|
|
186
259
|
# @return [String]
|
|
187
260
|
def version_id
|
|
188
261
|
data[:version_id]
|
|
@@ -200,7 +273,7 @@ module Aws::S3
|
|
|
200
273
|
data[:content_disposition]
|
|
201
274
|
end
|
|
202
275
|
|
|
203
|
-
#
|
|
276
|
+
# Indicates what content encodings have been applied to the object and
|
|
204
277
|
# thus what decoding mechanisms must be applied to obtain the media-type
|
|
205
278
|
# referenced by the Content-Type header field.
|
|
206
279
|
# @return [String]
|
|
@@ -220,6 +293,13 @@ module Aws::S3
|
|
|
220
293
|
data[:content_type]
|
|
221
294
|
end
|
|
222
295
|
|
|
296
|
+
# The portion of the object returned in the response for a `GET`
|
|
297
|
+
# request.
|
|
298
|
+
# @return [String]
|
|
299
|
+
def content_range
|
|
300
|
+
data[:content_range]
|
|
301
|
+
end
|
|
302
|
+
|
|
223
303
|
# The date and time at which the object is no longer cacheable.
|
|
224
304
|
# @return [Time]
|
|
225
305
|
def expires
|
|
@@ -234,13 +314,22 @@ module Aws::S3
|
|
|
234
314
|
# If the bucket is configured as a website, redirects requests for this
|
|
235
315
|
# object to another object in the same bucket or to an external URL.
|
|
236
316
|
# Amazon S3 stores the value of this header in the object metadata.
|
|
317
|
+
#
|
|
318
|
+
# <note markdown="1"> This functionality is not supported for directory buckets.
|
|
319
|
+
#
|
|
320
|
+
# </note>
|
|
237
321
|
# @return [String]
|
|
238
322
|
def website_redirect_location
|
|
239
323
|
data[:website_redirect_location]
|
|
240
324
|
end
|
|
241
325
|
|
|
242
|
-
# The server-side encryption algorithm used when
|
|
243
|
-
# Amazon S3
|
|
326
|
+
# The server-side encryption algorithm used when you store this object
|
|
327
|
+
# in Amazon S3 or Amazon FSx.
|
|
328
|
+
#
|
|
329
|
+
# <note markdown="1"> When accessing data stored in Amazon FSx file systems using S3 access
|
|
330
|
+
# points, the only valid server side encryption option is `aws:fsx`.
|
|
331
|
+
#
|
|
332
|
+
# </note>
|
|
244
333
|
# @return [String]
|
|
245
334
|
def server_side_encryption
|
|
246
335
|
data[:server_side_encryption]
|
|
@@ -253,25 +342,32 @@ module Aws::S3
|
|
|
253
342
|
end
|
|
254
343
|
|
|
255
344
|
# If server-side encryption with a customer-provided encryption key was
|
|
256
|
-
# requested, the response will include this header
|
|
257
|
-
# encryption algorithm used.
|
|
345
|
+
# requested, the response will include this header to confirm the
|
|
346
|
+
# encryption algorithm that's used.
|
|
347
|
+
#
|
|
348
|
+
# <note markdown="1"> This functionality is not supported for directory buckets.
|
|
349
|
+
#
|
|
350
|
+
# </note>
|
|
258
351
|
# @return [String]
|
|
259
352
|
def sse_customer_algorithm
|
|
260
353
|
data[:sse_customer_algorithm]
|
|
261
354
|
end
|
|
262
355
|
|
|
263
356
|
# If server-side encryption with a customer-provided encryption key was
|
|
264
|
-
# requested, the response will include this header to provide
|
|
265
|
-
# message integrity verification of the customer-provided
|
|
266
|
-
# key.
|
|
357
|
+
# requested, the response will include this header to provide the
|
|
358
|
+
# round-trip message integrity verification of the customer-provided
|
|
359
|
+
# encryption key.
|
|
360
|
+
#
|
|
361
|
+
# <note markdown="1"> This functionality is not supported for directory buckets.
|
|
362
|
+
#
|
|
363
|
+
# </note>
|
|
267
364
|
# @return [String]
|
|
268
365
|
def sse_customer_key_md5
|
|
269
366
|
data[:sse_customer_key_md5]
|
|
270
367
|
end
|
|
271
368
|
|
|
272
|
-
# If present,
|
|
273
|
-
#
|
|
274
|
-
# object.
|
|
369
|
+
# If present, indicates the ID of the KMS key that was used for object
|
|
370
|
+
# encryption.
|
|
275
371
|
# @return [String]
|
|
276
372
|
def ssekms_key_id
|
|
277
373
|
data[:ssekms_key_id]
|
|
@@ -290,6 +386,13 @@ module Aws::S3
|
|
|
290
386
|
#
|
|
291
387
|
# For more information, see [Storage Classes][1].
|
|
292
388
|
#
|
|
389
|
+
# <note markdown="1"> <b>Directory buckets </b> - Directory buckets only support
|
|
390
|
+
# `EXPRESS_ONEZONE` (the S3 Express One Zone storage class) in
|
|
391
|
+
# Availability Zones and `ONEZONE_IA` (the S3 One Zone-Infrequent Access
|
|
392
|
+
# storage class) in Dedicated Local Zones.
|
|
393
|
+
#
|
|
394
|
+
# </note>
|
|
395
|
+
#
|
|
293
396
|
#
|
|
294
397
|
#
|
|
295
398
|
# [1]: https://docs.aws.amazon.com/AmazonS3/latest/dev/storage-class-intro.html
|
|
@@ -299,7 +402,17 @@ module Aws::S3
|
|
|
299
402
|
end
|
|
300
403
|
|
|
301
404
|
# If present, indicates that the requester was successfully charged for
|
|
302
|
-
# the request.
|
|
405
|
+
# the request. For more information, see [Using Requester Pays buckets
|
|
406
|
+
# for storage transfers and usage][1] in the *Amazon Simple Storage
|
|
407
|
+
# Service user guide*.
|
|
408
|
+
#
|
|
409
|
+
# <note markdown="1"> This functionality is not supported for directory buckets.
|
|
410
|
+
#
|
|
411
|
+
# </note>
|
|
412
|
+
#
|
|
413
|
+
#
|
|
414
|
+
#
|
|
415
|
+
# [1]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/RequesterPaysBuckets.html
|
|
303
416
|
# @return [String]
|
|
304
417
|
def request_charged
|
|
305
418
|
data[:request_charged]
|
|
@@ -342,6 +455,10 @@ module Aws::S3
|
|
|
342
455
|
#
|
|
343
456
|
# For more information, see [Replication][1].
|
|
344
457
|
#
|
|
458
|
+
# <note markdown="1"> This functionality is not supported for directory buckets.
|
|
459
|
+
#
|
|
460
|
+
# </note>
|
|
461
|
+
#
|
|
345
462
|
#
|
|
346
463
|
#
|
|
347
464
|
# [1]: https://docs.aws.amazon.com/AmazonS3/latest/dev/NotificationHowTo.html
|
|
@@ -358,11 +475,33 @@ module Aws::S3
|
|
|
358
475
|
data[:parts_count]
|
|
359
476
|
end
|
|
360
477
|
|
|
478
|
+
# The number of tags, if any, on the object, when you have the relevant
|
|
479
|
+
# permission to read object tags.
|
|
480
|
+
#
|
|
481
|
+
# You can use [GetObjectTagging][1] to retrieve the tag set associated
|
|
482
|
+
# with an object.
|
|
483
|
+
#
|
|
484
|
+
# <note markdown="1"> This functionality is not supported for directory buckets.
|
|
485
|
+
#
|
|
486
|
+
# </note>
|
|
487
|
+
#
|
|
488
|
+
#
|
|
489
|
+
#
|
|
490
|
+
# [1]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetObjectTagging.html
|
|
491
|
+
# @return [Integer]
|
|
492
|
+
def tag_count
|
|
493
|
+
data[:tag_count]
|
|
494
|
+
end
|
|
495
|
+
|
|
361
496
|
# The Object Lock mode, if any, that's in effect for this object. This
|
|
362
497
|
# header is only returned if the requester has the
|
|
363
498
|
# `s3:GetObjectRetention` permission. For more information about S3
|
|
364
499
|
# Object Lock, see [Object Lock][1].
|
|
365
500
|
#
|
|
501
|
+
# <note markdown="1"> This functionality is not supported for directory buckets.
|
|
502
|
+
#
|
|
503
|
+
# </note>
|
|
504
|
+
#
|
|
366
505
|
#
|
|
367
506
|
#
|
|
368
507
|
# [1]: https://docs.aws.amazon.com/AmazonS3/latest/dev/object-lock.html
|
|
@@ -374,6 +513,10 @@ module Aws::S3
|
|
|
374
513
|
# The date and time when the Object Lock retention period expires. This
|
|
375
514
|
# header is only returned if the requester has the
|
|
376
515
|
# `s3:GetObjectRetention` permission.
|
|
516
|
+
#
|
|
517
|
+
# <note markdown="1"> This functionality is not supported for directory buckets.
|
|
518
|
+
#
|
|
519
|
+
# </note>
|
|
377
520
|
# @return [Time]
|
|
378
521
|
def object_lock_retain_until_date
|
|
379
522
|
data[:object_lock_retain_until_date]
|
|
@@ -385,6 +528,10 @@ module Aws::S3
|
|
|
385
528
|
# specified version of this object has never had a legal hold applied.
|
|
386
529
|
# For more information about S3 Object Lock, see [Object Lock][1].
|
|
387
530
|
#
|
|
531
|
+
# <note markdown="1"> This functionality is not supported for directory buckets.
|
|
532
|
+
#
|
|
533
|
+
# </note>
|
|
534
|
+
#
|
|
388
535
|
#
|
|
389
536
|
#
|
|
390
537
|
# [1]: https://docs.aws.amazon.com/AmazonS3/latest/dev/object-lock.html
|
|
@@ -407,7 +554,7 @@ module Aws::S3
|
|
|
407
554
|
#
|
|
408
555
|
# @return [self]
|
|
409
556
|
def load
|
|
410
|
-
resp = Aws::Plugins::UserAgent.
|
|
557
|
+
resp = Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
|
|
411
558
|
@client.head_object(
|
|
412
559
|
bucket: @bucket_name,
|
|
413
560
|
key: @key
|
|
@@ -457,7 +604,7 @@ module Aws::S3
|
|
|
457
604
|
options, params = separate_params_and_options(options)
|
|
458
605
|
waiter = Waiters::ObjectExists.new(options)
|
|
459
606
|
yield_waiter_and_warn(waiter, &block) if block_given?
|
|
460
|
-
Aws::Plugins::UserAgent.
|
|
607
|
+
Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
|
|
461
608
|
waiter.wait(params.merge(bucket: @bucket_name,
|
|
462
609
|
key: @key))
|
|
463
610
|
end
|
|
@@ -478,7 +625,7 @@ module Aws::S3
|
|
|
478
625
|
options, params = separate_params_and_options(options)
|
|
479
626
|
waiter = Waiters::ObjectNotExists.new(options)
|
|
480
627
|
yield_waiter_and_warn(waiter, &block) if block_given?
|
|
481
|
-
Aws::Plugins::UserAgent.
|
|
628
|
+
Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
|
|
482
629
|
waiter.wait(params.merge(bucket: @bucket_name,
|
|
483
630
|
key: @key))
|
|
484
631
|
end
|
|
@@ -583,7 +730,7 @@ module Aws::S3
|
|
|
583
730
|
:retry
|
|
584
731
|
end
|
|
585
732
|
end
|
|
586
|
-
Aws::Plugins::UserAgent.
|
|
733
|
+
Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
|
|
587
734
|
Aws::Waiters::Waiter.new(options).wait({})
|
|
588
735
|
end
|
|
589
736
|
end
|
|
@@ -595,7 +742,7 @@ module Aws::S3
|
|
|
595
742
|
# object.copy_from({
|
|
596
743
|
# acl: "private", # accepts private, public-read, public-read-write, authenticated-read, aws-exec-read, bucket-owner-read, bucket-owner-full-control
|
|
597
744
|
# cache_control: "CacheControl",
|
|
598
|
-
# checksum_algorithm: "CRC32", # accepts CRC32, CRC32C, SHA1, SHA256
|
|
745
|
+
# checksum_algorithm: "CRC32", # accepts CRC32, CRC32C, SHA1, SHA256, CRC64NVME
|
|
599
746
|
# content_disposition: "ContentDisposition",
|
|
600
747
|
# content_encoding: "ContentEncoding",
|
|
601
748
|
# content_language: "ContentLanguage",
|
|
@@ -610,13 +757,15 @@ module Aws::S3
|
|
|
610
757
|
# grant_read: "GrantRead",
|
|
611
758
|
# grant_read_acp: "GrantReadACP",
|
|
612
759
|
# grant_write_acp: "GrantWriteACP",
|
|
760
|
+
# if_match: "IfMatch",
|
|
761
|
+
# if_none_match: "IfNoneMatch",
|
|
613
762
|
# metadata: {
|
|
614
763
|
# "MetadataKey" => "MetadataValue",
|
|
615
764
|
# },
|
|
616
765
|
# metadata_directive: "COPY", # accepts COPY, REPLACE
|
|
617
766
|
# tagging_directive: "COPY", # accepts COPY, REPLACE
|
|
618
|
-
# server_side_encryption: "AES256", # accepts AES256, aws:kms, aws:kms:dsse
|
|
619
|
-
# storage_class: "STANDARD", # accepts STANDARD, REDUCED_REDUNDANCY, STANDARD_IA, ONEZONE_IA, INTELLIGENT_TIERING, GLACIER, DEEP_ARCHIVE, OUTPOSTS, GLACIER_IR, SNOW
|
|
767
|
+
# server_side_encryption: "AES256", # accepts AES256, aws:fsx, aws:kms, aws:kms:dsse
|
|
768
|
+
# storage_class: "STANDARD", # accepts STANDARD, REDUCED_REDUNDANCY, STANDARD_IA, ONEZONE_IA, INTELLIGENT_TIERING, GLACIER, DEEP_ARCHIVE, OUTPOSTS, GLACIER_IR, SNOW, EXPRESS_ONEZONE, FSX_OPENZFS, FSX_ONTAP
|
|
620
769
|
# website_redirect_location: "WebsiteRedirectLocation",
|
|
621
770
|
# sse_customer_algorithm: "SSECustomerAlgorithm",
|
|
622
771
|
# sse_customer_key: "SSECustomerKey",
|
|
@@ -637,40 +786,98 @@ module Aws::S3
|
|
|
637
786
|
# })
|
|
638
787
|
# @param [Hash] options ({})
|
|
639
788
|
# @option options [String] :acl
|
|
640
|
-
# The canned ACL to apply to the object.
|
|
789
|
+
# The canned access control list (ACL) to apply to the object.
|
|
790
|
+
#
|
|
791
|
+
# When you copy an object, the ACL metadata is not preserved and is set
|
|
792
|
+
# to `private` by default. Only the owner has full access control. To
|
|
793
|
+
# override the default ACL setting, specify a new ACL when you generate
|
|
794
|
+
# a copy request. For more information, see [Using ACLs][1].
|
|
795
|
+
#
|
|
796
|
+
# If the destination bucket that you're copying objects to uses the
|
|
797
|
+
# bucket owner enforced setting for S3 Object Ownership, ACLs are
|
|
798
|
+
# disabled and no longer affect permissions. Buckets that use this
|
|
799
|
+
# setting only accept `PUT` requests that don't specify an ACL or `PUT`
|
|
800
|
+
# requests that specify bucket owner full control ACLs, such as the
|
|
801
|
+
# `bucket-owner-full-control` canned ACL or an equivalent form of this
|
|
802
|
+
# ACL expressed in the XML format. For more information, see
|
|
803
|
+
# [Controlling ownership of objects and disabling ACLs][2] in the
|
|
804
|
+
# *Amazon S3 User Guide*.
|
|
805
|
+
#
|
|
806
|
+
# <note markdown="1"> * If your destination bucket uses the bucket owner enforced setting
|
|
807
|
+
# for Object Ownership, all objects written to the bucket by any
|
|
808
|
+
# account will be owned by the bucket owner.
|
|
809
|
+
#
|
|
810
|
+
# * This functionality is not supported for directory buckets.
|
|
811
|
+
#
|
|
812
|
+
# * This functionality is not supported for Amazon S3 on Outposts.
|
|
813
|
+
#
|
|
814
|
+
# </note>
|
|
815
|
+
#
|
|
816
|
+
#
|
|
641
817
|
#
|
|
642
|
-
#
|
|
818
|
+
# [1]: https://docs.aws.amazon.com/AmazonS3/latest/dev/S3_ACLs_UsingACLs.html
|
|
819
|
+
# [2]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/about-object-ownership.html
|
|
643
820
|
# @option options [String] :cache_control
|
|
644
|
-
# Specifies caching behavior along the request/reply chain.
|
|
821
|
+
# Specifies the caching behavior along the request/reply chain.
|
|
645
822
|
# @option options [String] :checksum_algorithm
|
|
646
|
-
# Indicates the algorithm you want Amazon S3 to use to create the
|
|
823
|
+
# Indicates the algorithm that you want Amazon S3 to use to create the
|
|
647
824
|
# checksum for the object. For more information, see [Checking object
|
|
648
825
|
# integrity][1] in the *Amazon S3 User Guide*.
|
|
649
826
|
#
|
|
827
|
+
# When you copy an object, if the source object has a checksum, that
|
|
828
|
+
# checksum value will be copied to the new object by default. If the
|
|
829
|
+
# `CopyObject` request does not include this `x-amz-checksum-algorithm`
|
|
830
|
+
# header, the checksum algorithm will be copied from the source object
|
|
831
|
+
# to the destination object (if it's present on the source object). You
|
|
832
|
+
# can optionally specify a different checksum algorithm to use with the
|
|
833
|
+
# `x-amz-checksum-algorithm` header. Unrecognized or unsupported values
|
|
834
|
+
# will respond with the HTTP status code `400 Bad Request`.
|
|
835
|
+
#
|
|
836
|
+
# <note markdown="1"> For directory buckets, when you use Amazon Web Services SDKs, `CRC32`
|
|
837
|
+
# is the default checksum algorithm that's used for performance.
|
|
838
|
+
#
|
|
839
|
+
# </note>
|
|
840
|
+
#
|
|
650
841
|
#
|
|
651
842
|
#
|
|
652
843
|
# [1]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html
|
|
653
844
|
# @option options [String] :content_disposition
|
|
654
|
-
# Specifies presentational information for the object.
|
|
845
|
+
# Specifies presentational information for the object. Indicates whether
|
|
846
|
+
# an object should be displayed in a web browser or downloaded as a
|
|
847
|
+
# file. It allows specifying the desired filename for the downloaded
|
|
848
|
+
# file.
|
|
655
849
|
# @option options [String] :content_encoding
|
|
656
850
|
# Specifies what content encodings have been applied to the object and
|
|
657
851
|
# thus what decoding mechanisms must be applied to obtain the media-type
|
|
658
852
|
# referenced by the Content-Type header field.
|
|
853
|
+
#
|
|
854
|
+
# <note markdown="1"> For directory buckets, only the `aws-chunked` value is supported in
|
|
855
|
+
# this header field.
|
|
856
|
+
#
|
|
857
|
+
# </note>
|
|
659
858
|
# @option options [String] :content_language
|
|
660
859
|
# The language the content is in.
|
|
661
860
|
# @option options [String] :content_type
|
|
662
|
-
# A standard MIME type
|
|
861
|
+
# A standard MIME type that describes the format of the object data.
|
|
663
862
|
# @option options [required, String] :copy_source
|
|
664
|
-
# Specifies the source object for the copy operation.
|
|
665
|
-
#
|
|
666
|
-
# the
|
|
863
|
+
# Specifies the source object for the copy operation. The source object
|
|
864
|
+
# can be up to 5 GB. If the source object is an object that was uploaded
|
|
865
|
+
# by using a multipart upload, the object copy will be a single part
|
|
866
|
+
# object after the source object is copied to the destination bucket.
|
|
867
|
+
#
|
|
868
|
+
# You specify the value of the copy source in one of two formats,
|
|
869
|
+
# depending on whether you want to access the source object through an
|
|
870
|
+
# [access point][1]:
|
|
667
871
|
#
|
|
668
872
|
# * For objects not accessed through an access point, specify the name
|
|
669
873
|
# of the source bucket and the key of the source object, separated by
|
|
670
874
|
# a slash (/). For example, to copy the object `reports/january.pdf`
|
|
671
|
-
# from the bucket `awsexamplebucket`, use
|
|
875
|
+
# from the general purpose bucket `awsexamplebucket`, use
|
|
672
876
|
# `awsexamplebucket/reports/january.pdf`. The value must be
|
|
673
|
-
# URL-encoded.
|
|
877
|
+
# URL-encoded. To copy the object `reports/january.pdf` from the
|
|
878
|
+
# directory bucket `awsexamplebucket--use1-az5--x-s3`, use
|
|
879
|
+
# `awsexamplebucket--use1-az5--x-s3/reports/january.pdf`. The value
|
|
880
|
+
# must be URL-encoded.
|
|
674
881
|
#
|
|
675
882
|
# * For objects accessed through access points, specify the Amazon
|
|
676
883
|
# Resource Name (ARN) of the object as accessed through the access
|
|
@@ -682,9 +889,11 @@ module Aws::S3
|
|
|
682
889
|
# `arn:aws:s3:us-west-2:123456789012:accesspoint/my-access-point/object/reports/january.pdf`.
|
|
683
890
|
# The value must be URL encoded.
|
|
684
891
|
#
|
|
685
|
-
# <note markdown="1"> Amazon S3 supports copy operations using
|
|
686
|
-
#
|
|
687
|
-
#
|
|
892
|
+
# <note markdown="1"> * Amazon S3 supports copy operations using Access points only when
|
|
893
|
+
# the source and destination buckets are in the same Amazon Web
|
|
894
|
+
# Services Region.
|
|
895
|
+
#
|
|
896
|
+
# * Access points are not supported by directory buckets.
|
|
688
897
|
#
|
|
689
898
|
# </note>
|
|
690
899
|
#
|
|
@@ -697,159 +906,603 @@ module Aws::S3
|
|
|
697
906
|
# `arn:aws:s3-outposts:us-west-2:123456789012:outpost/my-outpost/object/reports/january.pdf`.
|
|
698
907
|
# The value must be URL-encoded.
|
|
699
908
|
#
|
|
700
|
-
#
|
|
701
|
-
#
|
|
909
|
+
# If your source bucket versioning is enabled, the `x-amz-copy-source`
|
|
910
|
+
# header by default identifies the current version of an object to copy.
|
|
911
|
+
# If the current version is a delete marker, Amazon S3 behaves as if the
|
|
912
|
+
# object was deleted. To copy a different version, use the `versionId`
|
|
913
|
+
# query parameter. Specifically, append `?versionId=<version-id>` to the
|
|
914
|
+
# value (for example,
|
|
702
915
|
# `awsexamplebucket/reports/january.pdf?versionId=QUpfdndhfd8438MNFDN93jdnJFkdmqnh893`).
|
|
703
916
|
# If you don't specify a version ID, Amazon S3 copies the latest
|
|
704
917
|
# version of the source object.
|
|
705
918
|
#
|
|
919
|
+
# If you enable versioning on the destination bucket, Amazon S3
|
|
920
|
+
# generates a unique version ID for the copied object. This version ID
|
|
921
|
+
# is different from the version ID of the source object. Amazon S3
|
|
922
|
+
# returns the version ID of the copied object in the `x-amz-version-id`
|
|
923
|
+
# response header in the response.
|
|
924
|
+
#
|
|
925
|
+
# If you do not enable versioning or suspend it on the destination
|
|
926
|
+
# bucket, the version ID that Amazon S3 generates in the
|
|
927
|
+
# `x-amz-version-id` response header is always null.
|
|
928
|
+
#
|
|
929
|
+
# <note markdown="1"> **Directory buckets** - S3 Versioning isn't enabled and supported for
|
|
930
|
+
# directory buckets.
|
|
931
|
+
#
|
|
932
|
+
# </note>
|
|
933
|
+
#
|
|
706
934
|
#
|
|
707
935
|
#
|
|
708
936
|
# [1]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/access-points.html
|
|
709
937
|
# @option options [String] :copy_source_if_match
|
|
710
938
|
# Copies the object if its entity tag (ETag) matches the specified tag.
|
|
939
|
+
#
|
|
940
|
+
# If both the `x-amz-copy-source-if-match` and
|
|
941
|
+
# `x-amz-copy-source-if-unmodified-since` headers are present in the
|
|
942
|
+
# request and evaluate as follows, Amazon S3 returns `200 OK` and copies
|
|
943
|
+
# the data:
|
|
944
|
+
#
|
|
945
|
+
# * `x-amz-copy-source-if-match` condition evaluates to true
|
|
946
|
+
#
|
|
947
|
+
# * `x-amz-copy-source-if-unmodified-since` condition evaluates to false
|
|
711
948
|
# @option options [Time,DateTime,Date,Integer,String] :copy_source_if_modified_since
|
|
712
949
|
# Copies the object if it has been modified since the specified time.
|
|
950
|
+
#
|
|
951
|
+
# If both the `x-amz-copy-source-if-none-match` and
|
|
952
|
+
# `x-amz-copy-source-if-modified-since` headers are present in the
|
|
953
|
+
# request and evaluate as follows, Amazon S3 returns the `412
|
|
954
|
+
# Precondition Failed` response code:
|
|
955
|
+
#
|
|
956
|
+
# * `x-amz-copy-source-if-none-match` condition evaluates to false
|
|
957
|
+
#
|
|
958
|
+
# * `x-amz-copy-source-if-modified-since` condition evaluates to true
|
|
713
959
|
# @option options [String] :copy_source_if_none_match
|
|
714
960
|
# Copies the object if its entity tag (ETag) is different than the
|
|
715
961
|
# specified ETag.
|
|
962
|
+
#
|
|
963
|
+
# If both the `x-amz-copy-source-if-none-match` and
|
|
964
|
+
# `x-amz-copy-source-if-modified-since` headers are present in the
|
|
965
|
+
# request and evaluate as follows, Amazon S3 returns the `412
|
|
966
|
+
# Precondition Failed` response code:
|
|
967
|
+
#
|
|
968
|
+
# * `x-amz-copy-source-if-none-match` condition evaluates to false
|
|
969
|
+
#
|
|
970
|
+
# * `x-amz-copy-source-if-modified-since` condition evaluates to true
|
|
716
971
|
# @option options [Time,DateTime,Date,Integer,String] :copy_source_if_unmodified_since
|
|
717
972
|
# Copies the object if it hasn't been modified since the specified
|
|
718
973
|
# time.
|
|
974
|
+
#
|
|
975
|
+
# If both the `x-amz-copy-source-if-match` and
|
|
976
|
+
# `x-amz-copy-source-if-unmodified-since` headers are present in the
|
|
977
|
+
# request and evaluate as follows, Amazon S3 returns `200 OK` and copies
|
|
978
|
+
# the data:
|
|
979
|
+
#
|
|
980
|
+
# * `x-amz-copy-source-if-match` condition evaluates to true
|
|
981
|
+
#
|
|
982
|
+
# * `x-amz-copy-source-if-unmodified-since` condition evaluates to false
|
|
719
983
|
# @option options [Time,DateTime,Date,Integer,String] :expires
|
|
720
984
|
# The date and time at which the object is no longer cacheable.
|
|
721
985
|
# @option options [String] :grant_full_control
|
|
722
986
|
# Gives the grantee READ, READ\_ACP, and WRITE\_ACP permissions on the
|
|
723
987
|
# object.
|
|
724
988
|
#
|
|
725
|
-
# This
|
|
989
|
+
# <note markdown="1"> * This functionality is not supported for directory buckets.
|
|
990
|
+
#
|
|
991
|
+
# * This functionality is not supported for Amazon S3 on Outposts.
|
|
992
|
+
#
|
|
993
|
+
# </note>
|
|
726
994
|
# @option options [String] :grant_read
|
|
727
995
|
# Allows grantee to read the object data and its metadata.
|
|
728
996
|
#
|
|
729
|
-
# This
|
|
997
|
+
# <note markdown="1"> * This functionality is not supported for directory buckets.
|
|
998
|
+
#
|
|
999
|
+
# * This functionality is not supported for Amazon S3 on Outposts.
|
|
1000
|
+
#
|
|
1001
|
+
# </note>
|
|
730
1002
|
# @option options [String] :grant_read_acp
|
|
731
1003
|
# Allows grantee to read the object ACL.
|
|
732
1004
|
#
|
|
733
|
-
# This
|
|
1005
|
+
# <note markdown="1"> * This functionality is not supported for directory buckets.
|
|
1006
|
+
#
|
|
1007
|
+
# * This functionality is not supported for Amazon S3 on Outposts.
|
|
1008
|
+
#
|
|
1009
|
+
# </note>
|
|
734
1010
|
# @option options [String] :grant_write_acp
|
|
735
1011
|
# Allows grantee to write the ACL for the applicable object.
|
|
736
1012
|
#
|
|
737
|
-
# This
|
|
1013
|
+
# <note markdown="1"> * This functionality is not supported for directory buckets.
|
|
1014
|
+
#
|
|
1015
|
+
# * This functionality is not supported for Amazon S3 on Outposts.
|
|
1016
|
+
#
|
|
1017
|
+
# </note>
|
|
1018
|
+
# @option options [String] :if_match
|
|
1019
|
+
# Copies the object if the entity tag (ETag) of the destination object
|
|
1020
|
+
# matches the specified tag. If the ETag values do not match, the
|
|
1021
|
+
# operation returns a `412 Precondition Failed` error. If a concurrent
|
|
1022
|
+
# operation occurs during the upload S3 returns a `409
|
|
1023
|
+
# ConditionalRequestConflict` response. On a 409 failure you should
|
|
1024
|
+
# fetch the object's ETag and retry the upload.
|
|
1025
|
+
#
|
|
1026
|
+
# Expects the ETag value as a string.
|
|
1027
|
+
#
|
|
1028
|
+
# For more information about conditional requests, see [RFC 7232][1].
|
|
1029
|
+
#
|
|
1030
|
+
#
|
|
1031
|
+
#
|
|
1032
|
+
# [1]: https://tools.ietf.org/html/rfc7232
|
|
1033
|
+
# @option options [String] :if_none_match
|
|
1034
|
+
# Copies the object only if the object key name at the destination does
|
|
1035
|
+
# not already exist in the bucket specified. Otherwise, Amazon S3
|
|
1036
|
+
# returns a `412 Precondition Failed` error. If a concurrent operation
|
|
1037
|
+
# occurs during the upload S3 returns a `409 ConditionalRequestConflict`
|
|
1038
|
+
# response. On a 409 failure you should retry the upload.
|
|
1039
|
+
#
|
|
1040
|
+
# Expects the '*' (asterisk) character.
|
|
1041
|
+
#
|
|
1042
|
+
# For more information about conditional requests, see [RFC 7232][1].
|
|
1043
|
+
#
|
|
1044
|
+
#
|
|
1045
|
+
#
|
|
1046
|
+
# [1]: https://tools.ietf.org/html/rfc7232
|
|
738
1047
|
# @option options [Hash<String,String>] :metadata
|
|
739
1048
|
# A map of metadata to store with the object in S3.
|
|
740
1049
|
# @option options [String] :metadata_directive
|
|
741
1050
|
# Specifies whether the metadata is copied from the source object or
|
|
742
|
-
# replaced with metadata provided in the request.
|
|
1051
|
+
# replaced with metadata that's provided in the request. When copying
|
|
1052
|
+
# an object, you can preserve all metadata (the default) or specify new
|
|
1053
|
+
# metadata. If this header isn’t specified, `COPY` is the default
|
|
1054
|
+
# behavior.
|
|
1055
|
+
#
|
|
1056
|
+
# **General purpose bucket** - For general purpose buckets, when you
|
|
1057
|
+
# grant permissions, you can use the `s3:x-amz-metadata-directive`
|
|
1058
|
+
# condition key to enforce certain metadata behavior when objects are
|
|
1059
|
+
# uploaded. For more information, see [Amazon S3 condition key
|
|
1060
|
+
# examples][1] in the *Amazon S3 User Guide*.
|
|
1061
|
+
#
|
|
1062
|
+
# <note markdown="1"> `x-amz-website-redirect-location` is unique to each object and is not
|
|
1063
|
+
# copied when using the `x-amz-metadata-directive` header. To copy the
|
|
1064
|
+
# value, you must specify `x-amz-website-redirect-location` in the
|
|
1065
|
+
# request header.
|
|
1066
|
+
#
|
|
1067
|
+
# </note>
|
|
1068
|
+
#
|
|
1069
|
+
#
|
|
1070
|
+
#
|
|
1071
|
+
# [1]: https://docs.aws.amazon.com/AmazonS3/latest/dev/amazon-s3-policy-keys.html
|
|
743
1072
|
# @option options [String] :tagging_directive
|
|
744
|
-
# Specifies whether the object tag-set
|
|
745
|
-
# or replaced with tag-set provided in the request.
|
|
1073
|
+
# Specifies whether the object tag-set is copied from the source object
|
|
1074
|
+
# or replaced with the tag-set that's provided in the request.
|
|
1075
|
+
#
|
|
1076
|
+
# The default value is `COPY`.
|
|
1077
|
+
#
|
|
1078
|
+
# <note markdown="1"> **Directory buckets** - For directory buckets in a `CopyObject`
|
|
1079
|
+
# operation, only the empty tag-set is supported. Any requests that
|
|
1080
|
+
# attempt to write non-empty tags into directory buckets will receive a
|
|
1081
|
+
# `501 Not Implemented` status code. When the destination bucket is a
|
|
1082
|
+
# directory bucket, you will receive a `501 Not Implemented` response in
|
|
1083
|
+
# any of the following situations:
|
|
1084
|
+
#
|
|
1085
|
+
# * When you attempt to `COPY` the tag-set from an S3 source object that
|
|
1086
|
+
# has non-empty tags.
|
|
1087
|
+
#
|
|
1088
|
+
# * When you attempt to `REPLACE` the tag-set of a source object and set
|
|
1089
|
+
# a non-empty value to `x-amz-tagging`.
|
|
1090
|
+
#
|
|
1091
|
+
# * When you don't set the `x-amz-tagging-directive` header and the
|
|
1092
|
+
# source object has non-empty tags. This is because the default value
|
|
1093
|
+
# of `x-amz-tagging-directive` is `COPY`.
|
|
1094
|
+
#
|
|
1095
|
+
# Because only the empty tag-set is supported for directory buckets in a
|
|
1096
|
+
# `CopyObject` operation, the following situations are allowed:
|
|
1097
|
+
#
|
|
1098
|
+
# * When you attempt to `COPY` the tag-set from a directory bucket
|
|
1099
|
+
# source object that has no tags to a general purpose bucket. It
|
|
1100
|
+
# copies an empty tag-set to the destination object.
|
|
1101
|
+
#
|
|
1102
|
+
# * When you attempt to `REPLACE` the tag-set of a directory bucket
|
|
1103
|
+
# source object and set the `x-amz-tagging` value of the directory
|
|
1104
|
+
# bucket destination object to empty.
|
|
1105
|
+
#
|
|
1106
|
+
# * When you attempt to `REPLACE` the tag-set of a general purpose
|
|
1107
|
+
# bucket source object that has non-empty tags and set the
|
|
1108
|
+
# `x-amz-tagging` value of the directory bucket destination object to
|
|
1109
|
+
# empty.
|
|
1110
|
+
#
|
|
1111
|
+
# * When you attempt to `REPLACE` the tag-set of a directory bucket
|
|
1112
|
+
# source object and don't set the `x-amz-tagging` value of the
|
|
1113
|
+
# directory bucket destination object. This is because the default
|
|
1114
|
+
# value of `x-amz-tagging` is the empty value.
|
|
1115
|
+
#
|
|
1116
|
+
# </note>
|
|
746
1117
|
# @option options [String] :server_side_encryption
|
|
747
1118
|
# The server-side encryption algorithm used when storing this object in
|
|
748
|
-
# Amazon S3
|
|
1119
|
+
# Amazon S3. Unrecognized or unsupported values won’t write a
|
|
1120
|
+
# destination object and will receive a `400 Bad Request` response.
|
|
1121
|
+
#
|
|
1122
|
+
# Amazon S3 automatically encrypts all new objects that are copied to an
|
|
1123
|
+
# S3 bucket. When copying an object, if you don't specify encryption
|
|
1124
|
+
# information in your copy request, the encryption setting of the target
|
|
1125
|
+
# object is set to the default encryption configuration of the
|
|
1126
|
+
# destination bucket. By default, all buckets have a base level of
|
|
1127
|
+
# encryption configuration that uses server-side encryption with Amazon
|
|
1128
|
+
# S3 managed keys (SSE-S3). If the destination bucket has a different
|
|
1129
|
+
# default encryption configuration, Amazon S3 uses the corresponding
|
|
1130
|
+
# encryption key to encrypt the target object copy.
|
|
1131
|
+
#
|
|
1132
|
+
# With server-side encryption, Amazon S3 encrypts your data as it writes
|
|
1133
|
+
# your data to disks in its data centers and decrypts the data when you
|
|
1134
|
+
# access it. For more information about server-side encryption, see
|
|
1135
|
+
# [Using Server-Side Encryption][1] in the *Amazon S3 User Guide*.
|
|
1136
|
+
#
|
|
1137
|
+
# <b>General purpose buckets </b>
|
|
1138
|
+
#
|
|
1139
|
+
# * For general purpose buckets, there are the following supported
|
|
1140
|
+
# options for server-side encryption: server-side encryption with Key
|
|
1141
|
+
# Management Service (KMS) keys (SSE-KMS), dual-layer server-side
|
|
1142
|
+
# encryption with Amazon Web Services KMS keys (DSSE-KMS), and
|
|
1143
|
+
# server-side encryption with customer-provided encryption keys
|
|
1144
|
+
# (SSE-C). Amazon S3 uses the corresponding KMS key, or a
|
|
1145
|
+
# customer-provided key to encrypt the target object copy.
|
|
1146
|
+
#
|
|
1147
|
+
# * When you perform a `CopyObject` operation, if you want to use a
|
|
1148
|
+
# different type of encryption setting for the target object, you can
|
|
1149
|
+
# specify appropriate encryption-related headers to encrypt the target
|
|
1150
|
+
# object with an Amazon S3 managed key, a KMS key, or a
|
|
1151
|
+
# customer-provided key. If the encryption setting in your request is
|
|
1152
|
+
# different from the default encryption configuration of the
|
|
1153
|
+
# destination bucket, the encryption setting in your request takes
|
|
1154
|
+
# precedence.
|
|
1155
|
+
#
|
|
1156
|
+
# <b>Directory buckets </b>
|
|
1157
|
+
#
|
|
1158
|
+
# * For directory buckets, there are only two supported options for
|
|
1159
|
+
# server-side encryption: server-side encryption with Amazon S3
|
|
1160
|
+
# managed keys (SSE-S3) (`AES256`) and server-side encryption with KMS
|
|
1161
|
+
# keys (SSE-KMS) (`aws:kms`). We recommend that the bucket's default
|
|
1162
|
+
# encryption uses the desired encryption configuration and you don't
|
|
1163
|
+
# override the bucket default encryption in your `CreateSession`
|
|
1164
|
+
# requests or `PUT` object requests. Then, new objects are
|
|
1165
|
+
# automatically encrypted with the desired encryption settings. For
|
|
1166
|
+
# more information, see [Protecting data with server-side
|
|
1167
|
+
# encryption][2] in the *Amazon S3 User Guide*. For more information
|
|
1168
|
+
# about the encryption overriding behaviors in directory buckets, see
|
|
1169
|
+
# [Specifying server-side encryption with KMS for new object
|
|
1170
|
+
# uploads][3].
|
|
1171
|
+
#
|
|
1172
|
+
# * To encrypt new object copies to a directory bucket with SSE-KMS, we
|
|
1173
|
+
# recommend you specify SSE-KMS as the directory bucket's default
|
|
1174
|
+
# encryption configuration with a KMS key (specifically, a [customer
|
|
1175
|
+
# managed key][4]). The [Amazon Web Services managed key][5]
|
|
1176
|
+
# (`aws/s3`) isn't supported. Your SSE-KMS configuration can only
|
|
1177
|
+
# support 1 [customer managed key][4] per directory bucket for the
|
|
1178
|
+
# lifetime of the bucket. After you specify a customer managed key for
|
|
1179
|
+
# SSE-KMS, you can't override the customer managed key for the
|
|
1180
|
+
# bucket's SSE-KMS configuration. Then, when you perform a
|
|
1181
|
+
# `CopyObject` operation and want to specify server-side encryption
|
|
1182
|
+
# settings for new object copies with SSE-KMS in the
|
|
1183
|
+
# encryption-related request headers, you must ensure the encryption
|
|
1184
|
+
# key is the same customer managed key that you specified for the
|
|
1185
|
+
# directory bucket's default encryption configuration.
|
|
1186
|
+
#
|
|
1187
|
+
# * <b>S3 access points for Amazon FSx </b> - When accessing data stored
|
|
1188
|
+
# in Amazon FSx file systems using S3 access points, the only valid
|
|
1189
|
+
# server side encryption option is `aws:fsx`. All Amazon FSx file
|
|
1190
|
+
# systems have encryption configured by default and are encrypted at
|
|
1191
|
+
# rest. Data is automatically encrypted before being written to the
|
|
1192
|
+
# file system, and automatically decrypted as it is read. These
|
|
1193
|
+
# processes are handled transparently by Amazon FSx.
|
|
1194
|
+
#
|
|
1195
|
+
#
|
|
1196
|
+
#
|
|
1197
|
+
# [1]: https://docs.aws.amazon.com/AmazonS3/latest/dev/serv-side-encryption.html
|
|
1198
|
+
# [2]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-express-serv-side-encryption.html
|
|
1199
|
+
# [3]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-express-specifying-kms-encryption.html
|
|
1200
|
+
# [4]: https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#customer-cmk
|
|
1201
|
+
# [5]: https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#aws-managed-cmk
|
|
749
1202
|
# @option options [String] :storage_class
|
|
750
1203
|
# If the `x-amz-storage-class` header is not used, the copied object
|
|
751
|
-
# will be stored in the STANDARD Storage Class by default. The
|
|
752
|
-
# storage class provides high durability and high
|
|
753
|
-
# Depending on performance needs, you can specify a
|
|
754
|
-
#
|
|
755
|
-
#
|
|
756
|
-
#
|
|
1204
|
+
# will be stored in the `STANDARD` Storage Class by default. The
|
|
1205
|
+
# `STANDARD` storage class provides high durability and high
|
|
1206
|
+
# availability. Depending on performance needs, you can specify a
|
|
1207
|
+
# different Storage Class.
|
|
1208
|
+
#
|
|
1209
|
+
# <note markdown="1"> * <b>Directory buckets </b> - Directory buckets only support
|
|
1210
|
+
# `EXPRESS_ONEZONE` (the S3 Express One Zone storage class) in
|
|
1211
|
+
# Availability Zones and `ONEZONE_IA` (the S3 One Zone-Infrequent
|
|
1212
|
+
# Access storage class) in Dedicated Local Zones. Unsupported storage
|
|
1213
|
+
# class values won't write a destination object and will respond with
|
|
1214
|
+
# the HTTP status code `400 Bad Request`.
|
|
1215
|
+
#
|
|
1216
|
+
# * <b>Amazon S3 on Outposts </b> - S3 on Outposts only uses the
|
|
1217
|
+
# `OUTPOSTS` Storage Class.
|
|
1218
|
+
#
|
|
1219
|
+
# </note>
|
|
1220
|
+
#
|
|
1221
|
+
# You can use the `CopyObject` action to change the storage class of an
|
|
1222
|
+
# object that is already stored in Amazon S3 by using the
|
|
1223
|
+
# `x-amz-storage-class` header. For more information, see [Storage
|
|
1224
|
+
# Classes][1] in the *Amazon S3 User Guide*.
|
|
1225
|
+
#
|
|
1226
|
+
# Before using an object as a source object for the copy operation, you
|
|
1227
|
+
# must restore a copy of it if it meets any of the following conditions:
|
|
1228
|
+
#
|
|
1229
|
+
# * The storage class of the source object is `GLACIER` or
|
|
1230
|
+
# `DEEP_ARCHIVE`.
|
|
1231
|
+
#
|
|
1232
|
+
# * The storage class of the source object is `INTELLIGENT_TIERING` and
|
|
1233
|
+
# it's [S3 Intelligent-Tiering access tier][2] is `Archive Access` or
|
|
1234
|
+
# `Deep Archive Access`.
|
|
1235
|
+
#
|
|
1236
|
+
# For more information, see [RestoreObject][3] and [Copying Objects][4]
|
|
1237
|
+
# in the *Amazon S3 User Guide*.
|
|
757
1238
|
#
|
|
758
1239
|
#
|
|
759
1240
|
#
|
|
760
1241
|
# [1]: https://docs.aws.amazon.com/AmazonS3/latest/dev/storage-class-intro.html
|
|
1242
|
+
# [2]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/intelligent-tiering-overview.html#intel-tiering-tier-definition
|
|
1243
|
+
# [3]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_RestoreObject.html
|
|
1244
|
+
# [4]: https://docs.aws.amazon.com/AmazonS3/latest/dev/CopyingObjectsExamples.html
|
|
761
1245
|
# @option options [String] :website_redirect_location
|
|
762
|
-
# If the bucket is configured as a website, redirects
|
|
763
|
-
# object to another object in the same bucket or
|
|
764
|
-
# Amazon S3 stores the value of this header in the
|
|
765
|
-
# value is unique to each object and is not copied
|
|
766
|
-
# `x-amz-metadata-directive` header. Instead, you may opt
|
|
767
|
-
# this header in combination with the
|
|
1246
|
+
# If the destination bucket is configured as a website, redirects
|
|
1247
|
+
# requests for this object copy to another object in the same bucket or
|
|
1248
|
+
# to an external URL. Amazon S3 stores the value of this header in the
|
|
1249
|
+
# object metadata. This value is unique to each object and is not copied
|
|
1250
|
+
# when using the `x-amz-metadata-directive` header. Instead, you may opt
|
|
1251
|
+
# to provide this header in combination with the
|
|
1252
|
+
# `x-amz-metadata-directive` header.
|
|
1253
|
+
#
|
|
1254
|
+
# <note markdown="1"> This functionality is not supported for directory buckets.
|
|
1255
|
+
#
|
|
1256
|
+
# </note>
|
|
768
1257
|
# @option options [String] :sse_customer_algorithm
|
|
769
|
-
# Specifies the algorithm to use
|
|
770
|
-
# example, AES256).
|
|
1258
|
+
# Specifies the algorithm to use when encrypting the object (for
|
|
1259
|
+
# example, `AES256`).
|
|
1260
|
+
#
|
|
1261
|
+
# When you perform a `CopyObject` operation, if you want to use a
|
|
1262
|
+
# different type of encryption setting for the target object, you can
|
|
1263
|
+
# specify appropriate encryption-related headers to encrypt the target
|
|
1264
|
+
# object with an Amazon S3 managed key, a KMS key, or a
|
|
1265
|
+
# customer-provided key. If the encryption setting in your request is
|
|
1266
|
+
# different from the default encryption configuration of the destination
|
|
1267
|
+
# bucket, the encryption setting in your request takes precedence.
|
|
1268
|
+
#
|
|
1269
|
+
# <note markdown="1"> This functionality is not supported when the destination bucket is a
|
|
1270
|
+
# directory bucket.
|
|
1271
|
+
#
|
|
1272
|
+
# </note>
|
|
771
1273
|
# @option options [String] :sse_customer_key
|
|
772
1274
|
# Specifies the customer-provided encryption key for Amazon S3 to use in
|
|
773
1275
|
# encrypting data. This value is used to store the object and then it is
|
|
774
|
-
# discarded
|
|
1276
|
+
# discarded. Amazon S3 does not store the encryption key. The key must
|
|
775
1277
|
# be appropriate for use with the algorithm specified in the
|
|
776
1278
|
# `x-amz-server-side-encryption-customer-algorithm` header.
|
|
1279
|
+
#
|
|
1280
|
+
# <note markdown="1"> This functionality is not supported when the destination bucket is a
|
|
1281
|
+
# directory bucket.
|
|
1282
|
+
#
|
|
1283
|
+
# </note>
|
|
777
1284
|
# @option options [String] :sse_customer_key_md5
|
|
778
1285
|
# Specifies the 128-bit MD5 digest of the encryption key according to
|
|
779
1286
|
# RFC 1321. Amazon S3 uses this header for a message integrity check to
|
|
780
1287
|
# ensure that the encryption key was transmitted without error.
|
|
1288
|
+
#
|
|
1289
|
+
# <note markdown="1"> This functionality is not supported when the destination bucket is a
|
|
1290
|
+
# directory bucket.
|
|
1291
|
+
#
|
|
1292
|
+
# </note>
|
|
781
1293
|
# @option options [String] :ssekms_key_id
|
|
782
|
-
# Specifies the KMS ID (Key ID, Key ARN, or Key Alias) to use for
|
|
783
|
-
# encryption. All GET and PUT requests for an object protected by
|
|
784
|
-
# will fail if they're not made via SSL or using SigV4. For
|
|
785
|
-
# about configuring any of the officially supported Amazon
|
|
786
|
-
# SDKs and Amazon Web Services CLI, see [Specifying the
|
|
787
|
-
# Version in Request Authentication][1] in the *Amazon S3 User
|
|
1294
|
+
# Specifies the KMS key ID (Key ID, Key ARN, or Key Alias) to use for
|
|
1295
|
+
# object encryption. All GET and PUT requests for an object protected by
|
|
1296
|
+
# KMS will fail if they're not made via SSL or using SigV4. For
|
|
1297
|
+
# information about configuring any of the officially supported Amazon
|
|
1298
|
+
# Web Services SDKs and Amazon Web Services CLI, see [Specifying the
|
|
1299
|
+
# Signature Version in Request Authentication][1] in the *Amazon S3 User
|
|
1300
|
+
# Guide*.
|
|
1301
|
+
#
|
|
1302
|
+
# **Directory buckets** - To encrypt data using SSE-KMS, it's
|
|
1303
|
+
# recommended to specify the `x-amz-server-side-encryption` header to
|
|
1304
|
+
# `aws:kms`. Then, the `x-amz-server-side-encryption-aws-kms-key-id`
|
|
1305
|
+
# header implicitly uses the bucket's default KMS customer managed key
|
|
1306
|
+
# ID. If you want to explicitly set the `
|
|
1307
|
+
# x-amz-server-side-encryption-aws-kms-key-id` header, it must match the
|
|
1308
|
+
# bucket's default customer managed key (using key ID or ARN, not
|
|
1309
|
+
# alias). Your SSE-KMS configuration can only support 1 [customer
|
|
1310
|
+
# managed key][2] per directory bucket's lifetime. The [Amazon Web
|
|
1311
|
+
# Services managed key][3] (`aws/s3`) isn't supported. Incorrect key
|
|
1312
|
+
# specification results in an HTTP `400 Bad Request` error.
|
|
788
1313
|
#
|
|
789
1314
|
#
|
|
790
1315
|
#
|
|
791
1316
|
# [1]: https://docs.aws.amazon.com/AmazonS3/latest/dev/UsingAWSSDK.html#specify-signature-version
|
|
1317
|
+
# [2]: https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#customer-cmk
|
|
1318
|
+
# [3]: https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#aws-managed-cmk
|
|
792
1319
|
# @option options [String] :ssekms_encryption_context
|
|
793
|
-
# Specifies the Amazon Web Services KMS Encryption Context
|
|
794
|
-
#
|
|
795
|
-
#
|
|
1320
|
+
# Specifies the Amazon Web Services KMS Encryption Context as an
|
|
1321
|
+
# additional encryption context to use for the destination object
|
|
1322
|
+
# encryption. The value of this header is a base64-encoded UTF-8 string
|
|
1323
|
+
# holding JSON with the encryption context key-value pairs.
|
|
1324
|
+
#
|
|
1325
|
+
# **General purpose buckets** - This value must be explicitly added to
|
|
1326
|
+
# specify encryption context for `CopyObject` requests if you want an
|
|
1327
|
+
# additional encryption context for your destination object. The
|
|
1328
|
+
# additional encryption context of the source object won't be copied to
|
|
1329
|
+
# the destination object. For more information, see [Encryption
|
|
1330
|
+
# context][1] in the *Amazon S3 User Guide*.
|
|
1331
|
+
#
|
|
1332
|
+
# **Directory buckets** - You can optionally provide an explicit
|
|
1333
|
+
# encryption context value. The value must match the default encryption
|
|
1334
|
+
# context - the bucket Amazon Resource Name (ARN). An additional
|
|
1335
|
+
# encryption context value is not supported.
|
|
1336
|
+
#
|
|
1337
|
+
#
|
|
1338
|
+
#
|
|
1339
|
+
# [1]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/UsingKMSEncryption.html#encryption-context
|
|
796
1340
|
# @option options [Boolean] :bucket_key_enabled
|
|
797
1341
|
# Specifies whether Amazon S3 should use an S3 Bucket Key for object
|
|
798
1342
|
# encryption with server-side encryption using Key Management Service
|
|
799
|
-
# (KMS) keys (SSE-KMS).
|
|
800
|
-
#
|
|
1343
|
+
# (KMS) keys (SSE-KMS). If a target object uses SSE-KMS, you can enable
|
|
1344
|
+
# an S3 Bucket Key for the object.
|
|
1345
|
+
#
|
|
1346
|
+
# Setting this header to `true` causes Amazon S3 to use an S3 Bucket Key
|
|
1347
|
+
# for object encryption with SSE-KMS. Specifying this header with a COPY
|
|
1348
|
+
# action doesn’t affect bucket-level settings for S3 Bucket Key.
|
|
1349
|
+
#
|
|
1350
|
+
# For more information, see [Amazon S3 Bucket Keys][1] in the *Amazon S3
|
|
1351
|
+
# User Guide*.
|
|
1352
|
+
#
|
|
1353
|
+
# <note markdown="1"> **Directory buckets** - S3 Bucket Keys aren't supported, when you
|
|
1354
|
+
# copy SSE-KMS encrypted objects from general purpose buckets to
|
|
1355
|
+
# directory buckets, from directory buckets to general purpose buckets,
|
|
1356
|
+
# or between directory buckets, through [CopyObject][2]. In this case,
|
|
1357
|
+
# Amazon S3 makes a call to KMS every time a copy request is made for a
|
|
1358
|
+
# KMS-encrypted object.
|
|
1359
|
+
#
|
|
1360
|
+
# </note>
|
|
801
1361
|
#
|
|
802
|
-
#
|
|
803
|
-
#
|
|
1362
|
+
#
|
|
1363
|
+
#
|
|
1364
|
+
# [1]: https://docs.aws.amazon.com/AmazonS3/latest/dev/bucket-key.html
|
|
1365
|
+
# [2]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_CopyObject.html
|
|
804
1366
|
# @option options [String] :copy_source_sse_customer_algorithm
|
|
805
1367
|
# Specifies the algorithm to use when decrypting the source object (for
|
|
806
|
-
# example, AES256).
|
|
1368
|
+
# example, `AES256`).
|
|
1369
|
+
#
|
|
1370
|
+
# If the source object for the copy is stored in Amazon S3 using SSE-C,
|
|
1371
|
+
# you must provide the necessary encryption information in your request
|
|
1372
|
+
# so that Amazon S3 can decrypt the object for copying.
|
|
1373
|
+
#
|
|
1374
|
+
# <note markdown="1"> This functionality is not supported when the source object is in a
|
|
1375
|
+
# directory bucket.
|
|
1376
|
+
#
|
|
1377
|
+
# </note>
|
|
807
1378
|
# @option options [String] :copy_source_sse_customer_key
|
|
808
1379
|
# Specifies the customer-provided encryption key for Amazon S3 to use to
|
|
809
1380
|
# decrypt the source object. The encryption key provided in this header
|
|
810
|
-
# must be one that was used when the source object was created.
|
|
1381
|
+
# must be the same one that was used when the source object was created.
|
|
1382
|
+
#
|
|
1383
|
+
# If the source object for the copy is stored in Amazon S3 using SSE-C,
|
|
1384
|
+
# you must provide the necessary encryption information in your request
|
|
1385
|
+
# so that Amazon S3 can decrypt the object for copying.
|
|
1386
|
+
#
|
|
1387
|
+
# <note markdown="1"> This functionality is not supported when the source object is in a
|
|
1388
|
+
# directory bucket.
|
|
1389
|
+
#
|
|
1390
|
+
# </note>
|
|
811
1391
|
# @option options [String] :copy_source_sse_customer_key_md5
|
|
812
1392
|
# Specifies the 128-bit MD5 digest of the encryption key according to
|
|
813
1393
|
# RFC 1321. Amazon S3 uses this header for a message integrity check to
|
|
814
1394
|
# ensure that the encryption key was transmitted without error.
|
|
1395
|
+
#
|
|
1396
|
+
# If the source object for the copy is stored in Amazon S3 using SSE-C,
|
|
1397
|
+
# you must provide the necessary encryption information in your request
|
|
1398
|
+
# so that Amazon S3 can decrypt the object for copying.
|
|
1399
|
+
#
|
|
1400
|
+
# <note markdown="1"> This functionality is not supported when the source object is in a
|
|
1401
|
+
# directory bucket.
|
|
1402
|
+
#
|
|
1403
|
+
# </note>
|
|
815
1404
|
# @option options [String] :request_payer
|
|
816
1405
|
# Confirms that the requester knows that they will be charged for the
|
|
817
1406
|
# request. Bucket owners need not specify this parameter in their
|
|
818
|
-
# requests. If either the source or destination
|
|
819
|
-
#
|
|
820
|
-
#
|
|
821
|
-
#
|
|
822
|
-
#
|
|
1407
|
+
# requests. If either the source or destination S3 bucket has Requester
|
|
1408
|
+
# Pays enabled, the requester will pay for corresponding charges to copy
|
|
1409
|
+
# the object. For information about downloading objects from Requester
|
|
1410
|
+
# Pays buckets, see [Downloading Objects in Requester Pays Buckets][1]
|
|
1411
|
+
# in the *Amazon S3 User Guide*.
|
|
1412
|
+
#
|
|
1413
|
+
# <note markdown="1"> This functionality is not supported for directory buckets.
|
|
1414
|
+
#
|
|
1415
|
+
# </note>
|
|
823
1416
|
#
|
|
824
1417
|
#
|
|
825
1418
|
#
|
|
826
1419
|
# [1]: https://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html
|
|
827
1420
|
# @option options [String] :tagging
|
|
828
|
-
# The tag-set for the object
|
|
829
|
-
# in conjunction with the `
|
|
830
|
-
#
|
|
1421
|
+
# The tag-set for the object copy in the destination bucket. This value
|
|
1422
|
+
# must be used in conjunction with the `x-amz-tagging-directive` if you
|
|
1423
|
+
# choose `REPLACE` for the `x-amz-tagging-directive`. If you choose
|
|
1424
|
+
# `COPY` for the `x-amz-tagging-directive`, you don't need to set the
|
|
1425
|
+
# `x-amz-tagging` header, because the tag-set will be copied from the
|
|
1426
|
+
# source object directly. The tag-set must be encoded as URL Query
|
|
1427
|
+
# parameters.
|
|
1428
|
+
#
|
|
1429
|
+
# The default value is the empty value.
|
|
1430
|
+
#
|
|
1431
|
+
# <note markdown="1"> **Directory buckets** - For directory buckets in a `CopyObject`
|
|
1432
|
+
# operation, only the empty tag-set is supported. Any requests that
|
|
1433
|
+
# attempt to write non-empty tags into directory buckets will receive a
|
|
1434
|
+
# `501 Not Implemented` status code. When the destination bucket is a
|
|
1435
|
+
# directory bucket, you will receive a `501 Not Implemented` response in
|
|
1436
|
+
# any of the following situations:
|
|
1437
|
+
#
|
|
1438
|
+
# * When you attempt to `COPY` the tag-set from an S3 source object that
|
|
1439
|
+
# has non-empty tags.
|
|
1440
|
+
#
|
|
1441
|
+
# * When you attempt to `REPLACE` the tag-set of a source object and set
|
|
1442
|
+
# a non-empty value to `x-amz-tagging`.
|
|
1443
|
+
#
|
|
1444
|
+
# * When you don't set the `x-amz-tagging-directive` header and the
|
|
1445
|
+
# source object has non-empty tags. This is because the default value
|
|
1446
|
+
# of `x-amz-tagging-directive` is `COPY`.
|
|
1447
|
+
#
|
|
1448
|
+
# Because only the empty tag-set is supported for directory buckets in a
|
|
1449
|
+
# `CopyObject` operation, the following situations are allowed:
|
|
1450
|
+
#
|
|
1451
|
+
# * When you attempt to `COPY` the tag-set from a directory bucket
|
|
1452
|
+
# source object that has no tags to a general purpose bucket. It
|
|
1453
|
+
# copies an empty tag-set to the destination object.
|
|
1454
|
+
#
|
|
1455
|
+
# * When you attempt to `REPLACE` the tag-set of a directory bucket
|
|
1456
|
+
# source object and set the `x-amz-tagging` value of the directory
|
|
1457
|
+
# bucket destination object to empty.
|
|
1458
|
+
#
|
|
1459
|
+
# * When you attempt to `REPLACE` the tag-set of a general purpose
|
|
1460
|
+
# bucket source object that has non-empty tags and set the
|
|
1461
|
+
# `x-amz-tagging` value of the directory bucket destination object to
|
|
1462
|
+
# empty.
|
|
1463
|
+
#
|
|
1464
|
+
# * When you attempt to `REPLACE` the tag-set of a directory bucket
|
|
1465
|
+
# source object and don't set the `x-amz-tagging` value of the
|
|
1466
|
+
# directory bucket destination object. This is because the default
|
|
1467
|
+
# value of `x-amz-tagging` is the empty value.
|
|
1468
|
+
#
|
|
1469
|
+
# </note>
|
|
831
1470
|
# @option options [String] :object_lock_mode
|
|
832
|
-
# The Object Lock mode that you want to apply to the
|
|
1471
|
+
# The Object Lock mode that you want to apply to the object copy.
|
|
1472
|
+
#
|
|
1473
|
+
# <note markdown="1"> This functionality is not supported for directory buckets.
|
|
1474
|
+
#
|
|
1475
|
+
# </note>
|
|
833
1476
|
# @option options [Time,DateTime,Date,Integer,String] :object_lock_retain_until_date
|
|
834
|
-
# The date and time when you want the
|
|
1477
|
+
# The date and time when you want the Object Lock of the object copy to
|
|
835
1478
|
# expire.
|
|
1479
|
+
#
|
|
1480
|
+
# <note markdown="1"> This functionality is not supported for directory buckets.
|
|
1481
|
+
#
|
|
1482
|
+
# </note>
|
|
836
1483
|
# @option options [String] :object_lock_legal_hold_status
|
|
837
|
-
# Specifies whether you want to apply a legal hold to the
|
|
1484
|
+
# Specifies whether you want to apply a legal hold to the object copy.
|
|
1485
|
+
#
|
|
1486
|
+
# <note markdown="1"> This functionality is not supported for directory buckets.
|
|
1487
|
+
#
|
|
1488
|
+
# </note>
|
|
838
1489
|
# @option options [String] :expected_bucket_owner
|
|
839
1490
|
# The account ID of the expected destination bucket owner. If the
|
|
840
|
-
#
|
|
841
|
-
# with the HTTP status code `403
|
|
1491
|
+
# account ID that you provide does not match the actual owner of the
|
|
1492
|
+
# destination bucket, the request fails with the HTTP status code `403
|
|
1493
|
+
# Forbidden` (access denied).
|
|
842
1494
|
# @option options [String] :expected_source_bucket_owner
|
|
843
|
-
# The account ID of the expected source bucket owner. If the
|
|
844
|
-
#
|
|
845
|
-
# HTTP status code `403 Forbidden` (access
|
|
1495
|
+
# The account ID of the expected source bucket owner. If the account ID
|
|
1496
|
+
# that you provide does not match the actual owner of the source bucket,
|
|
1497
|
+
# the request fails with the HTTP status code `403 Forbidden` (access
|
|
1498
|
+
# denied).
|
|
846
1499
|
# @return [Types::CopyObjectOutput]
|
|
847
1500
|
def copy_from(options = {})
|
|
848
1501
|
options = options.merge(
|
|
849
1502
|
bucket: @bucket_name,
|
|
850
1503
|
key: @key
|
|
851
1504
|
)
|
|
852
|
-
resp = Aws::Plugins::UserAgent.
|
|
1505
|
+
resp = Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
|
|
853
1506
|
@client.copy_object(options)
|
|
854
1507
|
end
|
|
855
1508
|
resp.data
|
|
@@ -863,6 +1516,9 @@ module Aws::S3
|
|
|
863
1516
|
# request_payer: "requester", # accepts requester
|
|
864
1517
|
# bypass_governance_retention: false,
|
|
865
1518
|
# expected_bucket_owner: "AccountId",
|
|
1519
|
+
# if_match: "IfMatch",
|
|
1520
|
+
# if_match_last_modified_time: Time.now,
|
|
1521
|
+
# if_match_size: 1,
|
|
866
1522
|
# })
|
|
867
1523
|
# @param [Hash] options ({})
|
|
868
1524
|
# @option options [String] :mfa
|
|
@@ -870,16 +1526,29 @@ module Aws::S3
|
|
|
870
1526
|
# space, and the value that is displayed on your authentication device.
|
|
871
1527
|
# Required to permanently delete a versioned object if versioning is
|
|
872
1528
|
# configured with MFA delete enabled.
|
|
1529
|
+
#
|
|
1530
|
+
# <note markdown="1"> This functionality is not supported for directory buckets.
|
|
1531
|
+
#
|
|
1532
|
+
# </note>
|
|
873
1533
|
# @option options [String] :version_id
|
|
874
|
-
#
|
|
1534
|
+
# Version ID used to reference a specific version of the object.
|
|
1535
|
+
#
|
|
1536
|
+
# <note markdown="1"> For directory buckets in this API operation, only the `null` value of
|
|
1537
|
+
# the version ID is supported.
|
|
1538
|
+
#
|
|
1539
|
+
# </note>
|
|
875
1540
|
# @option options [String] :request_payer
|
|
876
1541
|
# Confirms that the requester knows that they will be charged for the
|
|
877
1542
|
# request. Bucket owners need not specify this parameter in their
|
|
878
|
-
# requests. If either the source or destination
|
|
879
|
-
#
|
|
880
|
-
#
|
|
881
|
-
#
|
|
882
|
-
#
|
|
1543
|
+
# requests. If either the source or destination S3 bucket has Requester
|
|
1544
|
+
# Pays enabled, the requester will pay for corresponding charges to copy
|
|
1545
|
+
# the object. For information about downloading objects from Requester
|
|
1546
|
+
# Pays buckets, see [Downloading Objects in Requester Pays Buckets][1]
|
|
1547
|
+
# in the *Amazon S3 User Guide*.
|
|
1548
|
+
#
|
|
1549
|
+
# <note markdown="1"> This functionality is not supported for directory buckets.
|
|
1550
|
+
#
|
|
1551
|
+
# </note>
|
|
883
1552
|
#
|
|
884
1553
|
#
|
|
885
1554
|
#
|
|
@@ -888,17 +1557,59 @@ module Aws::S3
|
|
|
888
1557
|
# Indicates whether S3 Object Lock should bypass Governance-mode
|
|
889
1558
|
# restrictions to process this operation. To use this header, you must
|
|
890
1559
|
# have the `s3:BypassGovernanceRetention` permission.
|
|
1560
|
+
#
|
|
1561
|
+
# <note markdown="1"> This functionality is not supported for directory buckets.
|
|
1562
|
+
#
|
|
1563
|
+
# </note>
|
|
891
1564
|
# @option options [String] :expected_bucket_owner
|
|
892
|
-
# The account ID of the expected bucket owner. If the
|
|
893
|
-
#
|
|
894
|
-
# Forbidden` (access denied).
|
|
1565
|
+
# The account ID of the expected bucket owner. If the account ID that
|
|
1566
|
+
# you provide does not match the actual owner of the bucket, the request
|
|
1567
|
+
# fails with the HTTP status code `403 Forbidden` (access denied).
|
|
1568
|
+
# @option options [String] :if_match
|
|
1569
|
+
# Deletes the object if the ETag (entity tag) value provided during the
|
|
1570
|
+
# delete operation matches the ETag of the object in S3. If the ETag
|
|
1571
|
+
# values do not match, the operation returns a `412 Precondition Failed`
|
|
1572
|
+
# error.
|
|
1573
|
+
#
|
|
1574
|
+
# Expects the ETag value as a string. `If-Match` does accept a string
|
|
1575
|
+
# value of an '*' (asterisk) character to denote a match of any ETag.
|
|
1576
|
+
#
|
|
1577
|
+
# For more information about conditional requests, see [RFC 7232][1].
|
|
1578
|
+
#
|
|
1579
|
+
#
|
|
1580
|
+
#
|
|
1581
|
+
# [1]: https://tools.ietf.org/html/rfc7232
|
|
1582
|
+
# @option options [Time,DateTime,Date,Integer,String] :if_match_last_modified_time
|
|
1583
|
+
# If present, the object is deleted only if its modification times
|
|
1584
|
+
# matches the provided `Timestamp`. If the `Timestamp` values do not
|
|
1585
|
+
# match, the operation returns a `412 Precondition Failed` error. If the
|
|
1586
|
+
# `Timestamp` matches or if the object doesn’t exist, the operation
|
|
1587
|
+
# returns a `204 Success (No Content)` response.
|
|
1588
|
+
#
|
|
1589
|
+
# <note markdown="1"> This functionality is only supported for directory buckets.
|
|
1590
|
+
#
|
|
1591
|
+
# </note>
|
|
1592
|
+
# @option options [Integer] :if_match_size
|
|
1593
|
+
# If present, the object is deleted only if its size matches the
|
|
1594
|
+
# provided size in bytes. If the `Size` value does not match, the
|
|
1595
|
+
# operation returns a `412 Precondition Failed` error. If the `Size`
|
|
1596
|
+
# matches or if the object doesn’t exist, the operation returns a `204
|
|
1597
|
+
# Success (No Content)` response.
|
|
1598
|
+
#
|
|
1599
|
+
# <note markdown="1"> This functionality is only supported for directory buckets.
|
|
1600
|
+
#
|
|
1601
|
+
# </note>
|
|
1602
|
+
#
|
|
1603
|
+
# You can use the `If-Match`, `x-amz-if-match-last-modified-time` and
|
|
1604
|
+
# `x-amz-if-match-size` conditional headers in conjunction with
|
|
1605
|
+
# each-other or individually.
|
|
895
1606
|
# @return [Types::DeleteObjectOutput]
|
|
896
1607
|
def delete(options = {})
|
|
897
1608
|
options = options.merge(
|
|
898
1609
|
bucket: @bucket_name,
|
|
899
1610
|
key: @key
|
|
900
1611
|
)
|
|
901
|
-
resp = Aws::Plugins::UserAgent.
|
|
1612
|
+
resp = Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
|
|
902
1613
|
@client.delete_object(options)
|
|
903
1614
|
end
|
|
904
1615
|
resp.data
|
|
@@ -930,18 +1641,64 @@ module Aws::S3
|
|
|
930
1641
|
# @param [Hash] options ({})
|
|
931
1642
|
# @option options [String] :if_match
|
|
932
1643
|
# Return the object only if its entity tag (ETag) is the same as the one
|
|
933
|
-
# specified; otherwise, return a 412
|
|
1644
|
+
# specified in this header; otherwise, return a `412 Precondition
|
|
1645
|
+
# Failed` error.
|
|
1646
|
+
#
|
|
1647
|
+
# If both of the `If-Match` and `If-Unmodified-Since` headers are
|
|
1648
|
+
# present in the request as follows: `If-Match` condition evaluates to
|
|
1649
|
+
# `true`, and; `If-Unmodified-Since` condition evaluates to `false`;
|
|
1650
|
+
# then, S3 returns `200 OK` and the data requested.
|
|
1651
|
+
#
|
|
1652
|
+
# For more information about conditional requests, see [RFC 7232][1].
|
|
1653
|
+
#
|
|
1654
|
+
#
|
|
1655
|
+
#
|
|
1656
|
+
# [1]: https://tools.ietf.org/html/rfc7232
|
|
934
1657
|
# @option options [Time,DateTime,Date,Integer,String] :if_modified_since
|
|
935
1658
|
# Return the object only if it has been modified since the specified
|
|
936
|
-
# time; otherwise, return a 304
|
|
1659
|
+
# time; otherwise, return a `304 Not Modified` error.
|
|
1660
|
+
#
|
|
1661
|
+
# If both of the `If-None-Match` and `If-Modified-Since` headers are
|
|
1662
|
+
# present in the request as follows:` If-None-Match` condition evaluates
|
|
1663
|
+
# to `false`, and; `If-Modified-Since` condition evaluates to `true`;
|
|
1664
|
+
# then, S3 returns `304 Not Modified` status code.
|
|
1665
|
+
#
|
|
1666
|
+
# For more information about conditional requests, see [RFC 7232][1].
|
|
1667
|
+
#
|
|
1668
|
+
#
|
|
1669
|
+
#
|
|
1670
|
+
# [1]: https://tools.ietf.org/html/rfc7232
|
|
937
1671
|
# @option options [String] :if_none_match
|
|
938
1672
|
# Return the object only if its entity tag (ETag) is different from the
|
|
939
|
-
# one specified; otherwise, return a 304
|
|
1673
|
+
# one specified in this header; otherwise, return a `304 Not Modified`
|
|
1674
|
+
# error.
|
|
1675
|
+
#
|
|
1676
|
+
# If both of the `If-None-Match` and `If-Modified-Since` headers are
|
|
1677
|
+
# present in the request as follows:` If-None-Match` condition evaluates
|
|
1678
|
+
# to `false`, and; `If-Modified-Since` condition evaluates to `true`;
|
|
1679
|
+
# then, S3 returns `304 Not Modified` HTTP status code.
|
|
1680
|
+
#
|
|
1681
|
+
# For more information about conditional requests, see [RFC 7232][1].
|
|
1682
|
+
#
|
|
1683
|
+
#
|
|
1684
|
+
#
|
|
1685
|
+
# [1]: https://tools.ietf.org/html/rfc7232
|
|
940
1686
|
# @option options [Time,DateTime,Date,Integer,String] :if_unmodified_since
|
|
941
1687
|
# Return the object only if it has not been modified since the specified
|
|
942
|
-
# time; otherwise, return a 412
|
|
1688
|
+
# time; otherwise, return a `412 Precondition Failed` error.
|
|
1689
|
+
#
|
|
1690
|
+
# If both of the `If-Match` and `If-Unmodified-Since` headers are
|
|
1691
|
+
# present in the request as follows: `If-Match` condition evaluates to
|
|
1692
|
+
# `true`, and; `If-Unmodified-Since` condition evaluates to `false`;
|
|
1693
|
+
# then, S3 returns `200 OK` and the data requested.
|
|
1694
|
+
#
|
|
1695
|
+
# For more information about conditional requests, see [RFC 7232][1].
|
|
1696
|
+
#
|
|
1697
|
+
#
|
|
1698
|
+
#
|
|
1699
|
+
# [1]: https://tools.ietf.org/html/rfc7232
|
|
943
1700
|
# @option options [String] :range
|
|
944
|
-
# Downloads the specified range
|
|
1701
|
+
# Downloads the specified byte range of an object. For more information
|
|
945
1702
|
# about the HTTP Range header, see
|
|
946
1703
|
# [https://www.rfc-editor.org/rfc/rfc9110.html#name-range][1].
|
|
947
1704
|
#
|
|
@@ -956,7 +1713,7 @@ module Aws::S3
|
|
|
956
1713
|
# @option options [String] :response_cache_control
|
|
957
1714
|
# Sets the `Cache-Control` header of the response.
|
|
958
1715
|
# @option options [String] :response_content_disposition
|
|
959
|
-
# Sets the `Content-Disposition` header of the response
|
|
1716
|
+
# Sets the `Content-Disposition` header of the response.
|
|
960
1717
|
# @option options [String] :response_content_encoding
|
|
961
1718
|
# Sets the `Content-Encoding` header of the response.
|
|
962
1719
|
# @option options [String] :response_content_language
|
|
@@ -966,28 +1723,127 @@ module Aws::S3
|
|
|
966
1723
|
# @option options [Time,DateTime,Date,Integer,String] :response_expires
|
|
967
1724
|
# Sets the `Expires` header of the response.
|
|
968
1725
|
# @option options [String] :version_id
|
|
969
|
-
#
|
|
1726
|
+
# Version ID used to reference a specific version of the object.
|
|
1727
|
+
#
|
|
1728
|
+
# By default, the `GetObject` operation returns the current version of
|
|
1729
|
+
# an object. To return a different version, use the `versionId`
|
|
1730
|
+
# subresource.
|
|
1731
|
+
#
|
|
1732
|
+
# <note markdown="1"> * If you include a `versionId` in your request header, you must have
|
|
1733
|
+
# the `s3:GetObjectVersion` permission to access a specific version of
|
|
1734
|
+
# an object. The `s3:GetObject` permission is not required in this
|
|
1735
|
+
# scenario.
|
|
1736
|
+
#
|
|
1737
|
+
# * If you request the current version of an object without a specific
|
|
1738
|
+
# `versionId` in the request header, only the `s3:GetObject`
|
|
1739
|
+
# permission is required. The `s3:GetObjectVersion` permission is not
|
|
1740
|
+
# required in this scenario.
|
|
1741
|
+
#
|
|
1742
|
+
# * **Directory buckets** - S3 Versioning isn't enabled and supported
|
|
1743
|
+
# for directory buckets. For this API operation, only the `null` value
|
|
1744
|
+
# of the version ID is supported by directory buckets. You can only
|
|
1745
|
+
# specify `null` to the `versionId` query parameter in the request.
|
|
1746
|
+
#
|
|
1747
|
+
# </note>
|
|
1748
|
+
#
|
|
1749
|
+
# For more information about versioning, see [PutBucketVersioning][1].
|
|
1750
|
+
#
|
|
1751
|
+
#
|
|
1752
|
+
#
|
|
1753
|
+
# [1]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketVersioning.html
|
|
970
1754
|
# @option options [String] :sse_customer_algorithm
|
|
971
|
-
# Specifies the algorithm to use
|
|
972
|
-
# example, AES256).
|
|
1755
|
+
# Specifies the algorithm to use when decrypting the object (for
|
|
1756
|
+
# example, `AES256`).
|
|
1757
|
+
#
|
|
1758
|
+
# If you encrypt an object by using server-side encryption with
|
|
1759
|
+
# customer-provided encryption keys (SSE-C) when you store the object in
|
|
1760
|
+
# Amazon S3, then when you GET the object, you must use the following
|
|
1761
|
+
# headers:
|
|
1762
|
+
#
|
|
1763
|
+
# * `x-amz-server-side-encryption-customer-algorithm`
|
|
1764
|
+
#
|
|
1765
|
+
# * `x-amz-server-side-encryption-customer-key`
|
|
1766
|
+
#
|
|
1767
|
+
# * `x-amz-server-side-encryption-customer-key-MD5`
|
|
1768
|
+
#
|
|
1769
|
+
# For more information about SSE-C, see [Server-Side Encryption (Using
|
|
1770
|
+
# Customer-Provided Encryption Keys)][1] in the *Amazon S3 User Guide*.
|
|
1771
|
+
#
|
|
1772
|
+
# <note markdown="1"> This functionality is not supported for directory buckets.
|
|
1773
|
+
#
|
|
1774
|
+
# </note>
|
|
1775
|
+
#
|
|
1776
|
+
#
|
|
1777
|
+
#
|
|
1778
|
+
# [1]: https://docs.aws.amazon.com/AmazonS3/latest/dev/ServerSideEncryptionCustomerKeys.html
|
|
973
1779
|
# @option options [String] :sse_customer_key
|
|
974
|
-
# Specifies the customer-provided encryption key
|
|
975
|
-
#
|
|
976
|
-
#
|
|
977
|
-
#
|
|
1780
|
+
# Specifies the customer-provided encryption key that you originally
|
|
1781
|
+
# provided for Amazon S3 to encrypt the data before storing it. This
|
|
1782
|
+
# value is used to decrypt the object when recovering it and must match
|
|
1783
|
+
# the one used when storing the data. The key must be appropriate for
|
|
1784
|
+
# use with the algorithm specified in the
|
|
978
1785
|
# `x-amz-server-side-encryption-customer-algorithm` header.
|
|
1786
|
+
#
|
|
1787
|
+
# If you encrypt an object by using server-side encryption with
|
|
1788
|
+
# customer-provided encryption keys (SSE-C) when you store the object in
|
|
1789
|
+
# Amazon S3, then when you GET the object, you must use the following
|
|
1790
|
+
# headers:
|
|
1791
|
+
#
|
|
1792
|
+
# * `x-amz-server-side-encryption-customer-algorithm`
|
|
1793
|
+
#
|
|
1794
|
+
# * `x-amz-server-side-encryption-customer-key`
|
|
1795
|
+
#
|
|
1796
|
+
# * `x-amz-server-side-encryption-customer-key-MD5`
|
|
1797
|
+
#
|
|
1798
|
+
# For more information about SSE-C, see [Server-Side Encryption (Using
|
|
1799
|
+
# Customer-Provided Encryption Keys)][1] in the *Amazon S3 User Guide*.
|
|
1800
|
+
#
|
|
1801
|
+
# <note markdown="1"> This functionality is not supported for directory buckets.
|
|
1802
|
+
#
|
|
1803
|
+
# </note>
|
|
1804
|
+
#
|
|
1805
|
+
#
|
|
1806
|
+
#
|
|
1807
|
+
# [1]: https://docs.aws.amazon.com/AmazonS3/latest/dev/ServerSideEncryptionCustomerKeys.html
|
|
979
1808
|
# @option options [String] :sse_customer_key_md5
|
|
980
|
-
# Specifies the 128-bit MD5 digest of the encryption
|
|
981
|
-
# RFC 1321. Amazon S3 uses this header for a message
|
|
982
|
-
# ensure that the encryption key was transmitted
|
|
1809
|
+
# Specifies the 128-bit MD5 digest of the customer-provided encryption
|
|
1810
|
+
# key according to RFC 1321. Amazon S3 uses this header for a message
|
|
1811
|
+
# integrity check to ensure that the encryption key was transmitted
|
|
1812
|
+
# without error.
|
|
1813
|
+
#
|
|
1814
|
+
# If you encrypt an object by using server-side encryption with
|
|
1815
|
+
# customer-provided encryption keys (SSE-C) when you store the object in
|
|
1816
|
+
# Amazon S3, then when you GET the object, you must use the following
|
|
1817
|
+
# headers:
|
|
1818
|
+
#
|
|
1819
|
+
# * `x-amz-server-side-encryption-customer-algorithm`
|
|
1820
|
+
#
|
|
1821
|
+
# * `x-amz-server-side-encryption-customer-key`
|
|
1822
|
+
#
|
|
1823
|
+
# * `x-amz-server-side-encryption-customer-key-MD5`
|
|
1824
|
+
#
|
|
1825
|
+
# For more information about SSE-C, see [Server-Side Encryption (Using
|
|
1826
|
+
# Customer-Provided Encryption Keys)][1] in the *Amazon S3 User Guide*.
|
|
1827
|
+
#
|
|
1828
|
+
# <note markdown="1"> This functionality is not supported for directory buckets.
|
|
1829
|
+
#
|
|
1830
|
+
# </note>
|
|
1831
|
+
#
|
|
1832
|
+
#
|
|
1833
|
+
#
|
|
1834
|
+
# [1]: https://docs.aws.amazon.com/AmazonS3/latest/dev/ServerSideEncryptionCustomerKeys.html
|
|
983
1835
|
# @option options [String] :request_payer
|
|
984
1836
|
# Confirms that the requester knows that they will be charged for the
|
|
985
1837
|
# request. Bucket owners need not specify this parameter in their
|
|
986
|
-
# requests. If either the source or destination
|
|
987
|
-
#
|
|
988
|
-
#
|
|
989
|
-
#
|
|
990
|
-
#
|
|
1838
|
+
# requests. If either the source or destination S3 bucket has Requester
|
|
1839
|
+
# Pays enabled, the requester will pay for corresponding charges to copy
|
|
1840
|
+
# the object. For information about downloading objects from Requester
|
|
1841
|
+
# Pays buckets, see [Downloading Objects in Requester Pays Buckets][1]
|
|
1842
|
+
# in the *Amazon S3 User Guide*.
|
|
1843
|
+
#
|
|
1844
|
+
# <note markdown="1"> This functionality is not supported for directory buckets.
|
|
1845
|
+
#
|
|
1846
|
+
# </note>
|
|
991
1847
|
#
|
|
992
1848
|
#
|
|
993
1849
|
#
|
|
@@ -998,9 +1854,9 @@ module Aws::S3
|
|
|
998
1854
|
# for the part specified. Useful for downloading just a part of an
|
|
999
1855
|
# object.
|
|
1000
1856
|
# @option options [String] :expected_bucket_owner
|
|
1001
|
-
# The account ID of the expected bucket owner. If the
|
|
1002
|
-
#
|
|
1003
|
-
# Forbidden` (access denied).
|
|
1857
|
+
# The account ID of the expected bucket owner. If the account ID that
|
|
1858
|
+
# you provide does not match the actual owner of the bucket, the request
|
|
1859
|
+
# fails with the HTTP status code `403 Forbidden` (access denied).
|
|
1004
1860
|
# @option options [String] :checksum_mode
|
|
1005
1861
|
# To retrieve the checksum, this mode must be enabled.
|
|
1006
1862
|
# @return [Types::GetObjectOutput]
|
|
@@ -1009,7 +1865,7 @@ module Aws::S3
|
|
|
1009
1865
|
bucket: @bucket_name,
|
|
1010
1866
|
key: @key
|
|
1011
1867
|
)
|
|
1012
|
-
resp = Aws::Plugins::UserAgent.
|
|
1868
|
+
resp = Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
|
|
1013
1869
|
@client.get_object(options, &block)
|
|
1014
1870
|
end
|
|
1015
1871
|
resp.data
|
|
@@ -1032,8 +1888,8 @@ module Aws::S3
|
|
|
1032
1888
|
# metadata: {
|
|
1033
1889
|
# "MetadataKey" => "MetadataValue",
|
|
1034
1890
|
# },
|
|
1035
|
-
# server_side_encryption: "AES256", # accepts AES256, aws:kms, aws:kms:dsse
|
|
1036
|
-
# storage_class: "STANDARD", # accepts STANDARD, REDUCED_REDUNDANCY, STANDARD_IA, ONEZONE_IA, INTELLIGENT_TIERING, GLACIER, DEEP_ARCHIVE, OUTPOSTS, GLACIER_IR, SNOW
|
|
1891
|
+
# server_side_encryption: "AES256", # accepts AES256, aws:fsx, aws:kms, aws:kms:dsse
|
|
1892
|
+
# storage_class: "STANDARD", # accepts STANDARD, REDUCED_REDUNDANCY, STANDARD_IA, ONEZONE_IA, INTELLIGENT_TIERING, GLACIER, DEEP_ARCHIVE, OUTPOSTS, GLACIER_IR, SNOW, EXPRESS_ONEZONE, FSX_OPENZFS, FSX_ONTAP
|
|
1037
1893
|
# website_redirect_location: "WebsiteRedirectLocation",
|
|
1038
1894
|
# sse_customer_algorithm: "SSECustomerAlgorithm",
|
|
1039
1895
|
# sse_customer_key: "SSECustomerKey",
|
|
@@ -1047,13 +1903,34 @@ module Aws::S3
|
|
|
1047
1903
|
# object_lock_retain_until_date: Time.now,
|
|
1048
1904
|
# object_lock_legal_hold_status: "ON", # accepts ON, OFF
|
|
1049
1905
|
# expected_bucket_owner: "AccountId",
|
|
1050
|
-
# checksum_algorithm: "CRC32", # accepts CRC32, CRC32C, SHA1, SHA256
|
|
1906
|
+
# checksum_algorithm: "CRC32", # accepts CRC32, CRC32C, SHA1, SHA256, CRC64NVME
|
|
1907
|
+
# checksum_type: "COMPOSITE", # accepts COMPOSITE, FULL_OBJECT
|
|
1051
1908
|
# })
|
|
1052
1909
|
# @param [Hash] options ({})
|
|
1053
1910
|
# @option options [String] :acl
|
|
1054
|
-
# The canned ACL to apply to the object.
|
|
1911
|
+
# The canned ACL to apply to the object. Amazon S3 supports a set of
|
|
1912
|
+
# predefined ACLs, known as *canned ACLs*. Each canned ACL has a
|
|
1913
|
+
# predefined set of grantees and permissions. For more information, see
|
|
1914
|
+
# [Canned ACL][1] in the *Amazon S3 User Guide*.
|
|
1915
|
+
#
|
|
1916
|
+
# By default, all objects are private. Only the owner has full access
|
|
1917
|
+
# control. When uploading an object, you can grant access permissions to
|
|
1918
|
+
# individual Amazon Web Services accounts or to predefined groups
|
|
1919
|
+
# defined by Amazon S3. These permissions are then added to the access
|
|
1920
|
+
# control list (ACL) on the new object. For more information, see [Using
|
|
1921
|
+
# ACLs][2]. One way to grant the permissions using the request headers
|
|
1922
|
+
# is to specify a canned ACL with the `x-amz-acl` request header.
|
|
1923
|
+
#
|
|
1924
|
+
# <note markdown="1"> * This functionality is not supported for directory buckets.
|
|
1925
|
+
#
|
|
1926
|
+
# * This functionality is not supported for Amazon S3 on Outposts.
|
|
1927
|
+
#
|
|
1928
|
+
# </note>
|
|
1055
1929
|
#
|
|
1056
|
-
#
|
|
1930
|
+
#
|
|
1931
|
+
#
|
|
1932
|
+
# [1]: https://docs.aws.amazon.com/AmazonS3/latest/dev/acl-overview.html#CannedACL
|
|
1933
|
+
# [2]: https://docs.aws.amazon.com/AmazonS3/latest/dev/S3_ACLs_UsingACLs.html
|
|
1057
1934
|
# @option options [String] :cache_control
|
|
1058
1935
|
# Specifies caching behavior along the request/reply chain.
|
|
1059
1936
|
# @option options [String] :content_disposition
|
|
@@ -1062,41 +1939,343 @@ module Aws::S3
|
|
|
1062
1939
|
# Specifies what content encodings have been applied to the object and
|
|
1063
1940
|
# thus what decoding mechanisms must be applied to obtain the media-type
|
|
1064
1941
|
# referenced by the Content-Type header field.
|
|
1942
|
+
#
|
|
1943
|
+
# <note markdown="1"> For directory buckets, only the `aws-chunked` value is supported in
|
|
1944
|
+
# this header field.
|
|
1945
|
+
#
|
|
1946
|
+
# </note>
|
|
1065
1947
|
# @option options [String] :content_language
|
|
1066
|
-
# The language the content is in.
|
|
1948
|
+
# The language that the content is in.
|
|
1067
1949
|
# @option options [String] :content_type
|
|
1068
1950
|
# A standard MIME type describing the format of the object data.
|
|
1069
1951
|
# @option options [Time,DateTime,Date,Integer,String] :expires
|
|
1070
1952
|
# The date and time at which the object is no longer cacheable.
|
|
1071
1953
|
# @option options [String] :grant_full_control
|
|
1072
|
-
#
|
|
1073
|
-
# object.
|
|
1954
|
+
# Specify access permissions explicitly to give the grantee READ,
|
|
1955
|
+
# READ\_ACP, and WRITE\_ACP permissions on the object.
|
|
1956
|
+
#
|
|
1957
|
+
# By default, all objects are private. Only the owner has full access
|
|
1958
|
+
# control. When uploading an object, you can use this header to
|
|
1959
|
+
# explicitly grant access permissions to specific Amazon Web Services
|
|
1960
|
+
# accounts or groups. This header maps to specific permissions that
|
|
1961
|
+
# Amazon S3 supports in an ACL. For more information, see [Access
|
|
1962
|
+
# Control List (ACL) Overview][1] in the *Amazon S3 User Guide*.
|
|
1963
|
+
#
|
|
1964
|
+
# You specify each grantee as a type=value pair, where the type is one
|
|
1965
|
+
# of the following:
|
|
1966
|
+
#
|
|
1967
|
+
# * `id` – if the value specified is the canonical user ID of an Amazon
|
|
1968
|
+
# Web Services account
|
|
1969
|
+
#
|
|
1970
|
+
# * `uri` – if you are granting permissions to a predefined group
|
|
1971
|
+
#
|
|
1972
|
+
# * `emailAddress` – if the value specified is the email address of an
|
|
1973
|
+
# Amazon Web Services account
|
|
1974
|
+
#
|
|
1975
|
+
# <note markdown="1"> Using email addresses to specify a grantee is only supported in the
|
|
1976
|
+
# following Amazon Web Services Regions:
|
|
1977
|
+
#
|
|
1978
|
+
# * US East (N. Virginia)
|
|
1979
|
+
#
|
|
1980
|
+
# * US West (N. California)
|
|
1981
|
+
#
|
|
1982
|
+
# * US West (Oregon)
|
|
1983
|
+
#
|
|
1984
|
+
# * Asia Pacific (Singapore)
|
|
1985
|
+
#
|
|
1986
|
+
# * Asia Pacific (Sydney)
|
|
1987
|
+
#
|
|
1988
|
+
# * Asia Pacific (Tokyo)
|
|
1989
|
+
#
|
|
1990
|
+
# * Europe (Ireland)
|
|
1074
1991
|
#
|
|
1075
|
-
#
|
|
1992
|
+
# * South America (São Paulo)
|
|
1993
|
+
#
|
|
1994
|
+
# For a list of all the Amazon S3 supported Regions and endpoints, see
|
|
1995
|
+
# [Regions and Endpoints][2] in the Amazon Web Services General
|
|
1996
|
+
# Reference.
|
|
1997
|
+
#
|
|
1998
|
+
# </note>
|
|
1999
|
+
#
|
|
2000
|
+
# For example, the following `x-amz-grant-read` header grants the Amazon
|
|
2001
|
+
# Web Services accounts identified by account IDs permissions to read
|
|
2002
|
+
# object data and its metadata:
|
|
2003
|
+
#
|
|
2004
|
+
# `x-amz-grant-read: id="11112222333", id="444455556666" `
|
|
2005
|
+
#
|
|
2006
|
+
# <note markdown="1"> * This functionality is not supported for directory buckets.
|
|
2007
|
+
#
|
|
2008
|
+
# * This functionality is not supported for Amazon S3 on Outposts.
|
|
2009
|
+
#
|
|
2010
|
+
# </note>
|
|
2011
|
+
#
|
|
2012
|
+
#
|
|
2013
|
+
#
|
|
2014
|
+
# [1]: https://docs.aws.amazon.com/AmazonS3/latest/dev/acl-overview.html
|
|
2015
|
+
# [2]: https://docs.aws.amazon.com/general/latest/gr/rande.html#s3_region
|
|
1076
2016
|
# @option options [String] :grant_read
|
|
1077
|
-
#
|
|
2017
|
+
# Specify access permissions explicitly to allow grantee to read the
|
|
2018
|
+
# object data and its metadata.
|
|
2019
|
+
#
|
|
2020
|
+
# By default, all objects are private. Only the owner has full access
|
|
2021
|
+
# control. When uploading an object, you can use this header to
|
|
2022
|
+
# explicitly grant access permissions to specific Amazon Web Services
|
|
2023
|
+
# accounts or groups. This header maps to specific permissions that
|
|
2024
|
+
# Amazon S3 supports in an ACL. For more information, see [Access
|
|
2025
|
+
# Control List (ACL) Overview][1] in the *Amazon S3 User Guide*.
|
|
1078
2026
|
#
|
|
1079
|
-
#
|
|
2027
|
+
# You specify each grantee as a type=value pair, where the type is one
|
|
2028
|
+
# of the following:
|
|
2029
|
+
#
|
|
2030
|
+
# * `id` – if the value specified is the canonical user ID of an Amazon
|
|
2031
|
+
# Web Services account
|
|
2032
|
+
#
|
|
2033
|
+
# * `uri` – if you are granting permissions to a predefined group
|
|
2034
|
+
#
|
|
2035
|
+
# * `emailAddress` – if the value specified is the email address of an
|
|
2036
|
+
# Amazon Web Services account
|
|
2037
|
+
#
|
|
2038
|
+
# <note markdown="1"> Using email addresses to specify a grantee is only supported in the
|
|
2039
|
+
# following Amazon Web Services Regions:
|
|
2040
|
+
#
|
|
2041
|
+
# * US East (N. Virginia)
|
|
2042
|
+
#
|
|
2043
|
+
# * US West (N. California)
|
|
2044
|
+
#
|
|
2045
|
+
# * US West (Oregon)
|
|
2046
|
+
#
|
|
2047
|
+
# * Asia Pacific (Singapore)
|
|
2048
|
+
#
|
|
2049
|
+
# * Asia Pacific (Sydney)
|
|
2050
|
+
#
|
|
2051
|
+
# * Asia Pacific (Tokyo)
|
|
2052
|
+
#
|
|
2053
|
+
# * Europe (Ireland)
|
|
2054
|
+
#
|
|
2055
|
+
# * South America (São Paulo)
|
|
2056
|
+
#
|
|
2057
|
+
# For a list of all the Amazon S3 supported Regions and endpoints, see
|
|
2058
|
+
# [Regions and Endpoints][2] in the Amazon Web Services General
|
|
2059
|
+
# Reference.
|
|
2060
|
+
#
|
|
2061
|
+
# </note>
|
|
2062
|
+
#
|
|
2063
|
+
# For example, the following `x-amz-grant-read` header grants the Amazon
|
|
2064
|
+
# Web Services accounts identified by account IDs permissions to read
|
|
2065
|
+
# object data and its metadata:
|
|
2066
|
+
#
|
|
2067
|
+
# `x-amz-grant-read: id="11112222333", id="444455556666" `
|
|
2068
|
+
#
|
|
2069
|
+
# <note markdown="1"> * This functionality is not supported for directory buckets.
|
|
2070
|
+
#
|
|
2071
|
+
# * This functionality is not supported for Amazon S3 on Outposts.
|
|
2072
|
+
#
|
|
2073
|
+
# </note>
|
|
2074
|
+
#
|
|
2075
|
+
#
|
|
2076
|
+
#
|
|
2077
|
+
# [1]: https://docs.aws.amazon.com/AmazonS3/latest/dev/acl-overview.html
|
|
2078
|
+
# [2]: https://docs.aws.amazon.com/general/latest/gr/rande.html#s3_region
|
|
1080
2079
|
# @option options [String] :grant_read_acp
|
|
1081
|
-
#
|
|
2080
|
+
# Specify access permissions explicitly to allows grantee to read the
|
|
2081
|
+
# object ACL.
|
|
2082
|
+
#
|
|
2083
|
+
# By default, all objects are private. Only the owner has full access
|
|
2084
|
+
# control. When uploading an object, you can use this header to
|
|
2085
|
+
# explicitly grant access permissions to specific Amazon Web Services
|
|
2086
|
+
# accounts or groups. This header maps to specific permissions that
|
|
2087
|
+
# Amazon S3 supports in an ACL. For more information, see [Access
|
|
2088
|
+
# Control List (ACL) Overview][1] in the *Amazon S3 User Guide*.
|
|
2089
|
+
#
|
|
2090
|
+
# You specify each grantee as a type=value pair, where the type is one
|
|
2091
|
+
# of the following:
|
|
2092
|
+
#
|
|
2093
|
+
# * `id` – if the value specified is the canonical user ID of an Amazon
|
|
2094
|
+
# Web Services account
|
|
2095
|
+
#
|
|
2096
|
+
# * `uri` – if you are granting permissions to a predefined group
|
|
1082
2097
|
#
|
|
1083
|
-
#
|
|
2098
|
+
# * `emailAddress` – if the value specified is the email address of an
|
|
2099
|
+
# Amazon Web Services account
|
|
2100
|
+
#
|
|
2101
|
+
# <note markdown="1"> Using email addresses to specify a grantee is only supported in the
|
|
2102
|
+
# following Amazon Web Services Regions:
|
|
2103
|
+
#
|
|
2104
|
+
# * US East (N. Virginia)
|
|
2105
|
+
#
|
|
2106
|
+
# * US West (N. California)
|
|
2107
|
+
#
|
|
2108
|
+
# * US West (Oregon)
|
|
2109
|
+
#
|
|
2110
|
+
# * Asia Pacific (Singapore)
|
|
2111
|
+
#
|
|
2112
|
+
# * Asia Pacific (Sydney)
|
|
2113
|
+
#
|
|
2114
|
+
# * Asia Pacific (Tokyo)
|
|
2115
|
+
#
|
|
2116
|
+
# * Europe (Ireland)
|
|
2117
|
+
#
|
|
2118
|
+
# * South America (São Paulo)
|
|
2119
|
+
#
|
|
2120
|
+
# For a list of all the Amazon S3 supported Regions and endpoints, see
|
|
2121
|
+
# [Regions and Endpoints][2] in the Amazon Web Services General
|
|
2122
|
+
# Reference.
|
|
2123
|
+
#
|
|
2124
|
+
# </note>
|
|
2125
|
+
#
|
|
2126
|
+
# For example, the following `x-amz-grant-read` header grants the Amazon
|
|
2127
|
+
# Web Services accounts identified by account IDs permissions to read
|
|
2128
|
+
# object data and its metadata:
|
|
2129
|
+
#
|
|
2130
|
+
# `x-amz-grant-read: id="11112222333", id="444455556666" `
|
|
2131
|
+
#
|
|
2132
|
+
# <note markdown="1"> * This functionality is not supported for directory buckets.
|
|
2133
|
+
#
|
|
2134
|
+
# * This functionality is not supported for Amazon S3 on Outposts.
|
|
2135
|
+
#
|
|
2136
|
+
# </note>
|
|
2137
|
+
#
|
|
2138
|
+
#
|
|
2139
|
+
#
|
|
2140
|
+
# [1]: https://docs.aws.amazon.com/AmazonS3/latest/dev/acl-overview.html
|
|
2141
|
+
# [2]: https://docs.aws.amazon.com/general/latest/gr/rande.html#s3_region
|
|
1084
2142
|
# @option options [String] :grant_write_acp
|
|
1085
|
-
#
|
|
2143
|
+
# Specify access permissions explicitly to allows grantee to allow
|
|
2144
|
+
# grantee to write the ACL for the applicable object.
|
|
2145
|
+
#
|
|
2146
|
+
# By default, all objects are private. Only the owner has full access
|
|
2147
|
+
# control. When uploading an object, you can use this header to
|
|
2148
|
+
# explicitly grant access permissions to specific Amazon Web Services
|
|
2149
|
+
# accounts or groups. This header maps to specific permissions that
|
|
2150
|
+
# Amazon S3 supports in an ACL. For more information, see [Access
|
|
2151
|
+
# Control List (ACL) Overview][1] in the *Amazon S3 User Guide*.
|
|
2152
|
+
#
|
|
2153
|
+
# You specify each grantee as a type=value pair, where the type is one
|
|
2154
|
+
# of the following:
|
|
2155
|
+
#
|
|
2156
|
+
# * `id` – if the value specified is the canonical user ID of an Amazon
|
|
2157
|
+
# Web Services account
|
|
2158
|
+
#
|
|
2159
|
+
# * `uri` – if you are granting permissions to a predefined group
|
|
2160
|
+
#
|
|
2161
|
+
# * `emailAddress` – if the value specified is the email address of an
|
|
2162
|
+
# Amazon Web Services account
|
|
2163
|
+
#
|
|
2164
|
+
# <note markdown="1"> Using email addresses to specify a grantee is only supported in the
|
|
2165
|
+
# following Amazon Web Services Regions:
|
|
2166
|
+
#
|
|
2167
|
+
# * US East (N. Virginia)
|
|
1086
2168
|
#
|
|
1087
|
-
#
|
|
2169
|
+
# * US West (N. California)
|
|
2170
|
+
#
|
|
2171
|
+
# * US West (Oregon)
|
|
2172
|
+
#
|
|
2173
|
+
# * Asia Pacific (Singapore)
|
|
2174
|
+
#
|
|
2175
|
+
# * Asia Pacific (Sydney)
|
|
2176
|
+
#
|
|
2177
|
+
# * Asia Pacific (Tokyo)
|
|
2178
|
+
#
|
|
2179
|
+
# * Europe (Ireland)
|
|
2180
|
+
#
|
|
2181
|
+
# * South America (São Paulo)
|
|
2182
|
+
#
|
|
2183
|
+
# For a list of all the Amazon S3 supported Regions and endpoints, see
|
|
2184
|
+
# [Regions and Endpoints][2] in the Amazon Web Services General
|
|
2185
|
+
# Reference.
|
|
2186
|
+
#
|
|
2187
|
+
# </note>
|
|
2188
|
+
#
|
|
2189
|
+
# For example, the following `x-amz-grant-read` header grants the Amazon
|
|
2190
|
+
# Web Services accounts identified by account IDs permissions to read
|
|
2191
|
+
# object data and its metadata:
|
|
2192
|
+
#
|
|
2193
|
+
# `x-amz-grant-read: id="11112222333", id="444455556666" `
|
|
2194
|
+
#
|
|
2195
|
+
# <note markdown="1"> * This functionality is not supported for directory buckets.
|
|
2196
|
+
#
|
|
2197
|
+
# * This functionality is not supported for Amazon S3 on Outposts.
|
|
2198
|
+
#
|
|
2199
|
+
# </note>
|
|
2200
|
+
#
|
|
2201
|
+
#
|
|
2202
|
+
#
|
|
2203
|
+
# [1]: https://docs.aws.amazon.com/AmazonS3/latest/dev/acl-overview.html
|
|
2204
|
+
# [2]: https://docs.aws.amazon.com/general/latest/gr/rande.html#s3_region
|
|
1088
2205
|
# @option options [Hash<String,String>] :metadata
|
|
1089
2206
|
# A map of metadata to store with the object in S3.
|
|
1090
2207
|
# @option options [String] :server_side_encryption
|
|
1091
|
-
# The server-side encryption algorithm used when
|
|
1092
|
-
# Amazon S3
|
|
2208
|
+
# The server-side encryption algorithm used when you store this object
|
|
2209
|
+
# in Amazon S3 or Amazon FSx.
|
|
2210
|
+
#
|
|
2211
|
+
# * <b>Directory buckets </b> - For directory buckets, there are only
|
|
2212
|
+
# two supported options for server-side encryption: server-side
|
|
2213
|
+
# encryption with Amazon S3 managed keys (SSE-S3) (`AES256`) and
|
|
2214
|
+
# server-side encryption with KMS keys (SSE-KMS) (`aws:kms`). We
|
|
2215
|
+
# recommend that the bucket's default encryption uses the desired
|
|
2216
|
+
# encryption configuration and you don't override the bucket default
|
|
2217
|
+
# encryption in your `CreateSession` requests or `PUT` object
|
|
2218
|
+
# requests. Then, new objects are automatically encrypted with the
|
|
2219
|
+
# desired encryption settings. For more information, see [Protecting
|
|
2220
|
+
# data with server-side encryption][1] in the *Amazon S3 User Guide*.
|
|
2221
|
+
# For more information about the encryption overriding behaviors in
|
|
2222
|
+
# directory buckets, see [Specifying server-side encryption with KMS
|
|
2223
|
+
# for new object uploads][2].
|
|
2224
|
+
#
|
|
2225
|
+
# In the Zonal endpoint API calls (except [CopyObject][3] and
|
|
2226
|
+
# [UploadPartCopy][4]) using the REST API, the encryption request
|
|
2227
|
+
# headers must match the encryption settings that are specified in the
|
|
2228
|
+
# `CreateSession` request. You can't override the values of the
|
|
2229
|
+
# encryption settings (`x-amz-server-side-encryption`,
|
|
2230
|
+
# `x-amz-server-side-encryption-aws-kms-key-id`,
|
|
2231
|
+
# `x-amz-server-side-encryption-context`, and
|
|
2232
|
+
# `x-amz-server-side-encryption-bucket-key-enabled`) that are
|
|
2233
|
+
# specified in the `CreateSession` request. You don't need to
|
|
2234
|
+
# explicitly specify these encryption settings values in Zonal
|
|
2235
|
+
# endpoint API calls, and Amazon S3 will use the encryption settings
|
|
2236
|
+
# values from the `CreateSession` request to protect new objects in
|
|
2237
|
+
# the directory bucket.
|
|
2238
|
+
#
|
|
2239
|
+
# <note markdown="1"> When you use the CLI or the Amazon Web Services SDKs, for
|
|
2240
|
+
# `CreateSession`, the session token refreshes automatically to avoid
|
|
2241
|
+
# service interruptions when a session expires. The CLI or the Amazon
|
|
2242
|
+
# Web Services SDKs use the bucket's default encryption configuration
|
|
2243
|
+
# for the `CreateSession` request. It's not supported to override the
|
|
2244
|
+
# encryption settings values in the `CreateSession` request. So in the
|
|
2245
|
+
# Zonal endpoint API calls (except [CopyObject][3] and
|
|
2246
|
+
# [UploadPartCopy][4]), the encryption request headers must match the
|
|
2247
|
+
# default encryption configuration of the directory bucket.
|
|
2248
|
+
#
|
|
2249
|
+
# </note>
|
|
2250
|
+
#
|
|
2251
|
+
# * <b>S3 access points for Amazon FSx </b> - When accessing data stored
|
|
2252
|
+
# in Amazon FSx file systems using S3 access points, the only valid
|
|
2253
|
+
# server side encryption option is `aws:fsx`. All Amazon FSx file
|
|
2254
|
+
# systems have encryption configured by default and are encrypted at
|
|
2255
|
+
# rest. Data is automatically encrypted before being written to the
|
|
2256
|
+
# file system, and automatically decrypted as it is read. These
|
|
2257
|
+
# processes are handled transparently by Amazon FSx.
|
|
2258
|
+
#
|
|
2259
|
+
#
|
|
2260
|
+
#
|
|
2261
|
+
# [1]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-express-serv-side-encryption.html
|
|
2262
|
+
# [2]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-express-specifying-kms-encryption.html
|
|
2263
|
+
# [3]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_CopyObject.html
|
|
2264
|
+
# [4]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_UploadPartCopy.html
|
|
1093
2265
|
# @option options [String] :storage_class
|
|
1094
2266
|
# By default, Amazon S3 uses the STANDARD Storage Class to store newly
|
|
1095
2267
|
# created objects. The STANDARD storage class provides high durability
|
|
1096
2268
|
# and high availability. Depending on performance needs, you can specify
|
|
1097
|
-
# a different Storage Class.
|
|
1098
|
-
#
|
|
1099
|
-
#
|
|
2269
|
+
# a different Storage Class. For more information, see [Storage
|
|
2270
|
+
# Classes][1] in the *Amazon S3 User Guide*.
|
|
2271
|
+
#
|
|
2272
|
+
# <note markdown="1"> * Directory buckets only support `EXPRESS_ONEZONE` (the S3 Express One
|
|
2273
|
+
# Zone storage class) in Availability Zones and `ONEZONE_IA` (the S3
|
|
2274
|
+
# One Zone-Infrequent Access storage class) in Dedicated Local Zones.
|
|
2275
|
+
#
|
|
2276
|
+
# * Amazon S3 on Outposts only uses the OUTPOSTS Storage Class.
|
|
2277
|
+
#
|
|
2278
|
+
# </note>
|
|
1100
2279
|
#
|
|
1101
2280
|
#
|
|
1102
2281
|
#
|
|
@@ -1105,51 +2284,114 @@ module Aws::S3
|
|
|
1105
2284
|
# If the bucket is configured as a website, redirects requests for this
|
|
1106
2285
|
# object to another object in the same bucket or to an external URL.
|
|
1107
2286
|
# Amazon S3 stores the value of this header in the object metadata.
|
|
2287
|
+
#
|
|
2288
|
+
# <note markdown="1"> This functionality is not supported for directory buckets.
|
|
2289
|
+
#
|
|
2290
|
+
# </note>
|
|
1108
2291
|
# @option options [String] :sse_customer_algorithm
|
|
1109
|
-
# Specifies the algorithm to use
|
|
2292
|
+
# Specifies the algorithm to use when encrypting the object (for
|
|
1110
2293
|
# example, AES256).
|
|
2294
|
+
#
|
|
2295
|
+
# <note markdown="1"> This functionality is not supported for directory buckets.
|
|
2296
|
+
#
|
|
2297
|
+
# </note>
|
|
1111
2298
|
# @option options [String] :sse_customer_key
|
|
1112
2299
|
# Specifies the customer-provided encryption key for Amazon S3 to use in
|
|
1113
2300
|
# encrypting data. This value is used to store the object and then it is
|
|
1114
2301
|
# discarded; Amazon S3 does not store the encryption key. The key must
|
|
1115
2302
|
# be appropriate for use with the algorithm specified in the
|
|
1116
2303
|
# `x-amz-server-side-encryption-customer-algorithm` header.
|
|
1117
|
-
# @option options [String] :sse_customer_key_md5
|
|
1118
|
-
# Specifies the 128-bit MD5 digest of the encryption key according to
|
|
1119
|
-
# RFC 1321. Amazon S3 uses this header for a message integrity check to
|
|
1120
|
-
# ensure that the encryption key was transmitted without error.
|
|
1121
|
-
# @option options [String] :ssekms_key_id
|
|
1122
|
-
# Specifies the ID (Key ID, Key ARN, or Key Alias) of the symmetric
|
|
1123
|
-
# encryption customer managed key to use for object encryption. All GET
|
|
1124
|
-
# and PUT requests for an object protected by KMS will fail if they're
|
|
1125
|
-
# not made via SSL or using SigV4. For information about configuring any
|
|
1126
|
-
# of the officially supported Amazon Web Services SDKs and Amazon Web
|
|
1127
|
-
# Services CLI, see [Specifying the Signature Version in Request
|
|
1128
|
-
# Authentication][1] in the *Amazon S3 User Guide*.
|
|
1129
2304
|
#
|
|
2305
|
+
# <note markdown="1"> This functionality is not supported for directory buckets.
|
|
1130
2306
|
#
|
|
2307
|
+
# </note>
|
|
2308
|
+
# @option options [String] :sse_customer_key_md5
|
|
2309
|
+
# Specifies the 128-bit MD5 digest of the customer-provided encryption
|
|
2310
|
+
# key according to RFC 1321. Amazon S3 uses this header for a message
|
|
2311
|
+
# integrity check to ensure that the encryption key was transmitted
|
|
2312
|
+
# without error.
|
|
1131
2313
|
#
|
|
1132
|
-
#
|
|
2314
|
+
# <note markdown="1"> This functionality is not supported for directory buckets.
|
|
2315
|
+
#
|
|
2316
|
+
# </note>
|
|
2317
|
+
# @option options [String] :ssekms_key_id
|
|
2318
|
+
# Specifies the KMS key ID (Key ID, Key ARN, or Key Alias) to use for
|
|
2319
|
+
# object encryption. If the KMS key doesn't exist in the same account
|
|
2320
|
+
# that's issuing the command, you must use the full Key ARN not the Key
|
|
2321
|
+
# ID.
|
|
2322
|
+
#
|
|
2323
|
+
# **General purpose buckets** - If you specify
|
|
2324
|
+
# `x-amz-server-side-encryption` with `aws:kms` or `aws:kms:dsse`, this
|
|
2325
|
+
# header specifies the ID (Key ID, Key ARN, or Key Alias) of the KMS key
|
|
2326
|
+
# to use. If you specify `x-amz-server-side-encryption:aws:kms` or
|
|
2327
|
+
# `x-amz-server-side-encryption:aws:kms:dsse`, but do not provide
|
|
2328
|
+
# `x-amz-server-side-encryption-aws-kms-key-id`, Amazon S3 uses the
|
|
2329
|
+
# Amazon Web Services managed key (`aws/s3`) to protect the data.
|
|
2330
|
+
#
|
|
2331
|
+
# **Directory buckets** - To encrypt data using SSE-KMS, it's
|
|
2332
|
+
# recommended to specify the `x-amz-server-side-encryption` header to
|
|
2333
|
+
# `aws:kms`. Then, the `x-amz-server-side-encryption-aws-kms-key-id`
|
|
2334
|
+
# header implicitly uses the bucket's default KMS customer managed key
|
|
2335
|
+
# ID. If you want to explicitly set the `
|
|
2336
|
+
# x-amz-server-side-encryption-aws-kms-key-id` header, it must match the
|
|
2337
|
+
# bucket's default customer managed key (using key ID or ARN, not
|
|
2338
|
+
# alias). Your SSE-KMS configuration can only support 1 [customer
|
|
2339
|
+
# managed key][1] per directory bucket's lifetime. The [Amazon Web
|
|
2340
|
+
# Services managed key][2] (`aws/s3`) isn't supported. Incorrect key
|
|
2341
|
+
# specification results in an HTTP `400 Bad Request` error.
|
|
2342
|
+
#
|
|
2343
|
+
#
|
|
2344
|
+
#
|
|
2345
|
+
# [1]: https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#customer-cmk
|
|
2346
|
+
# [2]: https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#aws-managed-cmk
|
|
1133
2347
|
# @option options [String] :ssekms_encryption_context
|
|
1134
2348
|
# Specifies the Amazon Web Services KMS Encryption Context to use for
|
|
1135
|
-
# object encryption. The value of this header is a
|
|
1136
|
-
#
|
|
2349
|
+
# object encryption. The value of this header is a Base64 encoded string
|
|
2350
|
+
# of a UTF-8 encoded JSON, which contains the encryption context as
|
|
2351
|
+
# key-value pairs.
|
|
2352
|
+
#
|
|
2353
|
+
# **Directory buckets** - You can optionally provide an explicit
|
|
2354
|
+
# encryption context value. The value must match the default encryption
|
|
2355
|
+
# context - the bucket Amazon Resource Name (ARN). An additional
|
|
2356
|
+
# encryption context value is not supported.
|
|
1137
2357
|
# @option options [Boolean] :bucket_key_enabled
|
|
1138
2358
|
# Specifies whether Amazon S3 should use an S3 Bucket Key for object
|
|
1139
2359
|
# encryption with server-side encryption using Key Management Service
|
|
1140
|
-
# (KMS) keys (SSE-KMS).
|
|
1141
|
-
# to use an S3 Bucket Key for object encryption with SSE-KMS.
|
|
2360
|
+
# (KMS) keys (SSE-KMS).
|
|
1142
2361
|
#
|
|
1143
|
-
#
|
|
2362
|
+
# **General purpose buckets** - Setting this header to `true` causes
|
|
2363
|
+
# Amazon S3 to use an S3 Bucket Key for object encryption with SSE-KMS.
|
|
2364
|
+
# Also, specifying this header with a PUT action doesn't affect
|
|
1144
2365
|
# bucket-level settings for S3 Bucket Key.
|
|
2366
|
+
#
|
|
2367
|
+
# **Directory buckets** - S3 Bucket Keys are always enabled for `GET`
|
|
2368
|
+
# and `PUT` operations in a directory bucket and can’t be disabled. S3
|
|
2369
|
+
# Bucket Keys aren't supported, when you copy SSE-KMS encrypted objects
|
|
2370
|
+
# from general purpose buckets to directory buckets, from directory
|
|
2371
|
+
# buckets to general purpose buckets, or between directory buckets,
|
|
2372
|
+
# through [CopyObject][1], [UploadPartCopy][2], [the Copy operation in
|
|
2373
|
+
# Batch Operations][3], or [the import jobs][4]. In this case, Amazon S3
|
|
2374
|
+
# makes a call to KMS every time a copy request is made for a
|
|
2375
|
+
# KMS-encrypted object.
|
|
2376
|
+
#
|
|
2377
|
+
#
|
|
2378
|
+
#
|
|
2379
|
+
# [1]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_CopyObject.html
|
|
2380
|
+
# [2]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_UploadPartCopy.html
|
|
2381
|
+
# [3]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/directory-buckets-objects-Batch-Ops
|
|
2382
|
+
# [4]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/create-import-job
|
|
1145
2383
|
# @option options [String] :request_payer
|
|
1146
2384
|
# Confirms that the requester knows that they will be charged for the
|
|
1147
2385
|
# request. Bucket owners need not specify this parameter in their
|
|
1148
|
-
# requests. If either the source or destination
|
|
1149
|
-
#
|
|
1150
|
-
#
|
|
1151
|
-
#
|
|
1152
|
-
#
|
|
2386
|
+
# requests. If either the source or destination S3 bucket has Requester
|
|
2387
|
+
# Pays enabled, the requester will pay for corresponding charges to copy
|
|
2388
|
+
# the object. For information about downloading objects from Requester
|
|
2389
|
+
# Pays buckets, see [Downloading Objects in Requester Pays Buckets][1]
|
|
2390
|
+
# in the *Amazon S3 User Guide*.
|
|
2391
|
+
#
|
|
2392
|
+
# <note markdown="1"> This functionality is not supported for directory buckets.
|
|
2393
|
+
#
|
|
2394
|
+
# </note>
|
|
1153
2395
|
#
|
|
1154
2396
|
#
|
|
1155
2397
|
#
|
|
@@ -1157,33 +2399,57 @@ module Aws::S3
|
|
|
1157
2399
|
# @option options [String] :tagging
|
|
1158
2400
|
# The tag-set for the object. The tag-set must be encoded as URL Query
|
|
1159
2401
|
# parameters.
|
|
2402
|
+
#
|
|
2403
|
+
# <note markdown="1"> This functionality is not supported for directory buckets.
|
|
2404
|
+
#
|
|
2405
|
+
# </note>
|
|
1160
2406
|
# @option options [String] :object_lock_mode
|
|
1161
2407
|
# Specifies the Object Lock mode that you want to apply to the uploaded
|
|
1162
2408
|
# object.
|
|
2409
|
+
#
|
|
2410
|
+
# <note markdown="1"> This functionality is not supported for directory buckets.
|
|
2411
|
+
#
|
|
2412
|
+
# </note>
|
|
1163
2413
|
# @option options [Time,DateTime,Date,Integer,String] :object_lock_retain_until_date
|
|
1164
2414
|
# Specifies the date and time when you want the Object Lock to expire.
|
|
2415
|
+
#
|
|
2416
|
+
# <note markdown="1"> This functionality is not supported for directory buckets.
|
|
2417
|
+
#
|
|
2418
|
+
# </note>
|
|
1165
2419
|
# @option options [String] :object_lock_legal_hold_status
|
|
1166
2420
|
# Specifies whether you want to apply a legal hold to the uploaded
|
|
1167
2421
|
# object.
|
|
2422
|
+
#
|
|
2423
|
+
# <note markdown="1"> This functionality is not supported for directory buckets.
|
|
2424
|
+
#
|
|
2425
|
+
# </note>
|
|
1168
2426
|
# @option options [String] :expected_bucket_owner
|
|
1169
|
-
# The account ID of the expected bucket owner. If the
|
|
1170
|
-
#
|
|
1171
|
-
# Forbidden` (access denied).
|
|
2427
|
+
# The account ID of the expected bucket owner. If the account ID that
|
|
2428
|
+
# you provide does not match the actual owner of the bucket, the request
|
|
2429
|
+
# fails with the HTTP status code `403 Forbidden` (access denied).
|
|
1172
2430
|
# @option options [String] :checksum_algorithm
|
|
1173
|
-
# Indicates the algorithm you want Amazon S3 to use to create the
|
|
2431
|
+
# Indicates the algorithm that you want Amazon S3 to use to create the
|
|
1174
2432
|
# checksum for the object. For more information, see [Checking object
|
|
1175
2433
|
# integrity][1] in the *Amazon S3 User Guide*.
|
|
1176
2434
|
#
|
|
1177
2435
|
#
|
|
1178
2436
|
#
|
|
1179
2437
|
# [1]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html
|
|
2438
|
+
# @option options [String] :checksum_type
|
|
2439
|
+
# Indicates the checksum type that you want Amazon S3 to use to
|
|
2440
|
+
# calculate the object’s checksum value. For more information, see
|
|
2441
|
+
# [Checking object integrity in the Amazon S3 User Guide][1].
|
|
2442
|
+
#
|
|
2443
|
+
#
|
|
2444
|
+
#
|
|
2445
|
+
# [1]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html
|
|
1180
2446
|
# @return [MultipartUpload]
|
|
1181
2447
|
def initiate_multipart_upload(options = {})
|
|
1182
2448
|
options = options.merge(
|
|
1183
2449
|
bucket: @bucket_name,
|
|
1184
2450
|
key: @key
|
|
1185
2451
|
)
|
|
1186
|
-
resp = Aws::Plugins::UserAgent.
|
|
2452
|
+
resp = Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
|
|
1187
2453
|
@client.create_multipart_upload(options)
|
|
1188
2454
|
end
|
|
1189
2455
|
MultipartUpload.new(
|
|
@@ -1206,21 +2472,25 @@ module Aws::S3
|
|
|
1206
2472
|
# content_length: 1,
|
|
1207
2473
|
# content_md5: "ContentMD5",
|
|
1208
2474
|
# content_type: "ContentType",
|
|
1209
|
-
# checksum_algorithm: "CRC32", # accepts CRC32, CRC32C, SHA1, SHA256
|
|
2475
|
+
# checksum_algorithm: "CRC32", # accepts CRC32, CRC32C, SHA1, SHA256, CRC64NVME
|
|
1210
2476
|
# checksum_crc32: "ChecksumCRC32",
|
|
1211
2477
|
# checksum_crc32c: "ChecksumCRC32C",
|
|
2478
|
+
# checksum_crc64nvme: "ChecksumCRC64NVME",
|
|
1212
2479
|
# checksum_sha1: "ChecksumSHA1",
|
|
1213
2480
|
# checksum_sha256: "ChecksumSHA256",
|
|
1214
2481
|
# expires: Time.now,
|
|
2482
|
+
# if_match: "IfMatch",
|
|
2483
|
+
# if_none_match: "IfNoneMatch",
|
|
1215
2484
|
# grant_full_control: "GrantFullControl",
|
|
1216
2485
|
# grant_read: "GrantRead",
|
|
1217
2486
|
# grant_read_acp: "GrantReadACP",
|
|
1218
2487
|
# grant_write_acp: "GrantWriteACP",
|
|
2488
|
+
# write_offset_bytes: 1,
|
|
1219
2489
|
# metadata: {
|
|
1220
2490
|
# "MetadataKey" => "MetadataValue",
|
|
1221
2491
|
# },
|
|
1222
|
-
# server_side_encryption: "AES256", # accepts AES256, aws:kms, aws:kms:dsse
|
|
1223
|
-
# storage_class: "STANDARD", # accepts STANDARD, REDUCED_REDUNDANCY, STANDARD_IA, ONEZONE_IA, INTELLIGENT_TIERING, GLACIER, DEEP_ARCHIVE, OUTPOSTS, GLACIER_IR, SNOW
|
|
2492
|
+
# server_side_encryption: "AES256", # accepts AES256, aws:fsx, aws:kms, aws:kms:dsse
|
|
2493
|
+
# storage_class: "STANDARD", # accepts STANDARD, REDUCED_REDUNDANCY, STANDARD_IA, ONEZONE_IA, INTELLIGENT_TIERING, GLACIER, DEEP_ARCHIVE, OUTPOSTS, GLACIER_IR, SNOW, EXPRESS_ONEZONE, FSX_OPENZFS, FSX_ONTAP
|
|
1224
2494
|
# website_redirect_location: "WebsiteRedirectLocation",
|
|
1225
2495
|
# sse_customer_algorithm: "SSECustomerAlgorithm",
|
|
1226
2496
|
# sse_customer_key: "SSECustomerKey",
|
|
@@ -1238,13 +2508,41 @@ module Aws::S3
|
|
|
1238
2508
|
# @param [Hash] options ({})
|
|
1239
2509
|
# @option options [String] :acl
|
|
1240
2510
|
# The canned ACL to apply to the object. For more information, see
|
|
1241
|
-
# [Canned ACL][1]
|
|
2511
|
+
# [Canned ACL][1] in the *Amazon S3 User Guide*.
|
|
2512
|
+
#
|
|
2513
|
+
# When adding a new object, you can use headers to grant ACL-based
|
|
2514
|
+
# permissions to individual Amazon Web Services accounts or to
|
|
2515
|
+
# predefined groups defined by Amazon S3. These permissions are then
|
|
2516
|
+
# added to the ACL on the object. By default, all objects are private.
|
|
2517
|
+
# Only the owner has full access control. For more information, see
|
|
2518
|
+
# [Access Control List (ACL) Overview][2] and [Managing ACLs Using the
|
|
2519
|
+
# REST API][3] in the *Amazon S3 User Guide*.
|
|
2520
|
+
#
|
|
2521
|
+
# If the bucket that you're uploading objects to uses the bucket owner
|
|
2522
|
+
# enforced setting for S3 Object Ownership, ACLs are disabled and no
|
|
2523
|
+
# longer affect permissions. Buckets that use this setting only accept
|
|
2524
|
+
# PUT requests that don't specify an ACL or PUT requests that specify
|
|
2525
|
+
# bucket owner full control ACLs, such as the
|
|
2526
|
+
# `bucket-owner-full-control` canned ACL or an equivalent form of this
|
|
2527
|
+
# ACL expressed in the XML format. PUT requests that contain other ACLs
|
|
2528
|
+
# (for example, custom grants to certain Amazon Web Services accounts)
|
|
2529
|
+
# fail and return a `400` error with the error code
|
|
2530
|
+
# `AccessControlListNotSupported`. For more information, see [
|
|
2531
|
+
# Controlling ownership of objects and disabling ACLs][4] in the *Amazon
|
|
2532
|
+
# S3 User Guide*.
|
|
2533
|
+
#
|
|
2534
|
+
# <note markdown="1"> * This functionality is not supported for directory buckets.
|
|
2535
|
+
#
|
|
2536
|
+
# * This functionality is not supported for Amazon S3 on Outposts.
|
|
1242
2537
|
#
|
|
1243
|
-
#
|
|
2538
|
+
# </note>
|
|
1244
2539
|
#
|
|
1245
2540
|
#
|
|
1246
2541
|
#
|
|
1247
2542
|
# [1]: https://docs.aws.amazon.com/AmazonS3/latest/dev/acl-overview.html#CannedACL
|
|
2543
|
+
# [2]: https://docs.aws.amazon.com/AmazonS3/latest/dev/acl-overview.html
|
|
2544
|
+
# [3]: https://docs.aws.amazon.com/AmazonS3/latest/dev/acl-using-rest-api.html
|
|
2545
|
+
# [4]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/about-object-ownership.html
|
|
1248
2546
|
# @option options [String, StringIO, File] :body
|
|
1249
2547
|
# Object data.
|
|
1250
2548
|
# @option options [String] :cache_control
|
|
@@ -1283,7 +2581,7 @@ module Aws::S3
|
|
|
1283
2581
|
#
|
|
1284
2582
|
# [1]: https://www.rfc-editor.org/rfc/rfc9110.html#name-content-length
|
|
1285
2583
|
# @option options [String] :content_md5
|
|
1286
|
-
# The
|
|
2584
|
+
# The Base64 encoded 128-bit `MD5` digest of the message (without the
|
|
1287
2585
|
# headers) according to RFC 1864. This header can be used as a message
|
|
1288
2586
|
# integrity check to verify that the data is the same data that was
|
|
1289
2587
|
# originally sent. Although it is optional, we recommend using the
|
|
@@ -1291,9 +2589,22 @@ module Aws::S3
|
|
|
1291
2589
|
# information about REST request authentication, see [REST
|
|
1292
2590
|
# Authentication][1].
|
|
1293
2591
|
#
|
|
2592
|
+
# <note markdown="1"> The `Content-MD5` or `x-amz-sdk-checksum-algorithm` header is required
|
|
2593
|
+
# for any request to upload an object with a retention period configured
|
|
2594
|
+
# using Amazon S3 Object Lock. For more information, see [Uploading
|
|
2595
|
+
# objects to an Object Lock enabled bucket ][2] in the *Amazon S3 User
|
|
2596
|
+
# Guide*.
|
|
2597
|
+
#
|
|
2598
|
+
# </note>
|
|
2599
|
+
#
|
|
2600
|
+
# <note markdown="1"> This functionality is not supported for directory buckets.
|
|
2601
|
+
#
|
|
2602
|
+
# </note>
|
|
2603
|
+
#
|
|
1294
2604
|
#
|
|
1295
2605
|
#
|
|
1296
2606
|
# [1]: https://docs.aws.amazon.com/AmazonS3/latest/dev/RESTAuthentication.html
|
|
2607
|
+
# [2]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/object-lock-managing.html#object-lock-put-object
|
|
1297
2608
|
# @option options [String] :content_type
|
|
1298
2609
|
# A standard MIME type describing the format of the contents. For more
|
|
1299
2610
|
# information, see
|
|
@@ -1304,25 +2615,54 @@ module Aws::S3
|
|
|
1304
2615
|
# [1]: https://www.rfc-editor.org/rfc/rfc9110.html#name-content-type
|
|
1305
2616
|
# @option options [String] :checksum_algorithm
|
|
1306
2617
|
# Indicates the algorithm used to create the checksum for the object
|
|
1307
|
-
# when
|
|
1308
|
-
# functionality if
|
|
1309
|
-
# must be a corresponding `x-amz-checksum` or
|
|
1310
|
-
# sent. Otherwise, Amazon S3 fails the request
|
|
1311
|
-
# `400 Bad Request`.
|
|
1312
|
-
# integrity][1] in the *Amazon S3 User Guide*.
|
|
2618
|
+
# when you use the SDK. This header will not provide any additional
|
|
2619
|
+
# functionality if you don't use the SDK. When you send this header,
|
|
2620
|
+
# there must be a corresponding `x-amz-checksum-algorithm ` or
|
|
2621
|
+
# `x-amz-trailer` header sent. Otherwise, Amazon S3 fails the request
|
|
2622
|
+
# with the HTTP status code `400 Bad Request`.
|
|
1313
2623
|
#
|
|
1314
|
-
#
|
|
1315
|
-
#
|
|
2624
|
+
# For the `x-amz-checksum-algorithm ` header, replace ` algorithm ` with
|
|
2625
|
+
# the supported algorithm from the following list:
|
|
2626
|
+
#
|
|
2627
|
+
# * `CRC32`
|
|
2628
|
+
#
|
|
2629
|
+
# * `CRC32C`
|
|
2630
|
+
#
|
|
2631
|
+
# * `CRC64NVME`
|
|
2632
|
+
#
|
|
2633
|
+
# * `SHA1`
|
|
2634
|
+
#
|
|
2635
|
+
# * `SHA256`
|
|
2636
|
+
#
|
|
2637
|
+
# For more information, see [Checking object integrity][1] in the
|
|
2638
|
+
# *Amazon S3 User Guide*.
|
|
2639
|
+
#
|
|
2640
|
+
# If the individual checksum value you provide through
|
|
2641
|
+
# `x-amz-checksum-algorithm ` doesn't match the checksum algorithm you
|
|
2642
|
+
# set through `x-amz-sdk-checksum-algorithm`, Amazon S3 fails the
|
|
2643
|
+
# request with a `BadDigest` error.
|
|
2644
|
+
#
|
|
2645
|
+
# <note markdown="1"> The `Content-MD5` or `x-amz-sdk-checksum-algorithm` header is required
|
|
2646
|
+
# for any request to upload an object with a retention period configured
|
|
2647
|
+
# using Amazon S3 Object Lock. For more information, see [Uploading
|
|
2648
|
+
# objects to an Object Lock enabled bucket ][2] in the *Amazon S3 User
|
|
2649
|
+
# Guide*.
|
|
2650
|
+
#
|
|
2651
|
+
# </note>
|
|
2652
|
+
#
|
|
2653
|
+
# For directory buckets, when you use Amazon Web Services SDKs, `CRC32`
|
|
2654
|
+
# is the default checksum algorithm that's used for performance.
|
|
1316
2655
|
#
|
|
1317
2656
|
#
|
|
1318
2657
|
#
|
|
1319
2658
|
# [1]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html
|
|
2659
|
+
# [2]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/object-lock-managing.html#object-lock-put-object
|
|
1320
2660
|
# @option options [String] :checksum_crc32
|
|
1321
2661
|
# This header can be used as a data integrity check to verify that the
|
|
1322
2662
|
# data received is the same data that was originally sent. This header
|
|
1323
|
-
# specifies the
|
|
1324
|
-
# more information, see [Checking object integrity][1] in the
|
|
1325
|
-
# User Guide*.
|
|
2663
|
+
# specifies the Base64 encoded, 32-bit `CRC32` checksum of the object.
|
|
2664
|
+
# For more information, see [Checking object integrity][1] in the
|
|
2665
|
+
# *Amazon S3 User Guide*.
|
|
1326
2666
|
#
|
|
1327
2667
|
#
|
|
1328
2668
|
#
|
|
@@ -1330,17 +2670,28 @@ module Aws::S3
|
|
|
1330
2670
|
# @option options [String] :checksum_crc32c
|
|
1331
2671
|
# This header can be used as a data integrity check to verify that the
|
|
1332
2672
|
# data received is the same data that was originally sent. This header
|
|
1333
|
-
# specifies the
|
|
2673
|
+
# specifies the Base64 encoded, 32-bit `CRC32C` checksum of the object.
|
|
1334
2674
|
# For more information, see [Checking object integrity][1] in the
|
|
1335
2675
|
# *Amazon S3 User Guide*.
|
|
1336
2676
|
#
|
|
1337
2677
|
#
|
|
1338
2678
|
#
|
|
1339
2679
|
# [1]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html
|
|
2680
|
+
# @option options [String] :checksum_crc64nvme
|
|
2681
|
+
# This header can be used as a data integrity check to verify that the
|
|
2682
|
+
# data received is the same data that was originally sent. This header
|
|
2683
|
+
# specifies the Base64 encoded, 64-bit `CRC64NVME` checksum of the
|
|
2684
|
+
# object. The `CRC64NVME` checksum is always a full object checksum. For
|
|
2685
|
+
# more information, see [Checking object integrity in the Amazon S3 User
|
|
2686
|
+
# Guide][1].
|
|
2687
|
+
#
|
|
2688
|
+
#
|
|
2689
|
+
#
|
|
2690
|
+
# [1]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html
|
|
1340
2691
|
# @option options [String] :checksum_sha1
|
|
1341
2692
|
# This header can be used as a data integrity check to verify that the
|
|
1342
2693
|
# data received is the same data that was originally sent. This header
|
|
1343
|
-
# specifies the
|
|
2694
|
+
# specifies the Base64 encoded, 160-bit `SHA1` digest of the object. For
|
|
1344
2695
|
# more information, see [Checking object integrity][1] in the *Amazon S3
|
|
1345
2696
|
# User Guide*.
|
|
1346
2697
|
#
|
|
@@ -1350,7 +2701,7 @@ module Aws::S3
|
|
|
1350
2701
|
# @option options [String] :checksum_sha256
|
|
1351
2702
|
# This header can be used as a data integrity check to verify that the
|
|
1352
2703
|
# data received is the same data that was originally sent. This header
|
|
1353
|
-
# specifies the
|
|
2704
|
+
# specifies the Base64 encoded, 256-bit `SHA256` digest of the object.
|
|
1354
2705
|
# For more information, see [Checking object integrity][1] in the
|
|
1355
2706
|
# *Amazon S3 User Guide*.
|
|
1356
2707
|
#
|
|
@@ -1365,35 +2716,173 @@ module Aws::S3
|
|
|
1365
2716
|
#
|
|
1366
2717
|
#
|
|
1367
2718
|
# [1]: https://www.rfc-editor.org/rfc/rfc7234#section-5.3
|
|
2719
|
+
# @option options [String] :if_match
|
|
2720
|
+
# Uploads the object only if the ETag (entity tag) value provided during
|
|
2721
|
+
# the WRITE operation matches the ETag of the object in S3. If the ETag
|
|
2722
|
+
# values do not match, the operation returns a `412 Precondition Failed`
|
|
2723
|
+
# error.
|
|
2724
|
+
#
|
|
2725
|
+
# If a conflicting operation occurs during the upload S3 returns a `409
|
|
2726
|
+
# ConditionalRequestConflict` response. On a 409 failure you should
|
|
2727
|
+
# fetch the object's ETag and retry the upload.
|
|
2728
|
+
#
|
|
2729
|
+
# Expects the ETag value as a string.
|
|
2730
|
+
#
|
|
2731
|
+
# For more information about conditional requests, see [RFC 7232][1], or
|
|
2732
|
+
# [Conditional requests][2] in the *Amazon S3 User Guide*.
|
|
2733
|
+
#
|
|
2734
|
+
#
|
|
2735
|
+
#
|
|
2736
|
+
# [1]: https://tools.ietf.org/html/rfc7232
|
|
2737
|
+
# [2]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/conditional-requests.html
|
|
2738
|
+
# @option options [String] :if_none_match
|
|
2739
|
+
# Uploads the object only if the object key name does not already exist
|
|
2740
|
+
# in the bucket specified. Otherwise, Amazon S3 returns a `412
|
|
2741
|
+
# Precondition Failed` error.
|
|
2742
|
+
#
|
|
2743
|
+
# If a conflicting operation occurs during the upload S3 returns a `409
|
|
2744
|
+
# ConditionalRequestConflict` response. On a 409 failure you should
|
|
2745
|
+
# retry the upload.
|
|
2746
|
+
#
|
|
2747
|
+
# Expects the '*' (asterisk) character.
|
|
2748
|
+
#
|
|
2749
|
+
# For more information about conditional requests, see [RFC 7232][1], or
|
|
2750
|
+
# [Conditional requests][2] in the *Amazon S3 User Guide*.
|
|
2751
|
+
#
|
|
2752
|
+
#
|
|
2753
|
+
#
|
|
2754
|
+
# [1]: https://tools.ietf.org/html/rfc7232
|
|
2755
|
+
# [2]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/conditional-requests.html
|
|
1368
2756
|
# @option options [String] :grant_full_control
|
|
1369
2757
|
# Gives the grantee READ, READ\_ACP, and WRITE\_ACP permissions on the
|
|
1370
2758
|
# object.
|
|
1371
2759
|
#
|
|
1372
|
-
# This
|
|
2760
|
+
# <note markdown="1"> * This functionality is not supported for directory buckets.
|
|
2761
|
+
#
|
|
2762
|
+
# * This functionality is not supported for Amazon S3 on Outposts.
|
|
2763
|
+
#
|
|
2764
|
+
# </note>
|
|
1373
2765
|
# @option options [String] :grant_read
|
|
1374
2766
|
# Allows grantee to read the object data and its metadata.
|
|
1375
2767
|
#
|
|
1376
|
-
# This
|
|
2768
|
+
# <note markdown="1"> * This functionality is not supported for directory buckets.
|
|
2769
|
+
#
|
|
2770
|
+
# * This functionality is not supported for Amazon S3 on Outposts.
|
|
2771
|
+
#
|
|
2772
|
+
# </note>
|
|
1377
2773
|
# @option options [String] :grant_read_acp
|
|
1378
2774
|
# Allows grantee to read the object ACL.
|
|
1379
2775
|
#
|
|
1380
|
-
# This
|
|
2776
|
+
# <note markdown="1"> * This functionality is not supported for directory buckets.
|
|
2777
|
+
#
|
|
2778
|
+
# * This functionality is not supported for Amazon S3 on Outposts.
|
|
2779
|
+
#
|
|
2780
|
+
# </note>
|
|
1381
2781
|
# @option options [String] :grant_write_acp
|
|
1382
2782
|
# Allows grantee to write the ACL for the applicable object.
|
|
1383
2783
|
#
|
|
1384
|
-
# This
|
|
2784
|
+
# <note markdown="1"> * This functionality is not supported for directory buckets.
|
|
2785
|
+
#
|
|
2786
|
+
# * This functionality is not supported for Amazon S3 on Outposts.
|
|
2787
|
+
#
|
|
2788
|
+
# </note>
|
|
2789
|
+
# @option options [Integer] :write_offset_bytes
|
|
2790
|
+
# Specifies the offset for appending data to existing objects in bytes.
|
|
2791
|
+
# The offset must be equal to the size of the existing object being
|
|
2792
|
+
# appended to. If no object exists, setting this header to 0 will create
|
|
2793
|
+
# a new object.
|
|
2794
|
+
#
|
|
2795
|
+
# <note markdown="1"> This functionality is only supported for objects in the Amazon S3
|
|
2796
|
+
# Express One Zone storage class in directory buckets.
|
|
2797
|
+
#
|
|
2798
|
+
# </note>
|
|
1385
2799
|
# @option options [Hash<String,String>] :metadata
|
|
1386
2800
|
# A map of metadata to store with the object in S3.
|
|
1387
2801
|
# @option options [String] :server_side_encryption
|
|
1388
|
-
# The server-side encryption algorithm used when
|
|
1389
|
-
# Amazon S3
|
|
2802
|
+
# The server-side encryption algorithm that was used when you store this
|
|
2803
|
+
# object in Amazon S3 or Amazon FSx.
|
|
2804
|
+
#
|
|
2805
|
+
# * <b>General purpose buckets </b> - You have four mutually exclusive
|
|
2806
|
+
# options to protect data using server-side encryption in Amazon S3,
|
|
2807
|
+
# depending on how you choose to manage the encryption keys.
|
|
2808
|
+
# Specifically, the encryption key options are Amazon S3 managed keys
|
|
2809
|
+
# (SSE-S3), Amazon Web Services KMS keys (SSE-KMS or DSSE-KMS), and
|
|
2810
|
+
# customer-provided keys (SSE-C). Amazon S3 encrypts data with
|
|
2811
|
+
# server-side encryption by using Amazon S3 managed keys (SSE-S3) by
|
|
2812
|
+
# default. You can optionally tell Amazon S3 to encrypt data at rest
|
|
2813
|
+
# by using server-side encryption with other key options. For more
|
|
2814
|
+
# information, see [Using Server-Side Encryption][1] in the *Amazon S3
|
|
2815
|
+
# User Guide*.
|
|
2816
|
+
#
|
|
2817
|
+
# * <b>Directory buckets </b> - For directory buckets, there are only
|
|
2818
|
+
# two supported options for server-side encryption: server-side
|
|
2819
|
+
# encryption with Amazon S3 managed keys (SSE-S3) (`AES256`) and
|
|
2820
|
+
# server-side encryption with KMS keys (SSE-KMS) (`aws:kms`). We
|
|
2821
|
+
# recommend that the bucket's default encryption uses the desired
|
|
2822
|
+
# encryption configuration and you don't override the bucket default
|
|
2823
|
+
# encryption in your `CreateSession` requests or `PUT` object
|
|
2824
|
+
# requests. Then, new objects are automatically encrypted with the
|
|
2825
|
+
# desired encryption settings. For more information, see [Protecting
|
|
2826
|
+
# data with server-side encryption][2] in the *Amazon S3 User Guide*.
|
|
2827
|
+
# For more information about the encryption overriding behaviors in
|
|
2828
|
+
# directory buckets, see [Specifying server-side encryption with KMS
|
|
2829
|
+
# for new object uploads][3].
|
|
2830
|
+
#
|
|
2831
|
+
# In the Zonal endpoint API calls (except [CopyObject][4] and
|
|
2832
|
+
# [UploadPartCopy][5]) using the REST API, the encryption request
|
|
2833
|
+
# headers must match the encryption settings that are specified in the
|
|
2834
|
+
# `CreateSession` request. You can't override the values of the
|
|
2835
|
+
# encryption settings (`x-amz-server-side-encryption`,
|
|
2836
|
+
# `x-amz-server-side-encryption-aws-kms-key-id`,
|
|
2837
|
+
# `x-amz-server-side-encryption-context`, and
|
|
2838
|
+
# `x-amz-server-side-encryption-bucket-key-enabled`) that are
|
|
2839
|
+
# specified in the `CreateSession` request. You don't need to
|
|
2840
|
+
# explicitly specify these encryption settings values in Zonal
|
|
2841
|
+
# endpoint API calls, and Amazon S3 will use the encryption settings
|
|
2842
|
+
# values from the `CreateSession` request to protect new objects in
|
|
2843
|
+
# the directory bucket.
|
|
2844
|
+
#
|
|
2845
|
+
# <note markdown="1"> When you use the CLI or the Amazon Web Services SDKs, for
|
|
2846
|
+
# `CreateSession`, the session token refreshes automatically to avoid
|
|
2847
|
+
# service interruptions when a session expires. The CLI or the Amazon
|
|
2848
|
+
# Web Services SDKs use the bucket's default encryption configuration
|
|
2849
|
+
# for the `CreateSession` request. It's not supported to override the
|
|
2850
|
+
# encryption settings values in the `CreateSession` request. So in the
|
|
2851
|
+
# Zonal endpoint API calls (except [CopyObject][4] and
|
|
2852
|
+
# [UploadPartCopy][5]), the encryption request headers must match the
|
|
2853
|
+
# default encryption configuration of the directory bucket.
|
|
2854
|
+
#
|
|
2855
|
+
# </note>
|
|
2856
|
+
#
|
|
2857
|
+
# * <b>S3 access points for Amazon FSx </b> - When accessing data stored
|
|
2858
|
+
# in Amazon FSx file systems using S3 access points, the only valid
|
|
2859
|
+
# server side encryption option is `aws:fsx`. All Amazon FSx file
|
|
2860
|
+
# systems have encryption configured by default and are encrypted at
|
|
2861
|
+
# rest. Data is automatically encrypted before being written to the
|
|
2862
|
+
# file system, and automatically decrypted as it is read. These
|
|
2863
|
+
# processes are handled transparently by Amazon FSx.
|
|
2864
|
+
#
|
|
2865
|
+
#
|
|
2866
|
+
#
|
|
2867
|
+
# [1]: https://docs.aws.amazon.com/AmazonS3/latest/dev/UsingServerSideEncryption.html
|
|
2868
|
+
# [2]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-express-serv-side-encryption.html
|
|
2869
|
+
# [3]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-express-specifying-kms-encryption.html
|
|
2870
|
+
# [4]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_CopyObject.html
|
|
2871
|
+
# [5]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_UploadPartCopy.html
|
|
1390
2872
|
# @option options [String] :storage_class
|
|
1391
2873
|
# By default, Amazon S3 uses the STANDARD Storage Class to store newly
|
|
1392
2874
|
# created objects. The STANDARD storage class provides high durability
|
|
1393
2875
|
# and high availability. Depending on performance needs, you can specify
|
|
1394
|
-
# a different Storage Class.
|
|
1395
|
-
#
|
|
1396
|
-
#
|
|
2876
|
+
# a different Storage Class. For more information, see [Storage
|
|
2877
|
+
# Classes][1] in the *Amazon S3 User Guide*.
|
|
2878
|
+
#
|
|
2879
|
+
# <note markdown="1"> * Directory buckets only support `EXPRESS_ONEZONE` (the S3 Express One
|
|
2880
|
+
# Zone storage class) in Availability Zones and `ONEZONE_IA` (the S3
|
|
2881
|
+
# One Zone-Infrequent Access storage class) in Dedicated Local Zones.
|
|
2882
|
+
#
|
|
2883
|
+
# * Amazon S3 on Outposts only uses the OUTPOSTS Storage Class.
|
|
2884
|
+
#
|
|
2885
|
+
# </note>
|
|
1397
2886
|
#
|
|
1398
2887
|
#
|
|
1399
2888
|
#
|
|
@@ -1402,7 +2891,8 @@ module Aws::S3
|
|
|
1402
2891
|
# If the bucket is configured as a website, redirects requests for this
|
|
1403
2892
|
# object to another object in the same bucket or to an external URL.
|
|
1404
2893
|
# Amazon S3 stores the value of this header in the object metadata. For
|
|
1405
|
-
# information about object metadata, see [Object Key and Metadata][1]
|
|
2894
|
+
# information about object metadata, see [Object Key and Metadata][1] in
|
|
2895
|
+
# the *Amazon S3 User Guide*.
|
|
1406
2896
|
#
|
|
1407
2897
|
# In the following example, the request header sets the redirect to an
|
|
1408
2898
|
# object (anotherPage.html) in the same bucket:
|
|
@@ -1416,7 +2906,11 @@ module Aws::S3
|
|
|
1416
2906
|
#
|
|
1417
2907
|
# For more information about website hosting in Amazon S3, see [Hosting
|
|
1418
2908
|
# Websites on Amazon S3][2] and [How to Configure Website Page
|
|
1419
|
-
# Redirects][3]
|
|
2909
|
+
# Redirects][3] in the *Amazon S3 User Guide*.
|
|
2910
|
+
#
|
|
2911
|
+
# <note markdown="1"> This functionality is not supported for directory buckets.
|
|
2912
|
+
#
|
|
2913
|
+
# </note>
|
|
1420
2914
|
#
|
|
1421
2915
|
#
|
|
1422
2916
|
#
|
|
@@ -1424,52 +2918,120 @@ module Aws::S3
|
|
|
1424
2918
|
# [2]: https://docs.aws.amazon.com/AmazonS3/latest/dev/WebsiteHosting.html
|
|
1425
2919
|
# [3]: https://docs.aws.amazon.com/AmazonS3/latest/dev/how-to-page-redirect.html
|
|
1426
2920
|
# @option options [String] :sse_customer_algorithm
|
|
1427
|
-
# Specifies the algorithm to use
|
|
1428
|
-
# example, AES256).
|
|
2921
|
+
# Specifies the algorithm to use when encrypting the object (for
|
|
2922
|
+
# example, `AES256`).
|
|
2923
|
+
#
|
|
2924
|
+
# <note markdown="1"> This functionality is not supported for directory buckets.
|
|
2925
|
+
#
|
|
2926
|
+
# </note>
|
|
1429
2927
|
# @option options [String] :sse_customer_key
|
|
1430
2928
|
# Specifies the customer-provided encryption key for Amazon S3 to use in
|
|
1431
2929
|
# encrypting data. This value is used to store the object and then it is
|
|
1432
2930
|
# discarded; Amazon S3 does not store the encryption key. The key must
|
|
1433
2931
|
# be appropriate for use with the algorithm specified in the
|
|
1434
2932
|
# `x-amz-server-side-encryption-customer-algorithm` header.
|
|
2933
|
+
#
|
|
2934
|
+
# <note markdown="1"> This functionality is not supported for directory buckets.
|
|
2935
|
+
#
|
|
2936
|
+
# </note>
|
|
1435
2937
|
# @option options [String] :sse_customer_key_md5
|
|
1436
2938
|
# Specifies the 128-bit MD5 digest of the encryption key according to
|
|
1437
2939
|
# RFC 1321. Amazon S3 uses this header for a message integrity check to
|
|
1438
2940
|
# ensure that the encryption key was transmitted without error.
|
|
2941
|
+
#
|
|
2942
|
+
# <note markdown="1"> This functionality is not supported for directory buckets.
|
|
2943
|
+
#
|
|
2944
|
+
# </note>
|
|
1439
2945
|
# @option options [String] :ssekms_key_id
|
|
1440
|
-
#
|
|
1441
|
-
#
|
|
1442
|
-
#
|
|
1443
|
-
#
|
|
1444
|
-
#
|
|
1445
|
-
#
|
|
1446
|
-
# x-amz-server-side-encryption
|
|
1447
|
-
#
|
|
1448
|
-
#
|
|
1449
|
-
#
|
|
2946
|
+
# Specifies the KMS key ID (Key ID, Key ARN, or Key Alias) to use for
|
|
2947
|
+
# object encryption. If the KMS key doesn't exist in the same account
|
|
2948
|
+
# that's issuing the command, you must use the full Key ARN not the Key
|
|
2949
|
+
# ID.
|
|
2950
|
+
#
|
|
2951
|
+
# **General purpose buckets** - If you specify
|
|
2952
|
+
# `x-amz-server-side-encryption` with `aws:kms` or `aws:kms:dsse`, this
|
|
2953
|
+
# header specifies the ID (Key ID, Key ARN, or Key Alias) of the KMS key
|
|
2954
|
+
# to use. If you specify `x-amz-server-side-encryption:aws:kms` or
|
|
2955
|
+
# `x-amz-server-side-encryption:aws:kms:dsse`, but do not provide
|
|
2956
|
+
# `x-amz-server-side-encryption-aws-kms-key-id`, Amazon S3 uses the
|
|
2957
|
+
# Amazon Web Services managed key (`aws/s3`) to protect the data.
|
|
2958
|
+
#
|
|
2959
|
+
# **Directory buckets** - To encrypt data using SSE-KMS, it's
|
|
2960
|
+
# recommended to specify the `x-amz-server-side-encryption` header to
|
|
2961
|
+
# `aws:kms`. Then, the `x-amz-server-side-encryption-aws-kms-key-id`
|
|
2962
|
+
# header implicitly uses the bucket's default KMS customer managed key
|
|
2963
|
+
# ID. If you want to explicitly set the `
|
|
2964
|
+
# x-amz-server-side-encryption-aws-kms-key-id` header, it must match the
|
|
2965
|
+
# bucket's default customer managed key (using key ID or ARN, not
|
|
2966
|
+
# alias). Your SSE-KMS configuration can only support 1 [customer
|
|
2967
|
+
# managed key][1] per directory bucket's lifetime. The [Amazon Web
|
|
2968
|
+
# Services managed key][2] (`aws/s3`) isn't supported. Incorrect key
|
|
2969
|
+
# specification results in an HTTP `400 Bad Request` error.
|
|
2970
|
+
#
|
|
2971
|
+
#
|
|
2972
|
+
#
|
|
2973
|
+
# [1]: https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#customer-cmk
|
|
2974
|
+
# [2]: https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#aws-managed-cmk
|
|
1450
2975
|
# @option options [String] :ssekms_encryption_context
|
|
1451
|
-
# Specifies the Amazon Web Services KMS Encryption Context
|
|
1452
|
-
#
|
|
1453
|
-
#
|
|
1454
|
-
#
|
|
1455
|
-
#
|
|
1456
|
-
# operations on this
|
|
2976
|
+
# Specifies the Amazon Web Services KMS Encryption Context as an
|
|
2977
|
+
# additional encryption context to use for object encryption. The value
|
|
2978
|
+
# of this header is a Base64 encoded string of a UTF-8 encoded JSON,
|
|
2979
|
+
# which contains the encryption context as key-value pairs. This value
|
|
2980
|
+
# is stored as object metadata and automatically gets passed on to
|
|
2981
|
+
# Amazon Web Services KMS for future `GetObject` operations on this
|
|
2982
|
+
# object.
|
|
2983
|
+
#
|
|
2984
|
+
# **General purpose buckets** - This value must be explicitly added
|
|
2985
|
+
# during `CopyObject` operations if you want an additional encryption
|
|
2986
|
+
# context for your object. For more information, see [Encryption
|
|
2987
|
+
# context][1] in the *Amazon S3 User Guide*.
|
|
2988
|
+
#
|
|
2989
|
+
# **Directory buckets** - You can optionally provide an explicit
|
|
2990
|
+
# encryption context value. The value must match the default encryption
|
|
2991
|
+
# context - the bucket Amazon Resource Name (ARN). An additional
|
|
2992
|
+
# encryption context value is not supported.
|
|
2993
|
+
#
|
|
2994
|
+
#
|
|
2995
|
+
#
|
|
2996
|
+
# [1]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/UsingKMSEncryption.html#encryption-context
|
|
1457
2997
|
# @option options [Boolean] :bucket_key_enabled
|
|
1458
2998
|
# Specifies whether Amazon S3 should use an S3 Bucket Key for object
|
|
1459
2999
|
# encryption with server-side encryption using Key Management Service
|
|
1460
|
-
# (KMS) keys (SSE-KMS).
|
|
1461
|
-
#
|
|
3000
|
+
# (KMS) keys (SSE-KMS).
|
|
3001
|
+
#
|
|
3002
|
+
# **General purpose buckets** - Setting this header to `true` causes
|
|
3003
|
+
# Amazon S3 to use an S3 Bucket Key for object encryption with SSE-KMS.
|
|
3004
|
+
# Also, specifying this header with a PUT action doesn't affect
|
|
3005
|
+
# bucket-level settings for S3 Bucket Key.
|
|
3006
|
+
#
|
|
3007
|
+
# **Directory buckets** - S3 Bucket Keys are always enabled for `GET`
|
|
3008
|
+
# and `PUT` operations in a directory bucket and can’t be disabled. S3
|
|
3009
|
+
# Bucket Keys aren't supported, when you copy SSE-KMS encrypted objects
|
|
3010
|
+
# from general purpose buckets to directory buckets, from directory
|
|
3011
|
+
# buckets to general purpose buckets, or between directory buckets,
|
|
3012
|
+
# through [CopyObject][1], [UploadPartCopy][2], [the Copy operation in
|
|
3013
|
+
# Batch Operations][3], or [the import jobs][4]. In this case, Amazon S3
|
|
3014
|
+
# makes a call to KMS every time a copy request is made for a
|
|
3015
|
+
# KMS-encrypted object.
|
|
3016
|
+
#
|
|
1462
3017
|
#
|
|
1463
|
-
#
|
|
1464
|
-
#
|
|
3018
|
+
#
|
|
3019
|
+
# [1]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_CopyObject.html
|
|
3020
|
+
# [2]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_UploadPartCopy.html
|
|
3021
|
+
# [3]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/directory-buckets-objects-Batch-Ops
|
|
3022
|
+
# [4]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/create-import-job
|
|
1465
3023
|
# @option options [String] :request_payer
|
|
1466
3024
|
# Confirms that the requester knows that they will be charged for the
|
|
1467
3025
|
# request. Bucket owners need not specify this parameter in their
|
|
1468
|
-
# requests. If either the source or destination
|
|
1469
|
-
#
|
|
1470
|
-
#
|
|
1471
|
-
#
|
|
1472
|
-
#
|
|
3026
|
+
# requests. If either the source or destination S3 bucket has Requester
|
|
3027
|
+
# Pays enabled, the requester will pay for corresponding charges to copy
|
|
3028
|
+
# the object. For information about downloading objects from Requester
|
|
3029
|
+
# Pays buckets, see [Downloading Objects in Requester Pays Buckets][1]
|
|
3030
|
+
# in the *Amazon S3 User Guide*.
|
|
3031
|
+
#
|
|
3032
|
+
# <note markdown="1"> This functionality is not supported for directory buckets.
|
|
3033
|
+
#
|
|
3034
|
+
# </note>
|
|
1473
3035
|
#
|
|
1474
3036
|
#
|
|
1475
3037
|
#
|
|
@@ -1477,29 +3039,46 @@ module Aws::S3
|
|
|
1477
3039
|
# @option options [String] :tagging
|
|
1478
3040
|
# The tag-set for the object. The tag-set must be encoded as URL Query
|
|
1479
3041
|
# parameters. (For example, "Key1=Value1")
|
|
3042
|
+
#
|
|
3043
|
+
# <note markdown="1"> This functionality is not supported for directory buckets.
|
|
3044
|
+
#
|
|
3045
|
+
# </note>
|
|
1480
3046
|
# @option options [String] :object_lock_mode
|
|
1481
3047
|
# The Object Lock mode that you want to apply to this object.
|
|
3048
|
+
#
|
|
3049
|
+
# <note markdown="1"> This functionality is not supported for directory buckets.
|
|
3050
|
+
#
|
|
3051
|
+
# </note>
|
|
1482
3052
|
# @option options [Time,DateTime,Date,Integer,String] :object_lock_retain_until_date
|
|
1483
3053
|
# The date and time when you want this object's Object Lock to expire.
|
|
1484
3054
|
# Must be formatted as a timestamp parameter.
|
|
3055
|
+
#
|
|
3056
|
+
# <note markdown="1"> This functionality is not supported for directory buckets.
|
|
3057
|
+
#
|
|
3058
|
+
# </note>
|
|
1485
3059
|
# @option options [String] :object_lock_legal_hold_status
|
|
1486
3060
|
# Specifies whether a legal hold will be applied to this object. For
|
|
1487
|
-
# more information about S3 Object Lock, see [Object Lock][1]
|
|
3061
|
+
# more information about S3 Object Lock, see [Object Lock][1] in the
|
|
3062
|
+
# *Amazon S3 User Guide*.
|
|
3063
|
+
#
|
|
3064
|
+
# <note markdown="1"> This functionality is not supported for directory buckets.
|
|
3065
|
+
#
|
|
3066
|
+
# </note>
|
|
1488
3067
|
#
|
|
1489
3068
|
#
|
|
1490
3069
|
#
|
|
1491
3070
|
# [1]: https://docs.aws.amazon.com/AmazonS3/latest/dev/object-lock.html
|
|
1492
3071
|
# @option options [String] :expected_bucket_owner
|
|
1493
|
-
# The account ID of the expected bucket owner. If the
|
|
1494
|
-
#
|
|
1495
|
-
# Forbidden` (access denied).
|
|
3072
|
+
# The account ID of the expected bucket owner. If the account ID that
|
|
3073
|
+
# you provide does not match the actual owner of the bucket, the request
|
|
3074
|
+
# fails with the HTTP status code `403 Forbidden` (access denied).
|
|
1496
3075
|
# @return [Types::PutObjectOutput]
|
|
1497
3076
|
def put(options = {})
|
|
1498
3077
|
options = options.merge(
|
|
1499
3078
|
bucket: @bucket_name,
|
|
1500
3079
|
key: @key
|
|
1501
3080
|
)
|
|
1502
|
-
resp = Aws::Plugins::UserAgent.
|
|
3081
|
+
resp = Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
|
|
1503
3082
|
@client.put_object(options)
|
|
1504
3083
|
end
|
|
1505
3084
|
resp.data
|
|
@@ -1555,7 +3134,7 @@ module Aws::S3
|
|
|
1555
3134
|
# bucket_name: "BucketName", # required
|
|
1556
3135
|
# prefix: "LocationPrefix", # required
|
|
1557
3136
|
# encryption: {
|
|
1558
|
-
# encryption_type: "AES256", # required, accepts AES256, aws:kms, aws:kms:dsse
|
|
3137
|
+
# encryption_type: "AES256", # required, accepts AES256, aws:fsx, aws:kms, aws:kms:dsse
|
|
1559
3138
|
# kms_key_id: "SSEKMSKeyId",
|
|
1560
3139
|
# kms_context: "KMSContext",
|
|
1561
3140
|
# },
|
|
@@ -1586,12 +3165,12 @@ module Aws::S3
|
|
|
1586
3165
|
# value: "MetadataValue",
|
|
1587
3166
|
# },
|
|
1588
3167
|
# ],
|
|
1589
|
-
# storage_class: "STANDARD", # accepts STANDARD, REDUCED_REDUNDANCY, STANDARD_IA, ONEZONE_IA, INTELLIGENT_TIERING, GLACIER, DEEP_ARCHIVE, OUTPOSTS, GLACIER_IR, SNOW
|
|
3168
|
+
# storage_class: "STANDARD", # accepts STANDARD, REDUCED_REDUNDANCY, STANDARD_IA, ONEZONE_IA, INTELLIGENT_TIERING, GLACIER, DEEP_ARCHIVE, OUTPOSTS, GLACIER_IR, SNOW, EXPRESS_ONEZONE, FSX_OPENZFS, FSX_ONTAP
|
|
1590
3169
|
# },
|
|
1591
3170
|
# },
|
|
1592
3171
|
# },
|
|
1593
3172
|
# request_payer: "requester", # accepts requester
|
|
1594
|
-
# checksum_algorithm: "CRC32", # accepts CRC32, CRC32C, SHA1, SHA256
|
|
3173
|
+
# checksum_algorithm: "CRC32", # accepts CRC32, CRC32C, SHA1, SHA256, CRC64NVME
|
|
1595
3174
|
# expected_bucket_owner: "AccountId",
|
|
1596
3175
|
# })
|
|
1597
3176
|
# @param [Hash] options ({})
|
|
@@ -1602,23 +3181,27 @@ module Aws::S3
|
|
|
1602
3181
|
# @option options [String] :request_payer
|
|
1603
3182
|
# Confirms that the requester knows that they will be charged for the
|
|
1604
3183
|
# request. Bucket owners need not specify this parameter in their
|
|
1605
|
-
# requests. If either the source or destination
|
|
1606
|
-
#
|
|
1607
|
-
#
|
|
1608
|
-
#
|
|
1609
|
-
#
|
|
3184
|
+
# requests. If either the source or destination S3 bucket has Requester
|
|
3185
|
+
# Pays enabled, the requester will pay for corresponding charges to copy
|
|
3186
|
+
# the object. For information about downloading objects from Requester
|
|
3187
|
+
# Pays buckets, see [Downloading Objects in Requester Pays Buckets][1]
|
|
3188
|
+
# in the *Amazon S3 User Guide*.
|
|
3189
|
+
#
|
|
3190
|
+
# <note markdown="1"> This functionality is not supported for directory buckets.
|
|
3191
|
+
#
|
|
3192
|
+
# </note>
|
|
1610
3193
|
#
|
|
1611
3194
|
#
|
|
1612
3195
|
#
|
|
1613
3196
|
# [1]: https://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html
|
|
1614
3197
|
# @option options [String] :checksum_algorithm
|
|
1615
3198
|
# Indicates the algorithm used to create the checksum for the object
|
|
1616
|
-
# when
|
|
1617
|
-
# functionality if
|
|
1618
|
-
# must be a corresponding `x-amz-checksum` or `x-amz-trailer`
|
|
1619
|
-
# sent. Otherwise, Amazon S3 fails the request with the HTTP
|
|
1620
|
-
# `400 Bad Request`. For more information, see [Checking
|
|
1621
|
-
# integrity][1] in the *Amazon S3 User Guide*.
|
|
3199
|
+
# when you use the SDK. This header will not provide any additional
|
|
3200
|
+
# functionality if you don't use the SDK. When you send this header,
|
|
3201
|
+
# there must be a corresponding `x-amz-checksum` or `x-amz-trailer`
|
|
3202
|
+
# header sent. Otherwise, Amazon S3 fails the request with the HTTP
|
|
3203
|
+
# status code `400 Bad Request`. For more information, see [Checking
|
|
3204
|
+
# object integrity][1] in the *Amazon S3 User Guide*.
|
|
1622
3205
|
#
|
|
1623
3206
|
# If you provide an individual checksum, Amazon S3 ignores any provided
|
|
1624
3207
|
# `ChecksumAlgorithm` parameter.
|
|
@@ -1627,16 +3210,16 @@ module Aws::S3
|
|
|
1627
3210
|
#
|
|
1628
3211
|
# [1]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html
|
|
1629
3212
|
# @option options [String] :expected_bucket_owner
|
|
1630
|
-
# The account ID of the expected bucket owner. If the
|
|
1631
|
-
#
|
|
1632
|
-
# Forbidden` (access denied).
|
|
3213
|
+
# The account ID of the expected bucket owner. If the account ID that
|
|
3214
|
+
# you provide does not match the actual owner of the bucket, the request
|
|
3215
|
+
# fails with the HTTP status code `403 Forbidden` (access denied).
|
|
1633
3216
|
# @return [Types::RestoreObjectOutput]
|
|
1634
3217
|
def restore_object(options = {})
|
|
1635
3218
|
options = options.merge(
|
|
1636
3219
|
bucket: @bucket_name,
|
|
1637
3220
|
key: @key
|
|
1638
3221
|
)
|
|
1639
|
-
resp = Aws::Plugins::UserAgent.
|
|
3222
|
+
resp = Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
|
|
1640
3223
|
@client.restore_object(options)
|
|
1641
3224
|
end
|
|
1642
3225
|
resp.data
|
|
@@ -1650,6 +3233,12 @@ module Aws::S3
|
|
|
1650
3233
|
# if_none_match: "IfNoneMatch",
|
|
1651
3234
|
# if_unmodified_since: Time.now,
|
|
1652
3235
|
# range: "Range",
|
|
3236
|
+
# response_cache_control: "ResponseCacheControl",
|
|
3237
|
+
# response_content_disposition: "ResponseContentDisposition",
|
|
3238
|
+
# response_content_encoding: "ResponseContentEncoding",
|
|
3239
|
+
# response_content_language: "ResponseContentLanguage",
|
|
3240
|
+
# response_content_type: "ResponseContentType",
|
|
3241
|
+
# response_expires: Time.now,
|
|
1653
3242
|
# version_id: "ObjectVersionId",
|
|
1654
3243
|
# sse_customer_algorithm: "SSECustomerAlgorithm",
|
|
1655
3244
|
# sse_customer_key: "SSECustomerKey",
|
|
@@ -1663,43 +3252,136 @@ module Aws::S3
|
|
|
1663
3252
|
# @option options [String] :if_match
|
|
1664
3253
|
# Return the object only if its entity tag (ETag) is the same as the one
|
|
1665
3254
|
# specified; otherwise, return a 412 (precondition failed) error.
|
|
3255
|
+
#
|
|
3256
|
+
# If both of the `If-Match` and `If-Unmodified-Since` headers are
|
|
3257
|
+
# present in the request as follows:
|
|
3258
|
+
#
|
|
3259
|
+
# * `If-Match` condition evaluates to `true`, and;
|
|
3260
|
+
#
|
|
3261
|
+
# * `If-Unmodified-Since` condition evaluates to `false`;
|
|
3262
|
+
#
|
|
3263
|
+
# Then Amazon S3 returns `200 OK` and the data requested.
|
|
3264
|
+
#
|
|
3265
|
+
# For more information about conditional requests, see [RFC 7232][1].
|
|
3266
|
+
#
|
|
3267
|
+
#
|
|
3268
|
+
#
|
|
3269
|
+
# [1]: https://tools.ietf.org/html/rfc7232
|
|
1666
3270
|
# @option options [Time,DateTime,Date,Integer,String] :if_modified_since
|
|
1667
3271
|
# Return the object only if it has been modified since the specified
|
|
1668
3272
|
# time; otherwise, return a 304 (not modified) error.
|
|
3273
|
+
#
|
|
3274
|
+
# If both of the `If-None-Match` and `If-Modified-Since` headers are
|
|
3275
|
+
# present in the request as follows:
|
|
3276
|
+
#
|
|
3277
|
+
# * `If-None-Match` condition evaluates to `false`, and;
|
|
3278
|
+
#
|
|
3279
|
+
# * `If-Modified-Since` condition evaluates to `true`;
|
|
3280
|
+
#
|
|
3281
|
+
# Then Amazon S3 returns the `304 Not Modified` response code.
|
|
3282
|
+
#
|
|
3283
|
+
# For more information about conditional requests, see [RFC 7232][1].
|
|
3284
|
+
#
|
|
3285
|
+
#
|
|
3286
|
+
#
|
|
3287
|
+
# [1]: https://tools.ietf.org/html/rfc7232
|
|
1669
3288
|
# @option options [String] :if_none_match
|
|
1670
3289
|
# Return the object only if its entity tag (ETag) is different from the
|
|
1671
3290
|
# one specified; otherwise, return a 304 (not modified) error.
|
|
3291
|
+
#
|
|
3292
|
+
# If both of the `If-None-Match` and `If-Modified-Since` headers are
|
|
3293
|
+
# present in the request as follows:
|
|
3294
|
+
#
|
|
3295
|
+
# * `If-None-Match` condition evaluates to `false`, and;
|
|
3296
|
+
#
|
|
3297
|
+
# * `If-Modified-Since` condition evaluates to `true`;
|
|
3298
|
+
#
|
|
3299
|
+
# Then Amazon S3 returns the `304 Not Modified` response code.
|
|
3300
|
+
#
|
|
3301
|
+
# For more information about conditional requests, see [RFC 7232][1].
|
|
3302
|
+
#
|
|
3303
|
+
#
|
|
3304
|
+
#
|
|
3305
|
+
# [1]: https://tools.ietf.org/html/rfc7232
|
|
1672
3306
|
# @option options [Time,DateTime,Date,Integer,String] :if_unmodified_since
|
|
1673
3307
|
# Return the object only if it has not been modified since the specified
|
|
1674
3308
|
# time; otherwise, return a 412 (precondition failed) error.
|
|
3309
|
+
#
|
|
3310
|
+
# If both of the `If-Match` and `If-Unmodified-Since` headers are
|
|
3311
|
+
# present in the request as follows:
|
|
3312
|
+
#
|
|
3313
|
+
# * `If-Match` condition evaluates to `true`, and;
|
|
3314
|
+
#
|
|
3315
|
+
# * `If-Unmodified-Since` condition evaluates to `false`;
|
|
3316
|
+
#
|
|
3317
|
+
# Then Amazon S3 returns `200 OK` and the data requested.
|
|
3318
|
+
#
|
|
3319
|
+
# For more information about conditional requests, see [RFC 7232][1].
|
|
3320
|
+
#
|
|
3321
|
+
#
|
|
3322
|
+
#
|
|
3323
|
+
# [1]: https://tools.ietf.org/html/rfc7232
|
|
1675
3324
|
# @option options [String] :range
|
|
1676
3325
|
# HeadObject returns only the metadata for an object. If the Range is
|
|
1677
3326
|
# satisfiable, only the `ContentLength` is affected in the response. If
|
|
1678
3327
|
# the Range is not satisfiable, S3 returns a `416 - Requested Range Not
|
|
1679
3328
|
# Satisfiable` error.
|
|
3329
|
+
# @option options [String] :response_cache_control
|
|
3330
|
+
# Sets the `Cache-Control` header of the response.
|
|
3331
|
+
# @option options [String] :response_content_disposition
|
|
3332
|
+
# Sets the `Content-Disposition` header of the response.
|
|
3333
|
+
# @option options [String] :response_content_encoding
|
|
3334
|
+
# Sets the `Content-Encoding` header of the response.
|
|
3335
|
+
# @option options [String] :response_content_language
|
|
3336
|
+
# Sets the `Content-Language` header of the response.
|
|
3337
|
+
# @option options [String] :response_content_type
|
|
3338
|
+
# Sets the `Content-Type` header of the response.
|
|
3339
|
+
# @option options [Time,DateTime,Date,Integer,String] :response_expires
|
|
3340
|
+
# Sets the `Expires` header of the response.
|
|
1680
3341
|
# @option options [String] :version_id
|
|
1681
|
-
#
|
|
3342
|
+
# Version ID used to reference a specific version of the object.
|
|
3343
|
+
#
|
|
3344
|
+
# <note markdown="1"> For directory buckets in this API operation, only the `null` value of
|
|
3345
|
+
# the version ID is supported.
|
|
3346
|
+
#
|
|
3347
|
+
# </note>
|
|
1682
3348
|
# @option options [String] :sse_customer_algorithm
|
|
1683
|
-
# Specifies the algorithm to use
|
|
3349
|
+
# Specifies the algorithm to use when encrypting the object (for
|
|
1684
3350
|
# example, AES256).
|
|
3351
|
+
#
|
|
3352
|
+
# <note markdown="1"> This functionality is not supported for directory buckets.
|
|
3353
|
+
#
|
|
3354
|
+
# </note>
|
|
1685
3355
|
# @option options [String] :sse_customer_key
|
|
1686
3356
|
# Specifies the customer-provided encryption key for Amazon S3 to use in
|
|
1687
3357
|
# encrypting data. This value is used to store the object and then it is
|
|
1688
3358
|
# discarded; Amazon S3 does not store the encryption key. The key must
|
|
1689
3359
|
# be appropriate for use with the algorithm specified in the
|
|
1690
3360
|
# `x-amz-server-side-encryption-customer-algorithm` header.
|
|
3361
|
+
#
|
|
3362
|
+
# <note markdown="1"> This functionality is not supported for directory buckets.
|
|
3363
|
+
#
|
|
3364
|
+
# </note>
|
|
1691
3365
|
# @option options [String] :sse_customer_key_md5
|
|
1692
3366
|
# Specifies the 128-bit MD5 digest of the encryption key according to
|
|
1693
3367
|
# RFC 1321. Amazon S3 uses this header for a message integrity check to
|
|
1694
3368
|
# ensure that the encryption key was transmitted without error.
|
|
3369
|
+
#
|
|
3370
|
+
# <note markdown="1"> This functionality is not supported for directory buckets.
|
|
3371
|
+
#
|
|
3372
|
+
# </note>
|
|
1695
3373
|
# @option options [String] :request_payer
|
|
1696
3374
|
# Confirms that the requester knows that they will be charged for the
|
|
1697
3375
|
# request. Bucket owners need not specify this parameter in their
|
|
1698
|
-
# requests. If either the source or destination
|
|
1699
|
-
#
|
|
1700
|
-
#
|
|
1701
|
-
#
|
|
1702
|
-
#
|
|
3376
|
+
# requests. If either the source or destination S3 bucket has Requester
|
|
3377
|
+
# Pays enabled, the requester will pay for corresponding charges to copy
|
|
3378
|
+
# the object. For information about downloading objects from Requester
|
|
3379
|
+
# Pays buckets, see [Downloading Objects in Requester Pays Buckets][1]
|
|
3380
|
+
# in the *Amazon S3 User Guide*.
|
|
3381
|
+
#
|
|
3382
|
+
# <note markdown="1"> This functionality is not supported for directory buckets.
|
|
3383
|
+
#
|
|
3384
|
+
# </note>
|
|
1703
3385
|
#
|
|
1704
3386
|
#
|
|
1705
3387
|
#
|
|
@@ -1710,23 +3392,33 @@ module Aws::S3
|
|
|
1710
3392
|
# for the part specified. Useful querying about the size of the part and
|
|
1711
3393
|
# the number of parts in this object.
|
|
1712
3394
|
# @option options [String] :expected_bucket_owner
|
|
1713
|
-
# The account ID of the expected bucket owner. If the
|
|
1714
|
-
#
|
|
1715
|
-
# Forbidden` (access denied).
|
|
3395
|
+
# The account ID of the expected bucket owner. If the account ID that
|
|
3396
|
+
# you provide does not match the actual owner of the bucket, the request
|
|
3397
|
+
# fails with the HTTP status code `403 Forbidden` (access denied).
|
|
1716
3398
|
# @option options [String] :checksum_mode
|
|
1717
3399
|
# To retrieve the checksum, this parameter must be enabled.
|
|
1718
3400
|
#
|
|
1719
|
-
#
|
|
1720
|
-
#
|
|
1721
|
-
# KMS), you must have permission to use the
|
|
1722
|
-
#
|
|
3401
|
+
# **General purpose buckets** - If you enable checksum mode and the
|
|
3402
|
+
# object is uploaded with a [checksum][1] and encrypted with an Key
|
|
3403
|
+
# Management Service (KMS) key, you must have permission to use the
|
|
3404
|
+
# `kms:Decrypt` action to retrieve the checksum.
|
|
3405
|
+
#
|
|
3406
|
+
# **Directory buckets** - If you enable `ChecksumMode` and the object is
|
|
3407
|
+
# encrypted with Amazon Web Services Key Management Service (Amazon Web
|
|
3408
|
+
# Services KMS), you must also have the `kms:GenerateDataKey` and
|
|
3409
|
+
# `kms:Decrypt` permissions in IAM identity-based policies and KMS key
|
|
3410
|
+
# policies for the KMS key to retrieve the checksum of the object.
|
|
3411
|
+
#
|
|
3412
|
+
#
|
|
3413
|
+
#
|
|
3414
|
+
# [1]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_Checksum.html
|
|
1723
3415
|
# @return [Types::HeadObjectOutput]
|
|
1724
3416
|
def head(options = {})
|
|
1725
3417
|
options = options.merge(
|
|
1726
3418
|
bucket: @bucket_name,
|
|
1727
3419
|
key: @key
|
|
1728
3420
|
)
|
|
1729
|
-
resp = Aws::Plugins::UserAgent.
|
|
3421
|
+
resp = Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
|
|
1730
3422
|
@client.head_object(options)
|
|
1731
3423
|
end
|
|
1732
3424
|
resp.data
|
|
@@ -1845,7 +3537,7 @@ module Aws::S3
|
|
|
1845
3537
|
# request_payer: "requester", # accepts requester
|
|
1846
3538
|
# bypass_governance_retention: false,
|
|
1847
3539
|
# expected_bucket_owner: "AccountId",
|
|
1848
|
-
# checksum_algorithm: "CRC32", # accepts CRC32, CRC32C, SHA1, SHA256
|
|
3540
|
+
# checksum_algorithm: "CRC32", # accepts CRC32, CRC32C, SHA1, SHA256, CRC64NVME
|
|
1849
3541
|
# })
|
|
1850
3542
|
# @param options ({})
|
|
1851
3543
|
# @option options [String] :mfa
|
|
@@ -1853,14 +3545,35 @@ module Aws::S3
|
|
|
1853
3545
|
# space, and the value that is displayed on your authentication device.
|
|
1854
3546
|
# Required to permanently delete a versioned object if versioning is
|
|
1855
3547
|
# configured with MFA delete enabled.
|
|
3548
|
+
#
|
|
3549
|
+
# When performing the `DeleteObjects` operation on an MFA delete enabled
|
|
3550
|
+
# bucket, which attempts to delete the specified versioned objects, you
|
|
3551
|
+
# must include an MFA token. If you don't provide an MFA token, the
|
|
3552
|
+
# entire request will fail, even if there are non-versioned objects that
|
|
3553
|
+
# you are trying to delete. If you provide an invalid token, whether
|
|
3554
|
+
# there are versioned object keys in the request or not, the entire
|
|
3555
|
+
# Multi-Object Delete request will fail. For information about MFA
|
|
3556
|
+
# Delete, see [ MFA Delete][1] in the *Amazon S3 User Guide*.
|
|
3557
|
+
#
|
|
3558
|
+
# <note markdown="1"> This functionality is not supported for directory buckets.
|
|
3559
|
+
#
|
|
3560
|
+
# </note>
|
|
3561
|
+
#
|
|
3562
|
+
#
|
|
3563
|
+
#
|
|
3564
|
+
# [1]: https://docs.aws.amazon.com/AmazonS3/latest/dev/Versioning.html#MultiFactorAuthenticationDelete
|
|
1856
3565
|
# @option options [String] :request_payer
|
|
1857
3566
|
# Confirms that the requester knows that they will be charged for the
|
|
1858
3567
|
# request. Bucket owners need not specify this parameter in their
|
|
1859
|
-
# requests. If either the source or destination
|
|
1860
|
-
#
|
|
1861
|
-
#
|
|
1862
|
-
#
|
|
1863
|
-
#
|
|
3568
|
+
# requests. If either the source or destination S3 bucket has Requester
|
|
3569
|
+
# Pays enabled, the requester will pay for corresponding charges to copy
|
|
3570
|
+
# the object. For information about downloading objects from Requester
|
|
3571
|
+
# Pays buckets, see [Downloading Objects in Requester Pays Buckets][1]
|
|
3572
|
+
# in the *Amazon S3 User Guide*.
|
|
3573
|
+
#
|
|
3574
|
+
# <note markdown="1"> This functionality is not supported for directory buckets.
|
|
3575
|
+
#
|
|
3576
|
+
# </note>
|
|
1864
3577
|
#
|
|
1865
3578
|
#
|
|
1866
3579
|
#
|
|
@@ -1869,25 +3582,46 @@ module Aws::S3
|
|
|
1869
3582
|
# Specifies whether you want to delete this object even if it has a
|
|
1870
3583
|
# Governance-type Object Lock in place. To use this header, you must
|
|
1871
3584
|
# have the `s3:BypassGovernanceRetention` permission.
|
|
3585
|
+
#
|
|
3586
|
+
# <note markdown="1"> This functionality is not supported for directory buckets.
|
|
3587
|
+
#
|
|
3588
|
+
# </note>
|
|
1872
3589
|
# @option options [String] :expected_bucket_owner
|
|
1873
|
-
# The account ID of the expected bucket owner. If the
|
|
1874
|
-
#
|
|
1875
|
-
# Forbidden` (access denied).
|
|
3590
|
+
# The account ID of the expected bucket owner. If the account ID that
|
|
3591
|
+
# you provide does not match the actual owner of the bucket, the request
|
|
3592
|
+
# fails with the HTTP status code `403 Forbidden` (access denied).
|
|
1876
3593
|
# @option options [String] :checksum_algorithm
|
|
1877
3594
|
# Indicates the algorithm used to create the checksum for the object
|
|
1878
|
-
# when
|
|
1879
|
-
# functionality if
|
|
1880
|
-
# must be a corresponding `x-amz-checksum` or
|
|
1881
|
-
# sent. Otherwise, Amazon S3 fails the request
|
|
1882
|
-
# `400 Bad Request`.
|
|
1883
|
-
#
|
|
3595
|
+
# when you use the SDK. This header will not provide any additional
|
|
3596
|
+
# functionality if you don't use the SDK. When you send this header,
|
|
3597
|
+
# there must be a corresponding `x-amz-checksum-algorithm ` or
|
|
3598
|
+
# `x-amz-trailer` header sent. Otherwise, Amazon S3 fails the request
|
|
3599
|
+
# with the HTTP status code `400 Bad Request`.
|
|
3600
|
+
#
|
|
3601
|
+
# For the `x-amz-checksum-algorithm ` header, replace ` algorithm ` with
|
|
3602
|
+
# the supported algorithm from the following list:
|
|
3603
|
+
#
|
|
3604
|
+
# * `CRC32`
|
|
3605
|
+
#
|
|
3606
|
+
# * `CRC32C`
|
|
3607
|
+
#
|
|
3608
|
+
# * `CRC64NVME`
|
|
3609
|
+
#
|
|
3610
|
+
# * `SHA1`
|
|
3611
|
+
#
|
|
3612
|
+
# * `SHA256`
|
|
3613
|
+
#
|
|
3614
|
+
# For more information, see [Checking object integrity][1] in the
|
|
3615
|
+
# *Amazon S3 User Guide*.
|
|
3616
|
+
#
|
|
3617
|
+
# If the individual checksum value you provide through
|
|
3618
|
+
# `x-amz-checksum-algorithm ` doesn't match the checksum algorithm you
|
|
3619
|
+
# set through `x-amz-sdk-checksum-algorithm`, Amazon S3 fails the
|
|
3620
|
+
# request with a `BadDigest` error.
|
|
1884
3621
|
#
|
|
1885
3622
|
# If you provide an individual checksum, Amazon S3 ignores any provided
|
|
1886
3623
|
# `ChecksumAlgorithm` parameter.
|
|
1887
3624
|
#
|
|
1888
|
-
# This checksum algorithm must be the same for all parts and it match
|
|
1889
|
-
# the checksum value supplied in the `CreateMultipartUpload` request.
|
|
1890
|
-
#
|
|
1891
3625
|
#
|
|
1892
3626
|
#
|
|
1893
3627
|
# [1]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html
|
|
@@ -1903,7 +3637,7 @@ module Aws::S3
|
|
|
1903
3637
|
key: item.key
|
|
1904
3638
|
}
|
|
1905
3639
|
end
|
|
1906
|
-
Aws::Plugins::UserAgent.
|
|
3640
|
+
Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
|
|
1907
3641
|
batch[0].client.delete_objects(params)
|
|
1908
3642
|
end
|
|
1909
3643
|
end
|
|
@@ -1915,3 +3649,6 @@ module Aws::S3
|
|
|
1915
3649
|
end
|
|
1916
3650
|
end
|
|
1917
3651
|
end
|
|
3652
|
+
|
|
3653
|
+
# Load customizations if they exist
|
|
3654
|
+
require 'aws-sdk-s3/customizations/object'
|