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
|
@@ -69,6 +69,10 @@ module Aws::S3
|
|
|
69
69
|
# of encryption. If an object is larger than 16 MB, the Amazon Web
|
|
70
70
|
# Services Management Console will upload or copy that object as a
|
|
71
71
|
# Multipart Upload, and therefore the ETag will not be an MD5 digest.
|
|
72
|
+
#
|
|
73
|
+
# <note markdown="1"> **Directory buckets** - MD5 is not supported by directory buckets.
|
|
74
|
+
#
|
|
75
|
+
# </note>
|
|
72
76
|
# @return [String]
|
|
73
77
|
def etag
|
|
74
78
|
data[:etag]
|
|
@@ -80,6 +84,18 @@ module Aws::S3
|
|
|
80
84
|
data[:checksum_algorithm]
|
|
81
85
|
end
|
|
82
86
|
|
|
87
|
+
# The checksum type that is used to calculate the object’s checksum
|
|
88
|
+
# value. For more information, see [Checking object integrity][1] in the
|
|
89
|
+
# *Amazon S3 User Guide*.
|
|
90
|
+
#
|
|
91
|
+
#
|
|
92
|
+
#
|
|
93
|
+
# [1]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html
|
|
94
|
+
# @return [String]
|
|
95
|
+
def checksum_type
|
|
96
|
+
data[:checksum_type]
|
|
97
|
+
end
|
|
98
|
+
|
|
83
99
|
# Size in bytes of the object
|
|
84
100
|
# @return [Integer]
|
|
85
101
|
def size
|
|
@@ -87,12 +103,24 @@ module Aws::S3
|
|
|
87
103
|
end
|
|
88
104
|
|
|
89
105
|
# The class of storage used to store the object.
|
|
106
|
+
#
|
|
107
|
+
# <note markdown="1"> **Directory buckets** - Directory buckets only support
|
|
108
|
+
# `EXPRESS_ONEZONE` (the S3 Express One Zone storage class) in
|
|
109
|
+
# Availability Zones and `ONEZONE_IA` (the S3 One Zone-Infrequent Access
|
|
110
|
+
# storage class) in Dedicated Local Zones.
|
|
111
|
+
#
|
|
112
|
+
# </note>
|
|
90
113
|
# @return [String]
|
|
91
114
|
def storage_class
|
|
92
115
|
data[:storage_class]
|
|
93
116
|
end
|
|
94
117
|
|
|
95
118
|
# The owner of the object
|
|
119
|
+
#
|
|
120
|
+
# <note markdown="1"> **Directory buckets** - The bucket owner is returned as the object
|
|
121
|
+
# owner.
|
|
122
|
+
#
|
|
123
|
+
# </note>
|
|
96
124
|
# @return [Types::Owner]
|
|
97
125
|
def owner
|
|
98
126
|
data[:owner]
|
|
@@ -104,6 +132,13 @@ module Aws::S3
|
|
|
104
132
|
# archived objects, see [ Working with archived objects][1] in the
|
|
105
133
|
# *Amazon S3 User Guide*.
|
|
106
134
|
#
|
|
135
|
+
# <note markdown="1"> This functionality is not supported for directory buckets. Directory
|
|
136
|
+
# buckets only support `EXPRESS_ONEZONE` (the S3 Express One Zone
|
|
137
|
+
# storage class) in Availability Zones and `ONEZONE_IA` (the S3 One
|
|
138
|
+
# Zone-Infrequent Access storage class) in Dedicated Local Zones.
|
|
139
|
+
#
|
|
140
|
+
# </note>
|
|
141
|
+
#
|
|
107
142
|
#
|
|
108
143
|
#
|
|
109
144
|
# [1]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/archived-objects.html
|
|
@@ -166,7 +201,7 @@ module Aws::S3
|
|
|
166
201
|
options, params = separate_params_and_options(options)
|
|
167
202
|
waiter = Waiters::ObjectExists.new(options)
|
|
168
203
|
yield_waiter_and_warn(waiter, &block) if block_given?
|
|
169
|
-
Aws::Plugins::UserAgent.
|
|
204
|
+
Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
|
|
170
205
|
waiter.wait(params.merge(bucket: @bucket_name,
|
|
171
206
|
key: @key))
|
|
172
207
|
end
|
|
@@ -187,7 +222,7 @@ module Aws::S3
|
|
|
187
222
|
options, params = separate_params_and_options(options)
|
|
188
223
|
waiter = Waiters::ObjectNotExists.new(options)
|
|
189
224
|
yield_waiter_and_warn(waiter, &block) if block_given?
|
|
190
|
-
Aws::Plugins::UserAgent.
|
|
225
|
+
Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
|
|
191
226
|
waiter.wait(params.merge(bucket: @bucket_name,
|
|
192
227
|
key: @key))
|
|
193
228
|
end
|
|
@@ -292,7 +327,7 @@ module Aws::S3
|
|
|
292
327
|
:retry
|
|
293
328
|
end
|
|
294
329
|
end
|
|
295
|
-
Aws::Plugins::UserAgent.
|
|
330
|
+
Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
|
|
296
331
|
Aws::Waiters::Waiter.new(options).wait({})
|
|
297
332
|
end
|
|
298
333
|
end
|
|
@@ -304,7 +339,7 @@ module Aws::S3
|
|
|
304
339
|
# object_summary.copy_from({
|
|
305
340
|
# acl: "private", # accepts private, public-read, public-read-write, authenticated-read, aws-exec-read, bucket-owner-read, bucket-owner-full-control
|
|
306
341
|
# cache_control: "CacheControl",
|
|
307
|
-
# checksum_algorithm: "CRC32", # accepts CRC32, CRC32C, SHA1, SHA256
|
|
342
|
+
# checksum_algorithm: "CRC32", # accepts CRC32, CRC32C, SHA1, SHA256, CRC64NVME
|
|
308
343
|
# content_disposition: "ContentDisposition",
|
|
309
344
|
# content_encoding: "ContentEncoding",
|
|
310
345
|
# content_language: "ContentLanguage",
|
|
@@ -319,13 +354,15 @@ module Aws::S3
|
|
|
319
354
|
# grant_read: "GrantRead",
|
|
320
355
|
# grant_read_acp: "GrantReadACP",
|
|
321
356
|
# grant_write_acp: "GrantWriteACP",
|
|
357
|
+
# if_match: "IfMatch",
|
|
358
|
+
# if_none_match: "IfNoneMatch",
|
|
322
359
|
# metadata: {
|
|
323
360
|
# "MetadataKey" => "MetadataValue",
|
|
324
361
|
# },
|
|
325
362
|
# metadata_directive: "COPY", # accepts COPY, REPLACE
|
|
326
363
|
# tagging_directive: "COPY", # accepts COPY, REPLACE
|
|
327
|
-
# server_side_encryption: "AES256", # accepts AES256, aws:kms, aws:kms:dsse
|
|
328
|
-
# storage_class: "STANDARD", # accepts STANDARD, REDUCED_REDUNDANCY, STANDARD_IA, ONEZONE_IA, INTELLIGENT_TIERING, GLACIER, DEEP_ARCHIVE, OUTPOSTS, GLACIER_IR, SNOW
|
|
364
|
+
# server_side_encryption: "AES256", # accepts AES256, aws:fsx, aws:kms, aws:kms:dsse
|
|
365
|
+
# 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
|
|
329
366
|
# website_redirect_location: "WebsiteRedirectLocation",
|
|
330
367
|
# sse_customer_algorithm: "SSECustomerAlgorithm",
|
|
331
368
|
# sse_customer_key: "SSECustomerKey",
|
|
@@ -346,40 +383,98 @@ module Aws::S3
|
|
|
346
383
|
# })
|
|
347
384
|
# @param [Hash] options ({})
|
|
348
385
|
# @option options [String] :acl
|
|
349
|
-
# The canned ACL to apply to the object.
|
|
386
|
+
# The canned access control list (ACL) to apply to the object.
|
|
387
|
+
#
|
|
388
|
+
# When you copy an object, the ACL metadata is not preserved and is set
|
|
389
|
+
# to `private` by default. Only the owner has full access control. To
|
|
390
|
+
# override the default ACL setting, specify a new ACL when you generate
|
|
391
|
+
# a copy request. For more information, see [Using ACLs][1].
|
|
392
|
+
#
|
|
393
|
+
# If the destination bucket that you're copying objects to uses the
|
|
394
|
+
# bucket owner enforced setting for S3 Object Ownership, ACLs are
|
|
395
|
+
# disabled and no longer affect permissions. Buckets that use this
|
|
396
|
+
# setting only accept `PUT` requests that don't specify an ACL or `PUT`
|
|
397
|
+
# requests that specify bucket owner full control ACLs, such as the
|
|
398
|
+
# `bucket-owner-full-control` canned ACL or an equivalent form of this
|
|
399
|
+
# ACL expressed in the XML format. For more information, see
|
|
400
|
+
# [Controlling ownership of objects and disabling ACLs][2] in the
|
|
401
|
+
# *Amazon S3 User Guide*.
|
|
402
|
+
#
|
|
403
|
+
# <note markdown="1"> * If your destination bucket uses the bucket owner enforced setting
|
|
404
|
+
# for Object Ownership, all objects written to the bucket by any
|
|
405
|
+
# account will be owned by the bucket owner.
|
|
406
|
+
#
|
|
407
|
+
# * This functionality is not supported for directory buckets.
|
|
408
|
+
#
|
|
409
|
+
# * This functionality is not supported for Amazon S3 on Outposts.
|
|
410
|
+
#
|
|
411
|
+
# </note>
|
|
412
|
+
#
|
|
413
|
+
#
|
|
350
414
|
#
|
|
351
|
-
#
|
|
415
|
+
# [1]: https://docs.aws.amazon.com/AmazonS3/latest/dev/S3_ACLs_UsingACLs.html
|
|
416
|
+
# [2]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/about-object-ownership.html
|
|
352
417
|
# @option options [String] :cache_control
|
|
353
|
-
# Specifies caching behavior along the request/reply chain.
|
|
418
|
+
# Specifies the caching behavior along the request/reply chain.
|
|
354
419
|
# @option options [String] :checksum_algorithm
|
|
355
|
-
# Indicates the algorithm you want Amazon S3 to use to create the
|
|
420
|
+
# Indicates the algorithm that you want Amazon S3 to use to create the
|
|
356
421
|
# checksum for the object. For more information, see [Checking object
|
|
357
422
|
# integrity][1] in the *Amazon S3 User Guide*.
|
|
358
423
|
#
|
|
424
|
+
# When you copy an object, if the source object has a checksum, that
|
|
425
|
+
# checksum value will be copied to the new object by default. If the
|
|
426
|
+
# `CopyObject` request does not include this `x-amz-checksum-algorithm`
|
|
427
|
+
# header, the checksum algorithm will be copied from the source object
|
|
428
|
+
# to the destination object (if it's present on the source object). You
|
|
429
|
+
# can optionally specify a different checksum algorithm to use with the
|
|
430
|
+
# `x-amz-checksum-algorithm` header. Unrecognized or unsupported values
|
|
431
|
+
# will respond with the HTTP status code `400 Bad Request`.
|
|
432
|
+
#
|
|
433
|
+
# <note markdown="1"> For directory buckets, when you use Amazon Web Services SDKs, `CRC32`
|
|
434
|
+
# is the default checksum algorithm that's used for performance.
|
|
435
|
+
#
|
|
436
|
+
# </note>
|
|
437
|
+
#
|
|
359
438
|
#
|
|
360
439
|
#
|
|
361
440
|
# [1]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html
|
|
362
441
|
# @option options [String] :content_disposition
|
|
363
|
-
# Specifies presentational information for the object.
|
|
442
|
+
# Specifies presentational information for the object. Indicates whether
|
|
443
|
+
# an object should be displayed in a web browser or downloaded as a
|
|
444
|
+
# file. It allows specifying the desired filename for the downloaded
|
|
445
|
+
# file.
|
|
364
446
|
# @option options [String] :content_encoding
|
|
365
447
|
# Specifies what content encodings have been applied to the object and
|
|
366
448
|
# thus what decoding mechanisms must be applied to obtain the media-type
|
|
367
449
|
# referenced by the Content-Type header field.
|
|
450
|
+
#
|
|
451
|
+
# <note markdown="1"> For directory buckets, only the `aws-chunked` value is supported in
|
|
452
|
+
# this header field.
|
|
453
|
+
#
|
|
454
|
+
# </note>
|
|
368
455
|
# @option options [String] :content_language
|
|
369
456
|
# The language the content is in.
|
|
370
457
|
# @option options [String] :content_type
|
|
371
|
-
# A standard MIME type
|
|
458
|
+
# A standard MIME type that describes the format of the object data.
|
|
372
459
|
# @option options [required, String] :copy_source
|
|
373
|
-
# Specifies the source object for the copy operation.
|
|
374
|
-
#
|
|
375
|
-
# the
|
|
460
|
+
# Specifies the source object for the copy operation. The source object
|
|
461
|
+
# can be up to 5 GB. If the source object is an object that was uploaded
|
|
462
|
+
# by using a multipart upload, the object copy will be a single part
|
|
463
|
+
# object after the source object is copied to the destination bucket.
|
|
464
|
+
#
|
|
465
|
+
# You specify the value of the copy source in one of two formats,
|
|
466
|
+
# depending on whether you want to access the source object through an
|
|
467
|
+
# [access point][1]:
|
|
376
468
|
#
|
|
377
469
|
# * For objects not accessed through an access point, specify the name
|
|
378
470
|
# of the source bucket and the key of the source object, separated by
|
|
379
471
|
# a slash (/). For example, to copy the object `reports/january.pdf`
|
|
380
|
-
# from the bucket `awsexamplebucket`, use
|
|
472
|
+
# from the general purpose bucket `awsexamplebucket`, use
|
|
381
473
|
# `awsexamplebucket/reports/january.pdf`. The value must be
|
|
382
|
-
# URL-encoded.
|
|
474
|
+
# URL-encoded. To copy the object `reports/january.pdf` from the
|
|
475
|
+
# directory bucket `awsexamplebucket--use1-az5--x-s3`, use
|
|
476
|
+
# `awsexamplebucket--use1-az5--x-s3/reports/january.pdf`. The value
|
|
477
|
+
# must be URL-encoded.
|
|
383
478
|
#
|
|
384
479
|
# * For objects accessed through access points, specify the Amazon
|
|
385
480
|
# Resource Name (ARN) of the object as accessed through the access
|
|
@@ -391,9 +486,11 @@ module Aws::S3
|
|
|
391
486
|
# `arn:aws:s3:us-west-2:123456789012:accesspoint/my-access-point/object/reports/january.pdf`.
|
|
392
487
|
# The value must be URL encoded.
|
|
393
488
|
#
|
|
394
|
-
# <note markdown="1"> Amazon S3 supports copy operations using
|
|
395
|
-
#
|
|
396
|
-
#
|
|
489
|
+
# <note markdown="1"> * Amazon S3 supports copy operations using Access points only when
|
|
490
|
+
# the source and destination buckets are in the same Amazon Web
|
|
491
|
+
# Services Region.
|
|
492
|
+
#
|
|
493
|
+
# * Access points are not supported by directory buckets.
|
|
397
494
|
#
|
|
398
495
|
# </note>
|
|
399
496
|
#
|
|
@@ -406,159 +503,603 @@ module Aws::S3
|
|
|
406
503
|
# `arn:aws:s3-outposts:us-west-2:123456789012:outpost/my-outpost/object/reports/january.pdf`.
|
|
407
504
|
# The value must be URL-encoded.
|
|
408
505
|
#
|
|
409
|
-
#
|
|
410
|
-
#
|
|
506
|
+
# If your source bucket versioning is enabled, the `x-amz-copy-source`
|
|
507
|
+
# header by default identifies the current version of an object to copy.
|
|
508
|
+
# If the current version is a delete marker, Amazon S3 behaves as if the
|
|
509
|
+
# object was deleted. To copy a different version, use the `versionId`
|
|
510
|
+
# query parameter. Specifically, append `?versionId=<version-id>` to the
|
|
511
|
+
# value (for example,
|
|
411
512
|
# `awsexamplebucket/reports/january.pdf?versionId=QUpfdndhfd8438MNFDN93jdnJFkdmqnh893`).
|
|
412
513
|
# If you don't specify a version ID, Amazon S3 copies the latest
|
|
413
514
|
# version of the source object.
|
|
414
515
|
#
|
|
516
|
+
# If you enable versioning on the destination bucket, Amazon S3
|
|
517
|
+
# generates a unique version ID for the copied object. This version ID
|
|
518
|
+
# is different from the version ID of the source object. Amazon S3
|
|
519
|
+
# returns the version ID of the copied object in the `x-amz-version-id`
|
|
520
|
+
# response header in the response.
|
|
521
|
+
#
|
|
522
|
+
# If you do not enable versioning or suspend it on the destination
|
|
523
|
+
# bucket, the version ID that Amazon S3 generates in the
|
|
524
|
+
# `x-amz-version-id` response header is always null.
|
|
525
|
+
#
|
|
526
|
+
# <note markdown="1"> **Directory buckets** - S3 Versioning isn't enabled and supported for
|
|
527
|
+
# directory buckets.
|
|
528
|
+
#
|
|
529
|
+
# </note>
|
|
530
|
+
#
|
|
415
531
|
#
|
|
416
532
|
#
|
|
417
533
|
# [1]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/access-points.html
|
|
418
534
|
# @option options [String] :copy_source_if_match
|
|
419
535
|
# Copies the object if its entity tag (ETag) matches the specified tag.
|
|
536
|
+
#
|
|
537
|
+
# If both the `x-amz-copy-source-if-match` and
|
|
538
|
+
# `x-amz-copy-source-if-unmodified-since` headers are present in the
|
|
539
|
+
# request and evaluate as follows, Amazon S3 returns `200 OK` and copies
|
|
540
|
+
# the data:
|
|
541
|
+
#
|
|
542
|
+
# * `x-amz-copy-source-if-match` condition evaluates to true
|
|
543
|
+
#
|
|
544
|
+
# * `x-amz-copy-source-if-unmodified-since` condition evaluates to false
|
|
420
545
|
# @option options [Time,DateTime,Date,Integer,String] :copy_source_if_modified_since
|
|
421
546
|
# Copies the object if it has been modified since the specified time.
|
|
547
|
+
#
|
|
548
|
+
# If both the `x-amz-copy-source-if-none-match` and
|
|
549
|
+
# `x-amz-copy-source-if-modified-since` headers are present in the
|
|
550
|
+
# request and evaluate as follows, Amazon S3 returns the `412
|
|
551
|
+
# Precondition Failed` response code:
|
|
552
|
+
#
|
|
553
|
+
# * `x-amz-copy-source-if-none-match` condition evaluates to false
|
|
554
|
+
#
|
|
555
|
+
# * `x-amz-copy-source-if-modified-since` condition evaluates to true
|
|
422
556
|
# @option options [String] :copy_source_if_none_match
|
|
423
557
|
# Copies the object if its entity tag (ETag) is different than the
|
|
424
558
|
# specified ETag.
|
|
559
|
+
#
|
|
560
|
+
# If both the `x-amz-copy-source-if-none-match` and
|
|
561
|
+
# `x-amz-copy-source-if-modified-since` headers are present in the
|
|
562
|
+
# request and evaluate as follows, Amazon S3 returns the `412
|
|
563
|
+
# Precondition Failed` response code:
|
|
564
|
+
#
|
|
565
|
+
# * `x-amz-copy-source-if-none-match` condition evaluates to false
|
|
566
|
+
#
|
|
567
|
+
# * `x-amz-copy-source-if-modified-since` condition evaluates to true
|
|
425
568
|
# @option options [Time,DateTime,Date,Integer,String] :copy_source_if_unmodified_since
|
|
426
569
|
# Copies the object if it hasn't been modified since the specified
|
|
427
570
|
# time.
|
|
571
|
+
#
|
|
572
|
+
# If both the `x-amz-copy-source-if-match` and
|
|
573
|
+
# `x-amz-copy-source-if-unmodified-since` headers are present in the
|
|
574
|
+
# request and evaluate as follows, Amazon S3 returns `200 OK` and copies
|
|
575
|
+
# the data:
|
|
576
|
+
#
|
|
577
|
+
# * `x-amz-copy-source-if-match` condition evaluates to true
|
|
578
|
+
#
|
|
579
|
+
# * `x-amz-copy-source-if-unmodified-since` condition evaluates to false
|
|
428
580
|
# @option options [Time,DateTime,Date,Integer,String] :expires
|
|
429
581
|
# The date and time at which the object is no longer cacheable.
|
|
430
582
|
# @option options [String] :grant_full_control
|
|
431
583
|
# Gives the grantee READ, READ\_ACP, and WRITE\_ACP permissions on the
|
|
432
584
|
# object.
|
|
433
585
|
#
|
|
434
|
-
# This
|
|
586
|
+
# <note markdown="1"> * This functionality is not supported for directory buckets.
|
|
587
|
+
#
|
|
588
|
+
# * This functionality is not supported for Amazon S3 on Outposts.
|
|
589
|
+
#
|
|
590
|
+
# </note>
|
|
435
591
|
# @option options [String] :grant_read
|
|
436
592
|
# Allows grantee to read the object data and its metadata.
|
|
437
593
|
#
|
|
438
|
-
# This
|
|
594
|
+
# <note markdown="1"> * This functionality is not supported for directory buckets.
|
|
595
|
+
#
|
|
596
|
+
# * This functionality is not supported for Amazon S3 on Outposts.
|
|
597
|
+
#
|
|
598
|
+
# </note>
|
|
439
599
|
# @option options [String] :grant_read_acp
|
|
440
600
|
# Allows grantee to read the object ACL.
|
|
441
601
|
#
|
|
442
|
-
# This
|
|
602
|
+
# <note markdown="1"> * This functionality is not supported for directory buckets.
|
|
603
|
+
#
|
|
604
|
+
# * This functionality is not supported for Amazon S3 on Outposts.
|
|
605
|
+
#
|
|
606
|
+
# </note>
|
|
443
607
|
# @option options [String] :grant_write_acp
|
|
444
608
|
# Allows grantee to write the ACL for the applicable object.
|
|
445
609
|
#
|
|
446
|
-
# This
|
|
610
|
+
# <note markdown="1"> * This functionality is not supported for directory buckets.
|
|
611
|
+
#
|
|
612
|
+
# * This functionality is not supported for Amazon S3 on Outposts.
|
|
613
|
+
#
|
|
614
|
+
# </note>
|
|
615
|
+
# @option options [String] :if_match
|
|
616
|
+
# Copies the object if the entity tag (ETag) of the destination object
|
|
617
|
+
# matches the specified tag. If the ETag values do not match, the
|
|
618
|
+
# operation returns a `412 Precondition Failed` error. If a concurrent
|
|
619
|
+
# operation occurs during the upload S3 returns a `409
|
|
620
|
+
# ConditionalRequestConflict` response. On a 409 failure you should
|
|
621
|
+
# fetch the object's ETag and retry the upload.
|
|
622
|
+
#
|
|
623
|
+
# Expects the ETag value as a string.
|
|
624
|
+
#
|
|
625
|
+
# For more information about conditional requests, see [RFC 7232][1].
|
|
626
|
+
#
|
|
627
|
+
#
|
|
628
|
+
#
|
|
629
|
+
# [1]: https://tools.ietf.org/html/rfc7232
|
|
630
|
+
# @option options [String] :if_none_match
|
|
631
|
+
# Copies the object only if the object key name at the destination does
|
|
632
|
+
# not already exist in the bucket specified. Otherwise, Amazon S3
|
|
633
|
+
# returns a `412 Precondition Failed` error. If a concurrent operation
|
|
634
|
+
# occurs during the upload S3 returns a `409 ConditionalRequestConflict`
|
|
635
|
+
# response. On a 409 failure you should retry the upload.
|
|
636
|
+
#
|
|
637
|
+
# Expects the '*' (asterisk) character.
|
|
638
|
+
#
|
|
639
|
+
# For more information about conditional requests, see [RFC 7232][1].
|
|
640
|
+
#
|
|
641
|
+
#
|
|
642
|
+
#
|
|
643
|
+
# [1]: https://tools.ietf.org/html/rfc7232
|
|
447
644
|
# @option options [Hash<String,String>] :metadata
|
|
448
645
|
# A map of metadata to store with the object in S3.
|
|
449
646
|
# @option options [String] :metadata_directive
|
|
450
647
|
# Specifies whether the metadata is copied from the source object or
|
|
451
|
-
# replaced with metadata provided in the request.
|
|
648
|
+
# replaced with metadata that's provided in the request. When copying
|
|
649
|
+
# an object, you can preserve all metadata (the default) or specify new
|
|
650
|
+
# metadata. If this header isn’t specified, `COPY` is the default
|
|
651
|
+
# behavior.
|
|
652
|
+
#
|
|
653
|
+
# **General purpose bucket** - For general purpose buckets, when you
|
|
654
|
+
# grant permissions, you can use the `s3:x-amz-metadata-directive`
|
|
655
|
+
# condition key to enforce certain metadata behavior when objects are
|
|
656
|
+
# uploaded. For more information, see [Amazon S3 condition key
|
|
657
|
+
# examples][1] in the *Amazon S3 User Guide*.
|
|
658
|
+
#
|
|
659
|
+
# <note markdown="1"> `x-amz-website-redirect-location` is unique to each object and is not
|
|
660
|
+
# copied when using the `x-amz-metadata-directive` header. To copy the
|
|
661
|
+
# value, you must specify `x-amz-website-redirect-location` in the
|
|
662
|
+
# request header.
|
|
663
|
+
#
|
|
664
|
+
# </note>
|
|
665
|
+
#
|
|
666
|
+
#
|
|
667
|
+
#
|
|
668
|
+
# [1]: https://docs.aws.amazon.com/AmazonS3/latest/dev/amazon-s3-policy-keys.html
|
|
452
669
|
# @option options [String] :tagging_directive
|
|
453
|
-
# Specifies whether the object tag-set
|
|
454
|
-
# or replaced with tag-set provided in the request.
|
|
670
|
+
# Specifies whether the object tag-set is copied from the source object
|
|
671
|
+
# or replaced with the tag-set that's provided in the request.
|
|
672
|
+
#
|
|
673
|
+
# The default value is `COPY`.
|
|
674
|
+
#
|
|
675
|
+
# <note markdown="1"> **Directory buckets** - For directory buckets in a `CopyObject`
|
|
676
|
+
# operation, only the empty tag-set is supported. Any requests that
|
|
677
|
+
# attempt to write non-empty tags into directory buckets will receive a
|
|
678
|
+
# `501 Not Implemented` status code. When the destination bucket is a
|
|
679
|
+
# directory bucket, you will receive a `501 Not Implemented` response in
|
|
680
|
+
# any of the following situations:
|
|
681
|
+
#
|
|
682
|
+
# * When you attempt to `COPY` the tag-set from an S3 source object that
|
|
683
|
+
# has non-empty tags.
|
|
684
|
+
#
|
|
685
|
+
# * When you attempt to `REPLACE` the tag-set of a source object and set
|
|
686
|
+
# a non-empty value to `x-amz-tagging`.
|
|
687
|
+
#
|
|
688
|
+
# * When you don't set the `x-amz-tagging-directive` header and the
|
|
689
|
+
# source object has non-empty tags. This is because the default value
|
|
690
|
+
# of `x-amz-tagging-directive` is `COPY`.
|
|
691
|
+
#
|
|
692
|
+
# Because only the empty tag-set is supported for directory buckets in a
|
|
693
|
+
# `CopyObject` operation, the following situations are allowed:
|
|
694
|
+
#
|
|
695
|
+
# * When you attempt to `COPY` the tag-set from a directory bucket
|
|
696
|
+
# source object that has no tags to a general purpose bucket. It
|
|
697
|
+
# copies an empty tag-set to the destination object.
|
|
698
|
+
#
|
|
699
|
+
# * When you attempt to `REPLACE` the tag-set of a directory bucket
|
|
700
|
+
# source object and set the `x-amz-tagging` value of the directory
|
|
701
|
+
# bucket destination object to empty.
|
|
702
|
+
#
|
|
703
|
+
# * When you attempt to `REPLACE` the tag-set of a general purpose
|
|
704
|
+
# bucket source object that has non-empty tags and set the
|
|
705
|
+
# `x-amz-tagging` value of the directory bucket destination object to
|
|
706
|
+
# empty.
|
|
707
|
+
#
|
|
708
|
+
# * When you attempt to `REPLACE` the tag-set of a directory bucket
|
|
709
|
+
# source object and don't set the `x-amz-tagging` value of the
|
|
710
|
+
# directory bucket destination object. This is because the default
|
|
711
|
+
# value of `x-amz-tagging` is the empty value.
|
|
712
|
+
#
|
|
713
|
+
# </note>
|
|
455
714
|
# @option options [String] :server_side_encryption
|
|
456
715
|
# The server-side encryption algorithm used when storing this object in
|
|
457
|
-
# Amazon S3
|
|
716
|
+
# Amazon S3. Unrecognized or unsupported values won’t write a
|
|
717
|
+
# destination object and will receive a `400 Bad Request` response.
|
|
718
|
+
#
|
|
719
|
+
# Amazon S3 automatically encrypts all new objects that are copied to an
|
|
720
|
+
# S3 bucket. When copying an object, if you don't specify encryption
|
|
721
|
+
# information in your copy request, the encryption setting of the target
|
|
722
|
+
# object is set to the default encryption configuration of the
|
|
723
|
+
# destination bucket. By default, all buckets have a base level of
|
|
724
|
+
# encryption configuration that uses server-side encryption with Amazon
|
|
725
|
+
# S3 managed keys (SSE-S3). If the destination bucket has a different
|
|
726
|
+
# default encryption configuration, Amazon S3 uses the corresponding
|
|
727
|
+
# encryption key to encrypt the target object copy.
|
|
728
|
+
#
|
|
729
|
+
# With server-side encryption, Amazon S3 encrypts your data as it writes
|
|
730
|
+
# your data to disks in its data centers and decrypts the data when you
|
|
731
|
+
# access it. For more information about server-side encryption, see
|
|
732
|
+
# [Using Server-Side Encryption][1] in the *Amazon S3 User Guide*.
|
|
733
|
+
#
|
|
734
|
+
# <b>General purpose buckets </b>
|
|
735
|
+
#
|
|
736
|
+
# * For general purpose buckets, there are the following supported
|
|
737
|
+
# options for server-side encryption: server-side encryption with Key
|
|
738
|
+
# Management Service (KMS) keys (SSE-KMS), dual-layer server-side
|
|
739
|
+
# encryption with Amazon Web Services KMS keys (DSSE-KMS), and
|
|
740
|
+
# server-side encryption with customer-provided encryption keys
|
|
741
|
+
# (SSE-C). Amazon S3 uses the corresponding KMS key, or a
|
|
742
|
+
# customer-provided key to encrypt the target object copy.
|
|
743
|
+
#
|
|
744
|
+
# * When you perform a `CopyObject` operation, if you want to use a
|
|
745
|
+
# different type of encryption setting for the target object, you can
|
|
746
|
+
# specify appropriate encryption-related headers to encrypt the target
|
|
747
|
+
# object with an Amazon S3 managed key, a KMS key, or a
|
|
748
|
+
# customer-provided key. If the encryption setting in your request is
|
|
749
|
+
# different from the default encryption configuration of the
|
|
750
|
+
# destination bucket, the encryption setting in your request takes
|
|
751
|
+
# precedence.
|
|
752
|
+
#
|
|
753
|
+
# <b>Directory buckets </b>
|
|
754
|
+
#
|
|
755
|
+
# * For directory buckets, there are only two supported options for
|
|
756
|
+
# server-side encryption: server-side encryption with Amazon S3
|
|
757
|
+
# managed keys (SSE-S3) (`AES256`) and server-side encryption with KMS
|
|
758
|
+
# keys (SSE-KMS) (`aws:kms`). We recommend that the bucket's default
|
|
759
|
+
# encryption uses the desired encryption configuration and you don't
|
|
760
|
+
# override the bucket default encryption in your `CreateSession`
|
|
761
|
+
# requests or `PUT` object requests. Then, new objects are
|
|
762
|
+
# automatically encrypted with the desired encryption settings. For
|
|
763
|
+
# more information, see [Protecting data with server-side
|
|
764
|
+
# encryption][2] in the *Amazon S3 User Guide*. For more information
|
|
765
|
+
# about the encryption overriding behaviors in directory buckets, see
|
|
766
|
+
# [Specifying server-side encryption with KMS for new object
|
|
767
|
+
# uploads][3].
|
|
768
|
+
#
|
|
769
|
+
# * To encrypt new object copies to a directory bucket with SSE-KMS, we
|
|
770
|
+
# recommend you specify SSE-KMS as the directory bucket's default
|
|
771
|
+
# encryption configuration with a KMS key (specifically, a [customer
|
|
772
|
+
# managed key][4]). The [Amazon Web Services managed key][5]
|
|
773
|
+
# (`aws/s3`) isn't supported. Your SSE-KMS configuration can only
|
|
774
|
+
# support 1 [customer managed key][4] per directory bucket for the
|
|
775
|
+
# lifetime of the bucket. After you specify a customer managed key for
|
|
776
|
+
# SSE-KMS, you can't override the customer managed key for the
|
|
777
|
+
# bucket's SSE-KMS configuration. Then, when you perform a
|
|
778
|
+
# `CopyObject` operation and want to specify server-side encryption
|
|
779
|
+
# settings for new object copies with SSE-KMS in the
|
|
780
|
+
# encryption-related request headers, you must ensure the encryption
|
|
781
|
+
# key is the same customer managed key that you specified for the
|
|
782
|
+
# directory bucket's default encryption configuration.
|
|
783
|
+
#
|
|
784
|
+
# * <b>S3 access points for Amazon FSx </b> - When accessing data stored
|
|
785
|
+
# in Amazon FSx file systems using S3 access points, the only valid
|
|
786
|
+
# server side encryption option is `aws:fsx`. All Amazon FSx file
|
|
787
|
+
# systems have encryption configured by default and are encrypted at
|
|
788
|
+
# rest. Data is automatically encrypted before being written to the
|
|
789
|
+
# file system, and automatically decrypted as it is read. These
|
|
790
|
+
# processes are handled transparently by Amazon FSx.
|
|
791
|
+
#
|
|
792
|
+
#
|
|
793
|
+
#
|
|
794
|
+
# [1]: https://docs.aws.amazon.com/AmazonS3/latest/dev/serv-side-encryption.html
|
|
795
|
+
# [2]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-express-serv-side-encryption.html
|
|
796
|
+
# [3]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-express-specifying-kms-encryption.html
|
|
797
|
+
# [4]: https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#customer-cmk
|
|
798
|
+
# [5]: https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#aws-managed-cmk
|
|
458
799
|
# @option options [String] :storage_class
|
|
459
800
|
# If the `x-amz-storage-class` header is not used, the copied object
|
|
460
|
-
# will be stored in the STANDARD Storage Class by default. The
|
|
461
|
-
# storage class provides high durability and high
|
|
462
|
-
# Depending on performance needs, you can specify a
|
|
463
|
-
#
|
|
464
|
-
#
|
|
465
|
-
#
|
|
801
|
+
# will be stored in the `STANDARD` Storage Class by default. The
|
|
802
|
+
# `STANDARD` storage class provides high durability and high
|
|
803
|
+
# availability. Depending on performance needs, you can specify a
|
|
804
|
+
# different Storage Class.
|
|
805
|
+
#
|
|
806
|
+
# <note markdown="1"> * <b>Directory buckets </b> - Directory buckets only support
|
|
807
|
+
# `EXPRESS_ONEZONE` (the S3 Express One Zone storage class) in
|
|
808
|
+
# Availability Zones and `ONEZONE_IA` (the S3 One Zone-Infrequent
|
|
809
|
+
# Access storage class) in Dedicated Local Zones. Unsupported storage
|
|
810
|
+
# class values won't write a destination object and will respond with
|
|
811
|
+
# the HTTP status code `400 Bad Request`.
|
|
812
|
+
#
|
|
813
|
+
# * <b>Amazon S3 on Outposts </b> - S3 on Outposts only uses the
|
|
814
|
+
# `OUTPOSTS` Storage Class.
|
|
815
|
+
#
|
|
816
|
+
# </note>
|
|
817
|
+
#
|
|
818
|
+
# You can use the `CopyObject` action to change the storage class of an
|
|
819
|
+
# object that is already stored in Amazon S3 by using the
|
|
820
|
+
# `x-amz-storage-class` header. For more information, see [Storage
|
|
821
|
+
# Classes][1] in the *Amazon S3 User Guide*.
|
|
822
|
+
#
|
|
823
|
+
# Before using an object as a source object for the copy operation, you
|
|
824
|
+
# must restore a copy of it if it meets any of the following conditions:
|
|
825
|
+
#
|
|
826
|
+
# * The storage class of the source object is `GLACIER` or
|
|
827
|
+
# `DEEP_ARCHIVE`.
|
|
828
|
+
#
|
|
829
|
+
# * The storage class of the source object is `INTELLIGENT_TIERING` and
|
|
830
|
+
# it's [S3 Intelligent-Tiering access tier][2] is `Archive Access` or
|
|
831
|
+
# `Deep Archive Access`.
|
|
832
|
+
#
|
|
833
|
+
# For more information, see [RestoreObject][3] and [Copying Objects][4]
|
|
834
|
+
# in the *Amazon S3 User Guide*.
|
|
466
835
|
#
|
|
467
836
|
#
|
|
468
837
|
#
|
|
469
838
|
# [1]: https://docs.aws.amazon.com/AmazonS3/latest/dev/storage-class-intro.html
|
|
839
|
+
# [2]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/intelligent-tiering-overview.html#intel-tiering-tier-definition
|
|
840
|
+
# [3]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_RestoreObject.html
|
|
841
|
+
# [4]: https://docs.aws.amazon.com/AmazonS3/latest/dev/CopyingObjectsExamples.html
|
|
470
842
|
# @option options [String] :website_redirect_location
|
|
471
|
-
# If the bucket is configured as a website, redirects
|
|
472
|
-
# object to another object in the same bucket or
|
|
473
|
-
# Amazon S3 stores the value of this header in the
|
|
474
|
-
# value is unique to each object and is not copied
|
|
475
|
-
# `x-amz-metadata-directive` header. Instead, you may opt
|
|
476
|
-
# this header in combination with the
|
|
843
|
+
# If the destination bucket is configured as a website, redirects
|
|
844
|
+
# requests for this object copy to another object in the same bucket or
|
|
845
|
+
# to an external URL. Amazon S3 stores the value of this header in the
|
|
846
|
+
# object metadata. This value is unique to each object and is not copied
|
|
847
|
+
# when using the `x-amz-metadata-directive` header. Instead, you may opt
|
|
848
|
+
# to provide this header in combination with the
|
|
849
|
+
# `x-amz-metadata-directive` header.
|
|
850
|
+
#
|
|
851
|
+
# <note markdown="1"> This functionality is not supported for directory buckets.
|
|
852
|
+
#
|
|
853
|
+
# </note>
|
|
477
854
|
# @option options [String] :sse_customer_algorithm
|
|
478
|
-
# Specifies the algorithm to use
|
|
479
|
-
# example, AES256).
|
|
855
|
+
# Specifies the algorithm to use when encrypting the object (for
|
|
856
|
+
# example, `AES256`).
|
|
857
|
+
#
|
|
858
|
+
# When you perform a `CopyObject` operation, if you want to use a
|
|
859
|
+
# different type of encryption setting for the target object, you can
|
|
860
|
+
# specify appropriate encryption-related headers to encrypt the target
|
|
861
|
+
# object with an Amazon S3 managed key, a KMS key, or a
|
|
862
|
+
# customer-provided key. If the encryption setting in your request is
|
|
863
|
+
# different from the default encryption configuration of the destination
|
|
864
|
+
# bucket, the encryption setting in your request takes precedence.
|
|
865
|
+
#
|
|
866
|
+
# <note markdown="1"> This functionality is not supported when the destination bucket is a
|
|
867
|
+
# directory bucket.
|
|
868
|
+
#
|
|
869
|
+
# </note>
|
|
480
870
|
# @option options [String] :sse_customer_key
|
|
481
871
|
# Specifies the customer-provided encryption key for Amazon S3 to use in
|
|
482
872
|
# encrypting data. This value is used to store the object and then it is
|
|
483
|
-
# discarded
|
|
873
|
+
# discarded. Amazon S3 does not store the encryption key. The key must
|
|
484
874
|
# be appropriate for use with the algorithm specified in the
|
|
485
875
|
# `x-amz-server-side-encryption-customer-algorithm` header.
|
|
876
|
+
#
|
|
877
|
+
# <note markdown="1"> This functionality is not supported when the destination bucket is a
|
|
878
|
+
# directory bucket.
|
|
879
|
+
#
|
|
880
|
+
# </note>
|
|
486
881
|
# @option options [String] :sse_customer_key_md5
|
|
487
882
|
# Specifies the 128-bit MD5 digest of the encryption key according to
|
|
488
883
|
# RFC 1321. Amazon S3 uses this header for a message integrity check to
|
|
489
884
|
# ensure that the encryption key was transmitted without error.
|
|
885
|
+
#
|
|
886
|
+
# <note markdown="1"> This functionality is not supported when the destination bucket is a
|
|
887
|
+
# directory bucket.
|
|
888
|
+
#
|
|
889
|
+
# </note>
|
|
490
890
|
# @option options [String] :ssekms_key_id
|
|
491
|
-
# Specifies the KMS ID (Key ID, Key ARN, or Key Alias) to use for
|
|
492
|
-
# encryption. All GET and PUT requests for an object protected by
|
|
493
|
-
# will fail if they're not made via SSL or using SigV4. For
|
|
494
|
-
# about configuring any of the officially supported Amazon
|
|
495
|
-
# SDKs and Amazon Web Services CLI, see [Specifying the
|
|
496
|
-
# Version in Request Authentication][1] in the *Amazon S3 User
|
|
891
|
+
# Specifies the KMS key ID (Key ID, Key ARN, or Key Alias) to use for
|
|
892
|
+
# object encryption. All GET and PUT requests for an object protected by
|
|
893
|
+
# KMS will fail if they're not made via SSL or using SigV4. For
|
|
894
|
+
# information about configuring any of the officially supported Amazon
|
|
895
|
+
# Web Services SDKs and Amazon Web Services CLI, see [Specifying the
|
|
896
|
+
# Signature Version in Request Authentication][1] in the *Amazon S3 User
|
|
897
|
+
# Guide*.
|
|
898
|
+
#
|
|
899
|
+
# **Directory buckets** - To encrypt data using SSE-KMS, it's
|
|
900
|
+
# recommended to specify the `x-amz-server-side-encryption` header to
|
|
901
|
+
# `aws:kms`. Then, the `x-amz-server-side-encryption-aws-kms-key-id`
|
|
902
|
+
# header implicitly uses the bucket's default KMS customer managed key
|
|
903
|
+
# ID. If you want to explicitly set the `
|
|
904
|
+
# x-amz-server-side-encryption-aws-kms-key-id` header, it must match the
|
|
905
|
+
# bucket's default customer managed key (using key ID or ARN, not
|
|
906
|
+
# alias). Your SSE-KMS configuration can only support 1 [customer
|
|
907
|
+
# managed key][2] per directory bucket's lifetime. The [Amazon Web
|
|
908
|
+
# Services managed key][3] (`aws/s3`) isn't supported. Incorrect key
|
|
909
|
+
# specification results in an HTTP `400 Bad Request` error.
|
|
497
910
|
#
|
|
498
911
|
#
|
|
499
912
|
#
|
|
500
913
|
# [1]: https://docs.aws.amazon.com/AmazonS3/latest/dev/UsingAWSSDK.html#specify-signature-version
|
|
914
|
+
# [2]: https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#customer-cmk
|
|
915
|
+
# [3]: https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#aws-managed-cmk
|
|
501
916
|
# @option options [String] :ssekms_encryption_context
|
|
502
|
-
# Specifies the Amazon Web Services KMS Encryption Context
|
|
503
|
-
#
|
|
504
|
-
#
|
|
917
|
+
# Specifies the Amazon Web Services KMS Encryption Context as an
|
|
918
|
+
# additional encryption context to use for the destination object
|
|
919
|
+
# encryption. The value of this header is a base64-encoded UTF-8 string
|
|
920
|
+
# holding JSON with the encryption context key-value pairs.
|
|
921
|
+
#
|
|
922
|
+
# **General purpose buckets** - This value must be explicitly added to
|
|
923
|
+
# specify encryption context for `CopyObject` requests if you want an
|
|
924
|
+
# additional encryption context for your destination object. The
|
|
925
|
+
# additional encryption context of the source object won't be copied to
|
|
926
|
+
# the destination object. For more information, see [Encryption
|
|
927
|
+
# context][1] in the *Amazon S3 User Guide*.
|
|
928
|
+
#
|
|
929
|
+
# **Directory buckets** - You can optionally provide an explicit
|
|
930
|
+
# encryption context value. The value must match the default encryption
|
|
931
|
+
# context - the bucket Amazon Resource Name (ARN). An additional
|
|
932
|
+
# encryption context value is not supported.
|
|
933
|
+
#
|
|
934
|
+
#
|
|
935
|
+
#
|
|
936
|
+
# [1]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/UsingKMSEncryption.html#encryption-context
|
|
505
937
|
# @option options [Boolean] :bucket_key_enabled
|
|
506
938
|
# Specifies whether Amazon S3 should use an S3 Bucket Key for object
|
|
507
939
|
# encryption with server-side encryption using Key Management Service
|
|
508
|
-
# (KMS) keys (SSE-KMS).
|
|
509
|
-
#
|
|
940
|
+
# (KMS) keys (SSE-KMS). If a target object uses SSE-KMS, you can enable
|
|
941
|
+
# an S3 Bucket Key for the object.
|
|
942
|
+
#
|
|
943
|
+
# Setting this header to `true` causes Amazon S3 to use an S3 Bucket Key
|
|
944
|
+
# for object encryption with SSE-KMS. Specifying this header with a COPY
|
|
945
|
+
# action doesn’t affect bucket-level settings for S3 Bucket Key.
|
|
946
|
+
#
|
|
947
|
+
# For more information, see [Amazon S3 Bucket Keys][1] in the *Amazon S3
|
|
948
|
+
# User Guide*.
|
|
949
|
+
#
|
|
950
|
+
# <note markdown="1"> **Directory buckets** - S3 Bucket Keys aren't supported, when you
|
|
951
|
+
# copy SSE-KMS encrypted objects from general purpose buckets to
|
|
952
|
+
# directory buckets, from directory buckets to general purpose buckets,
|
|
953
|
+
# or between directory buckets, through [CopyObject][2]. In this case,
|
|
954
|
+
# Amazon S3 makes a call to KMS every time a copy request is made for a
|
|
955
|
+
# KMS-encrypted object.
|
|
510
956
|
#
|
|
511
|
-
#
|
|
512
|
-
#
|
|
957
|
+
# </note>
|
|
958
|
+
#
|
|
959
|
+
#
|
|
960
|
+
#
|
|
961
|
+
# [1]: https://docs.aws.amazon.com/AmazonS3/latest/dev/bucket-key.html
|
|
962
|
+
# [2]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_CopyObject.html
|
|
513
963
|
# @option options [String] :copy_source_sse_customer_algorithm
|
|
514
964
|
# Specifies the algorithm to use when decrypting the source object (for
|
|
515
|
-
# example, AES256).
|
|
965
|
+
# example, `AES256`).
|
|
966
|
+
#
|
|
967
|
+
# If the source object for the copy is stored in Amazon S3 using SSE-C,
|
|
968
|
+
# you must provide the necessary encryption information in your request
|
|
969
|
+
# so that Amazon S3 can decrypt the object for copying.
|
|
970
|
+
#
|
|
971
|
+
# <note markdown="1"> This functionality is not supported when the source object is in a
|
|
972
|
+
# directory bucket.
|
|
973
|
+
#
|
|
974
|
+
# </note>
|
|
516
975
|
# @option options [String] :copy_source_sse_customer_key
|
|
517
976
|
# Specifies the customer-provided encryption key for Amazon S3 to use to
|
|
518
977
|
# decrypt the source object. The encryption key provided in this header
|
|
519
|
-
# must be one that was used when the source object was created.
|
|
978
|
+
# must be the same one that was used when the source object was created.
|
|
979
|
+
#
|
|
980
|
+
# If the source object for the copy is stored in Amazon S3 using SSE-C,
|
|
981
|
+
# you must provide the necessary encryption information in your request
|
|
982
|
+
# so that Amazon S3 can decrypt the object for copying.
|
|
983
|
+
#
|
|
984
|
+
# <note markdown="1"> This functionality is not supported when the source object is in a
|
|
985
|
+
# directory bucket.
|
|
986
|
+
#
|
|
987
|
+
# </note>
|
|
520
988
|
# @option options [String] :copy_source_sse_customer_key_md5
|
|
521
989
|
# Specifies the 128-bit MD5 digest of the encryption key according to
|
|
522
990
|
# RFC 1321. Amazon S3 uses this header for a message integrity check to
|
|
523
991
|
# ensure that the encryption key was transmitted without error.
|
|
992
|
+
#
|
|
993
|
+
# If the source object for the copy is stored in Amazon S3 using SSE-C,
|
|
994
|
+
# you must provide the necessary encryption information in your request
|
|
995
|
+
# so that Amazon S3 can decrypt the object for copying.
|
|
996
|
+
#
|
|
997
|
+
# <note markdown="1"> This functionality is not supported when the source object is in a
|
|
998
|
+
# directory bucket.
|
|
999
|
+
#
|
|
1000
|
+
# </note>
|
|
524
1001
|
# @option options [String] :request_payer
|
|
525
1002
|
# Confirms that the requester knows that they will be charged for the
|
|
526
1003
|
# request. Bucket owners need not specify this parameter in their
|
|
527
|
-
# requests. If either the source or destination
|
|
528
|
-
#
|
|
529
|
-
#
|
|
530
|
-
#
|
|
531
|
-
#
|
|
1004
|
+
# requests. If either the source or destination S3 bucket has Requester
|
|
1005
|
+
# Pays enabled, the requester will pay for corresponding charges to copy
|
|
1006
|
+
# the object. For information about downloading objects from Requester
|
|
1007
|
+
# Pays buckets, see [Downloading Objects in Requester Pays Buckets][1]
|
|
1008
|
+
# in the *Amazon S3 User Guide*.
|
|
1009
|
+
#
|
|
1010
|
+
# <note markdown="1"> This functionality is not supported for directory buckets.
|
|
1011
|
+
#
|
|
1012
|
+
# </note>
|
|
532
1013
|
#
|
|
533
1014
|
#
|
|
534
1015
|
#
|
|
535
1016
|
# [1]: https://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html
|
|
536
1017
|
# @option options [String] :tagging
|
|
537
|
-
# The tag-set for the object
|
|
538
|
-
# in conjunction with the `
|
|
539
|
-
#
|
|
1018
|
+
# The tag-set for the object copy in the destination bucket. This value
|
|
1019
|
+
# must be used in conjunction with the `x-amz-tagging-directive` if you
|
|
1020
|
+
# choose `REPLACE` for the `x-amz-tagging-directive`. If you choose
|
|
1021
|
+
# `COPY` for the `x-amz-tagging-directive`, you don't need to set the
|
|
1022
|
+
# `x-amz-tagging` header, because the tag-set will be copied from the
|
|
1023
|
+
# source object directly. The tag-set must be encoded as URL Query
|
|
1024
|
+
# parameters.
|
|
1025
|
+
#
|
|
1026
|
+
# The default value is the empty value.
|
|
1027
|
+
#
|
|
1028
|
+
# <note markdown="1"> **Directory buckets** - For directory buckets in a `CopyObject`
|
|
1029
|
+
# operation, only the empty tag-set is supported. Any requests that
|
|
1030
|
+
# attempt to write non-empty tags into directory buckets will receive a
|
|
1031
|
+
# `501 Not Implemented` status code. When the destination bucket is a
|
|
1032
|
+
# directory bucket, you will receive a `501 Not Implemented` response in
|
|
1033
|
+
# any of the following situations:
|
|
1034
|
+
#
|
|
1035
|
+
# * When you attempt to `COPY` the tag-set from an S3 source object that
|
|
1036
|
+
# has non-empty tags.
|
|
1037
|
+
#
|
|
1038
|
+
# * When you attempt to `REPLACE` the tag-set of a source object and set
|
|
1039
|
+
# a non-empty value to `x-amz-tagging`.
|
|
1040
|
+
#
|
|
1041
|
+
# * When you don't set the `x-amz-tagging-directive` header and the
|
|
1042
|
+
# source object has non-empty tags. This is because the default value
|
|
1043
|
+
# of `x-amz-tagging-directive` is `COPY`.
|
|
1044
|
+
#
|
|
1045
|
+
# Because only the empty tag-set is supported for directory buckets in a
|
|
1046
|
+
# `CopyObject` operation, the following situations are allowed:
|
|
1047
|
+
#
|
|
1048
|
+
# * When you attempt to `COPY` the tag-set from a directory bucket
|
|
1049
|
+
# source object that has no tags to a general purpose bucket. It
|
|
1050
|
+
# copies an empty tag-set to the destination object.
|
|
1051
|
+
#
|
|
1052
|
+
# * When you attempt to `REPLACE` the tag-set of a directory bucket
|
|
1053
|
+
# source object and set the `x-amz-tagging` value of the directory
|
|
1054
|
+
# bucket destination object to empty.
|
|
1055
|
+
#
|
|
1056
|
+
# * When you attempt to `REPLACE` the tag-set of a general purpose
|
|
1057
|
+
# bucket source object that has non-empty tags and set the
|
|
1058
|
+
# `x-amz-tagging` value of the directory bucket destination object to
|
|
1059
|
+
# empty.
|
|
1060
|
+
#
|
|
1061
|
+
# * When you attempt to `REPLACE` the tag-set of a directory bucket
|
|
1062
|
+
# source object and don't set the `x-amz-tagging` value of the
|
|
1063
|
+
# directory bucket destination object. This is because the default
|
|
1064
|
+
# value of `x-amz-tagging` is the empty value.
|
|
1065
|
+
#
|
|
1066
|
+
# </note>
|
|
540
1067
|
# @option options [String] :object_lock_mode
|
|
541
|
-
# The Object Lock mode that you want to apply to the
|
|
1068
|
+
# The Object Lock mode that you want to apply to the object copy.
|
|
1069
|
+
#
|
|
1070
|
+
# <note markdown="1"> This functionality is not supported for directory buckets.
|
|
1071
|
+
#
|
|
1072
|
+
# </note>
|
|
542
1073
|
# @option options [Time,DateTime,Date,Integer,String] :object_lock_retain_until_date
|
|
543
|
-
# The date and time when you want the
|
|
1074
|
+
# The date and time when you want the Object Lock of the object copy to
|
|
544
1075
|
# expire.
|
|
1076
|
+
#
|
|
1077
|
+
# <note markdown="1"> This functionality is not supported for directory buckets.
|
|
1078
|
+
#
|
|
1079
|
+
# </note>
|
|
545
1080
|
# @option options [String] :object_lock_legal_hold_status
|
|
546
|
-
# Specifies whether you want to apply a legal hold to the
|
|
1081
|
+
# Specifies whether you want to apply a legal hold to the object copy.
|
|
1082
|
+
#
|
|
1083
|
+
# <note markdown="1"> This functionality is not supported for directory buckets.
|
|
1084
|
+
#
|
|
1085
|
+
# </note>
|
|
547
1086
|
# @option options [String] :expected_bucket_owner
|
|
548
1087
|
# The account ID of the expected destination bucket owner. If the
|
|
549
|
-
#
|
|
550
|
-
# with the HTTP status code `403
|
|
1088
|
+
# account ID that you provide does not match the actual owner of the
|
|
1089
|
+
# destination bucket, the request fails with the HTTP status code `403
|
|
1090
|
+
# Forbidden` (access denied).
|
|
551
1091
|
# @option options [String] :expected_source_bucket_owner
|
|
552
|
-
# The account ID of the expected source bucket owner. If the
|
|
553
|
-
#
|
|
554
|
-
# HTTP status code `403 Forbidden` (access
|
|
1092
|
+
# The account ID of the expected source bucket owner. If the account ID
|
|
1093
|
+
# that you provide does not match the actual owner of the source bucket,
|
|
1094
|
+
# the request fails with the HTTP status code `403 Forbidden` (access
|
|
1095
|
+
# denied).
|
|
555
1096
|
# @return [Types::CopyObjectOutput]
|
|
556
1097
|
def copy_from(options = {})
|
|
557
1098
|
options = options.merge(
|
|
558
1099
|
bucket: @bucket_name,
|
|
559
1100
|
key: @key
|
|
560
1101
|
)
|
|
561
|
-
resp = Aws::Plugins::UserAgent.
|
|
1102
|
+
resp = Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
|
|
562
1103
|
@client.copy_object(options)
|
|
563
1104
|
end
|
|
564
1105
|
resp.data
|
|
@@ -572,6 +1113,9 @@ module Aws::S3
|
|
|
572
1113
|
# request_payer: "requester", # accepts requester
|
|
573
1114
|
# bypass_governance_retention: false,
|
|
574
1115
|
# expected_bucket_owner: "AccountId",
|
|
1116
|
+
# if_match: "IfMatch",
|
|
1117
|
+
# if_match_last_modified_time: Time.now,
|
|
1118
|
+
# if_match_size: 1,
|
|
575
1119
|
# })
|
|
576
1120
|
# @param [Hash] options ({})
|
|
577
1121
|
# @option options [String] :mfa
|
|
@@ -579,16 +1123,29 @@ module Aws::S3
|
|
|
579
1123
|
# space, and the value that is displayed on your authentication device.
|
|
580
1124
|
# Required to permanently delete a versioned object if versioning is
|
|
581
1125
|
# configured with MFA delete enabled.
|
|
1126
|
+
#
|
|
1127
|
+
# <note markdown="1"> This functionality is not supported for directory buckets.
|
|
1128
|
+
#
|
|
1129
|
+
# </note>
|
|
582
1130
|
# @option options [String] :version_id
|
|
583
|
-
#
|
|
1131
|
+
# Version ID used to reference a specific version of the object.
|
|
1132
|
+
#
|
|
1133
|
+
# <note markdown="1"> For directory buckets in this API operation, only the `null` value of
|
|
1134
|
+
# the version ID is supported.
|
|
1135
|
+
#
|
|
1136
|
+
# </note>
|
|
584
1137
|
# @option options [String] :request_payer
|
|
585
1138
|
# Confirms that the requester knows that they will be charged for the
|
|
586
1139
|
# request. Bucket owners need not specify this parameter in their
|
|
587
|
-
# requests. If either the source or destination
|
|
588
|
-
#
|
|
589
|
-
#
|
|
590
|
-
#
|
|
591
|
-
#
|
|
1140
|
+
# requests. If either the source or destination S3 bucket has Requester
|
|
1141
|
+
# Pays enabled, the requester will pay for corresponding charges to copy
|
|
1142
|
+
# the object. For information about downloading objects from Requester
|
|
1143
|
+
# Pays buckets, see [Downloading Objects in Requester Pays Buckets][1]
|
|
1144
|
+
# in the *Amazon S3 User Guide*.
|
|
1145
|
+
#
|
|
1146
|
+
# <note markdown="1"> This functionality is not supported for directory buckets.
|
|
1147
|
+
#
|
|
1148
|
+
# </note>
|
|
592
1149
|
#
|
|
593
1150
|
#
|
|
594
1151
|
#
|
|
@@ -597,17 +1154,59 @@ module Aws::S3
|
|
|
597
1154
|
# Indicates whether S3 Object Lock should bypass Governance-mode
|
|
598
1155
|
# restrictions to process this operation. To use this header, you must
|
|
599
1156
|
# have the `s3:BypassGovernanceRetention` permission.
|
|
1157
|
+
#
|
|
1158
|
+
# <note markdown="1"> This functionality is not supported for directory buckets.
|
|
1159
|
+
#
|
|
1160
|
+
# </note>
|
|
600
1161
|
# @option options [String] :expected_bucket_owner
|
|
601
|
-
# The account ID of the expected bucket owner. If the
|
|
602
|
-
#
|
|
603
|
-
# Forbidden` (access denied).
|
|
1162
|
+
# The account ID of the expected bucket owner. If the account ID that
|
|
1163
|
+
# you provide does not match the actual owner of the bucket, the request
|
|
1164
|
+
# fails with the HTTP status code `403 Forbidden` (access denied).
|
|
1165
|
+
# @option options [String] :if_match
|
|
1166
|
+
# Deletes the object if the ETag (entity tag) value provided during the
|
|
1167
|
+
# delete operation matches the ETag of the object in S3. If the ETag
|
|
1168
|
+
# values do not match, the operation returns a `412 Precondition Failed`
|
|
1169
|
+
# error.
|
|
1170
|
+
#
|
|
1171
|
+
# Expects the ETag value as a string. `If-Match` does accept a string
|
|
1172
|
+
# value of an '*' (asterisk) character to denote a match of any ETag.
|
|
1173
|
+
#
|
|
1174
|
+
# For more information about conditional requests, see [RFC 7232][1].
|
|
1175
|
+
#
|
|
1176
|
+
#
|
|
1177
|
+
#
|
|
1178
|
+
# [1]: https://tools.ietf.org/html/rfc7232
|
|
1179
|
+
# @option options [Time,DateTime,Date,Integer,String] :if_match_last_modified_time
|
|
1180
|
+
# If present, the object is deleted only if its modification times
|
|
1181
|
+
# matches the provided `Timestamp`. If the `Timestamp` values do not
|
|
1182
|
+
# match, the operation returns a `412 Precondition Failed` error. If the
|
|
1183
|
+
# `Timestamp` matches or if the object doesn’t exist, the operation
|
|
1184
|
+
# returns a `204 Success (No Content)` response.
|
|
1185
|
+
#
|
|
1186
|
+
# <note markdown="1"> This functionality is only supported for directory buckets.
|
|
1187
|
+
#
|
|
1188
|
+
# </note>
|
|
1189
|
+
# @option options [Integer] :if_match_size
|
|
1190
|
+
# If present, the object is deleted only if its size matches the
|
|
1191
|
+
# provided size in bytes. If the `Size` value does not match, the
|
|
1192
|
+
# operation returns a `412 Precondition Failed` error. If the `Size`
|
|
1193
|
+
# matches or if the object doesn’t exist, the operation returns a `204
|
|
1194
|
+
# Success (No Content)` response.
|
|
1195
|
+
#
|
|
1196
|
+
# <note markdown="1"> This functionality is only supported for directory buckets.
|
|
1197
|
+
#
|
|
1198
|
+
# </note>
|
|
1199
|
+
#
|
|
1200
|
+
# You can use the `If-Match`, `x-amz-if-match-last-modified-time` and
|
|
1201
|
+
# `x-amz-if-match-size` conditional headers in conjunction with
|
|
1202
|
+
# each-other or individually.
|
|
604
1203
|
# @return [Types::DeleteObjectOutput]
|
|
605
1204
|
def delete(options = {})
|
|
606
1205
|
options = options.merge(
|
|
607
1206
|
bucket: @bucket_name,
|
|
608
1207
|
key: @key
|
|
609
1208
|
)
|
|
610
|
-
resp = Aws::Plugins::UserAgent.
|
|
1209
|
+
resp = Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
|
|
611
1210
|
@client.delete_object(options)
|
|
612
1211
|
end
|
|
613
1212
|
resp.data
|
|
@@ -639,18 +1238,64 @@ module Aws::S3
|
|
|
639
1238
|
# @param [Hash] options ({})
|
|
640
1239
|
# @option options [String] :if_match
|
|
641
1240
|
# Return the object only if its entity tag (ETag) is the same as the one
|
|
642
|
-
# specified; otherwise, return a 412
|
|
1241
|
+
# specified in this header; otherwise, return a `412 Precondition
|
|
1242
|
+
# Failed` error.
|
|
1243
|
+
#
|
|
1244
|
+
# If both of the `If-Match` and `If-Unmodified-Since` headers are
|
|
1245
|
+
# present in the request as follows: `If-Match` condition evaluates to
|
|
1246
|
+
# `true`, and; `If-Unmodified-Since` condition evaluates to `false`;
|
|
1247
|
+
# then, S3 returns `200 OK` and the data requested.
|
|
1248
|
+
#
|
|
1249
|
+
# For more information about conditional requests, see [RFC 7232][1].
|
|
1250
|
+
#
|
|
1251
|
+
#
|
|
1252
|
+
#
|
|
1253
|
+
# [1]: https://tools.ietf.org/html/rfc7232
|
|
643
1254
|
# @option options [Time,DateTime,Date,Integer,String] :if_modified_since
|
|
644
1255
|
# Return the object only if it has been modified since the specified
|
|
645
|
-
# time; otherwise, return a 304
|
|
1256
|
+
# time; otherwise, return a `304 Not Modified` error.
|
|
1257
|
+
#
|
|
1258
|
+
# If both of the `If-None-Match` and `If-Modified-Since` headers are
|
|
1259
|
+
# present in the request as follows:` If-None-Match` condition evaluates
|
|
1260
|
+
# to `false`, and; `If-Modified-Since` condition evaluates to `true`;
|
|
1261
|
+
# then, S3 returns `304 Not Modified` status code.
|
|
1262
|
+
#
|
|
1263
|
+
# For more information about conditional requests, see [RFC 7232][1].
|
|
1264
|
+
#
|
|
1265
|
+
#
|
|
1266
|
+
#
|
|
1267
|
+
# [1]: https://tools.ietf.org/html/rfc7232
|
|
646
1268
|
# @option options [String] :if_none_match
|
|
647
1269
|
# Return the object only if its entity tag (ETag) is different from the
|
|
648
|
-
# one specified; otherwise, return a 304
|
|
1270
|
+
# one specified in this header; otherwise, return a `304 Not Modified`
|
|
1271
|
+
# error.
|
|
1272
|
+
#
|
|
1273
|
+
# If both of the `If-None-Match` and `If-Modified-Since` headers are
|
|
1274
|
+
# present in the request as follows:` If-None-Match` condition evaluates
|
|
1275
|
+
# to `false`, and; `If-Modified-Since` condition evaluates to `true`;
|
|
1276
|
+
# then, S3 returns `304 Not Modified` HTTP status code.
|
|
1277
|
+
#
|
|
1278
|
+
# For more information about conditional requests, see [RFC 7232][1].
|
|
1279
|
+
#
|
|
1280
|
+
#
|
|
1281
|
+
#
|
|
1282
|
+
# [1]: https://tools.ietf.org/html/rfc7232
|
|
649
1283
|
# @option options [Time,DateTime,Date,Integer,String] :if_unmodified_since
|
|
650
1284
|
# Return the object only if it has not been modified since the specified
|
|
651
|
-
# time; otherwise, return a 412
|
|
1285
|
+
# time; otherwise, return a `412 Precondition Failed` error.
|
|
1286
|
+
#
|
|
1287
|
+
# If both of the `If-Match` and `If-Unmodified-Since` headers are
|
|
1288
|
+
# present in the request as follows: `If-Match` condition evaluates to
|
|
1289
|
+
# `true`, and; `If-Unmodified-Since` condition evaluates to `false`;
|
|
1290
|
+
# then, S3 returns `200 OK` and the data requested.
|
|
1291
|
+
#
|
|
1292
|
+
# For more information about conditional requests, see [RFC 7232][1].
|
|
1293
|
+
#
|
|
1294
|
+
#
|
|
1295
|
+
#
|
|
1296
|
+
# [1]: https://tools.ietf.org/html/rfc7232
|
|
652
1297
|
# @option options [String] :range
|
|
653
|
-
# Downloads the specified range
|
|
1298
|
+
# Downloads the specified byte range of an object. For more information
|
|
654
1299
|
# about the HTTP Range header, see
|
|
655
1300
|
# [https://www.rfc-editor.org/rfc/rfc9110.html#name-range][1].
|
|
656
1301
|
#
|
|
@@ -665,7 +1310,7 @@ module Aws::S3
|
|
|
665
1310
|
# @option options [String] :response_cache_control
|
|
666
1311
|
# Sets the `Cache-Control` header of the response.
|
|
667
1312
|
# @option options [String] :response_content_disposition
|
|
668
|
-
# Sets the `Content-Disposition` header of the response
|
|
1313
|
+
# Sets the `Content-Disposition` header of the response.
|
|
669
1314
|
# @option options [String] :response_content_encoding
|
|
670
1315
|
# Sets the `Content-Encoding` header of the response.
|
|
671
1316
|
# @option options [String] :response_content_language
|
|
@@ -675,28 +1320,127 @@ module Aws::S3
|
|
|
675
1320
|
# @option options [Time,DateTime,Date,Integer,String] :response_expires
|
|
676
1321
|
# Sets the `Expires` header of the response.
|
|
677
1322
|
# @option options [String] :version_id
|
|
678
|
-
#
|
|
1323
|
+
# Version ID used to reference a specific version of the object.
|
|
1324
|
+
#
|
|
1325
|
+
# By default, the `GetObject` operation returns the current version of
|
|
1326
|
+
# an object. To return a different version, use the `versionId`
|
|
1327
|
+
# subresource.
|
|
1328
|
+
#
|
|
1329
|
+
# <note markdown="1"> * If you include a `versionId` in your request header, you must have
|
|
1330
|
+
# the `s3:GetObjectVersion` permission to access a specific version of
|
|
1331
|
+
# an object. The `s3:GetObject` permission is not required in this
|
|
1332
|
+
# scenario.
|
|
1333
|
+
#
|
|
1334
|
+
# * If you request the current version of an object without a specific
|
|
1335
|
+
# `versionId` in the request header, only the `s3:GetObject`
|
|
1336
|
+
# permission is required. The `s3:GetObjectVersion` permission is not
|
|
1337
|
+
# required in this scenario.
|
|
1338
|
+
#
|
|
1339
|
+
# * **Directory buckets** - S3 Versioning isn't enabled and supported
|
|
1340
|
+
# for directory buckets. For this API operation, only the `null` value
|
|
1341
|
+
# of the version ID is supported by directory buckets. You can only
|
|
1342
|
+
# specify `null` to the `versionId` query parameter in the request.
|
|
1343
|
+
#
|
|
1344
|
+
# </note>
|
|
1345
|
+
#
|
|
1346
|
+
# For more information about versioning, see [PutBucketVersioning][1].
|
|
1347
|
+
#
|
|
1348
|
+
#
|
|
1349
|
+
#
|
|
1350
|
+
# [1]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketVersioning.html
|
|
679
1351
|
# @option options [String] :sse_customer_algorithm
|
|
680
|
-
# Specifies the algorithm to use
|
|
681
|
-
# example, AES256).
|
|
1352
|
+
# Specifies the algorithm to use when decrypting the object (for
|
|
1353
|
+
# example, `AES256`).
|
|
1354
|
+
#
|
|
1355
|
+
# If you encrypt an object by using server-side encryption with
|
|
1356
|
+
# customer-provided encryption keys (SSE-C) when you store the object in
|
|
1357
|
+
# Amazon S3, then when you GET the object, you must use the following
|
|
1358
|
+
# headers:
|
|
1359
|
+
#
|
|
1360
|
+
# * `x-amz-server-side-encryption-customer-algorithm`
|
|
1361
|
+
#
|
|
1362
|
+
# * `x-amz-server-side-encryption-customer-key`
|
|
1363
|
+
#
|
|
1364
|
+
# * `x-amz-server-side-encryption-customer-key-MD5`
|
|
1365
|
+
#
|
|
1366
|
+
# For more information about SSE-C, see [Server-Side Encryption (Using
|
|
1367
|
+
# Customer-Provided Encryption Keys)][1] in the *Amazon S3 User Guide*.
|
|
1368
|
+
#
|
|
1369
|
+
# <note markdown="1"> This functionality is not supported for directory buckets.
|
|
1370
|
+
#
|
|
1371
|
+
# </note>
|
|
1372
|
+
#
|
|
1373
|
+
#
|
|
1374
|
+
#
|
|
1375
|
+
# [1]: https://docs.aws.amazon.com/AmazonS3/latest/dev/ServerSideEncryptionCustomerKeys.html
|
|
682
1376
|
# @option options [String] :sse_customer_key
|
|
683
|
-
# Specifies the customer-provided encryption key
|
|
684
|
-
#
|
|
685
|
-
#
|
|
686
|
-
#
|
|
1377
|
+
# Specifies the customer-provided encryption key that you originally
|
|
1378
|
+
# provided for Amazon S3 to encrypt the data before storing it. This
|
|
1379
|
+
# value is used to decrypt the object when recovering it and must match
|
|
1380
|
+
# the one used when storing the data. The key must be appropriate for
|
|
1381
|
+
# use with the algorithm specified in the
|
|
687
1382
|
# `x-amz-server-side-encryption-customer-algorithm` header.
|
|
1383
|
+
#
|
|
1384
|
+
# If you encrypt an object by using server-side encryption with
|
|
1385
|
+
# customer-provided encryption keys (SSE-C) when you store the object in
|
|
1386
|
+
# Amazon S3, then when you GET the object, you must use the following
|
|
1387
|
+
# headers:
|
|
1388
|
+
#
|
|
1389
|
+
# * `x-amz-server-side-encryption-customer-algorithm`
|
|
1390
|
+
#
|
|
1391
|
+
# * `x-amz-server-side-encryption-customer-key`
|
|
1392
|
+
#
|
|
1393
|
+
# * `x-amz-server-side-encryption-customer-key-MD5`
|
|
1394
|
+
#
|
|
1395
|
+
# For more information about SSE-C, see [Server-Side Encryption (Using
|
|
1396
|
+
# Customer-Provided Encryption Keys)][1] in the *Amazon S3 User Guide*.
|
|
1397
|
+
#
|
|
1398
|
+
# <note markdown="1"> This functionality is not supported for directory buckets.
|
|
1399
|
+
#
|
|
1400
|
+
# </note>
|
|
1401
|
+
#
|
|
1402
|
+
#
|
|
1403
|
+
#
|
|
1404
|
+
# [1]: https://docs.aws.amazon.com/AmazonS3/latest/dev/ServerSideEncryptionCustomerKeys.html
|
|
688
1405
|
# @option options [String] :sse_customer_key_md5
|
|
689
|
-
# Specifies the 128-bit MD5 digest of the encryption
|
|
690
|
-
# RFC 1321. Amazon S3 uses this header for a message
|
|
691
|
-
# ensure that the encryption key was transmitted
|
|
1406
|
+
# Specifies the 128-bit MD5 digest of the customer-provided encryption
|
|
1407
|
+
# key according to RFC 1321. Amazon S3 uses this header for a message
|
|
1408
|
+
# integrity check to ensure that the encryption key was transmitted
|
|
1409
|
+
# without error.
|
|
1410
|
+
#
|
|
1411
|
+
# If you encrypt an object by using server-side encryption with
|
|
1412
|
+
# customer-provided encryption keys (SSE-C) when you store the object in
|
|
1413
|
+
# Amazon S3, then when you GET the object, you must use the following
|
|
1414
|
+
# headers:
|
|
1415
|
+
#
|
|
1416
|
+
# * `x-amz-server-side-encryption-customer-algorithm`
|
|
1417
|
+
#
|
|
1418
|
+
# * `x-amz-server-side-encryption-customer-key`
|
|
1419
|
+
#
|
|
1420
|
+
# * `x-amz-server-side-encryption-customer-key-MD5`
|
|
1421
|
+
#
|
|
1422
|
+
# For more information about SSE-C, see [Server-Side Encryption (Using
|
|
1423
|
+
# Customer-Provided Encryption Keys)][1] in the *Amazon S3 User Guide*.
|
|
1424
|
+
#
|
|
1425
|
+
# <note markdown="1"> This functionality is not supported for directory buckets.
|
|
1426
|
+
#
|
|
1427
|
+
# </note>
|
|
1428
|
+
#
|
|
1429
|
+
#
|
|
1430
|
+
#
|
|
1431
|
+
# [1]: https://docs.aws.amazon.com/AmazonS3/latest/dev/ServerSideEncryptionCustomerKeys.html
|
|
692
1432
|
# @option options [String] :request_payer
|
|
693
1433
|
# Confirms that the requester knows that they will be charged for the
|
|
694
1434
|
# request. Bucket owners need not specify this parameter in their
|
|
695
|
-
# requests. If either the source or destination
|
|
696
|
-
#
|
|
697
|
-
#
|
|
698
|
-
#
|
|
699
|
-
#
|
|
1435
|
+
# requests. If either the source or destination S3 bucket has Requester
|
|
1436
|
+
# Pays enabled, the requester will pay for corresponding charges to copy
|
|
1437
|
+
# the object. For information about downloading objects from Requester
|
|
1438
|
+
# Pays buckets, see [Downloading Objects in Requester Pays Buckets][1]
|
|
1439
|
+
# in the *Amazon S3 User Guide*.
|
|
1440
|
+
#
|
|
1441
|
+
# <note markdown="1"> This functionality is not supported for directory buckets.
|
|
1442
|
+
#
|
|
1443
|
+
# </note>
|
|
700
1444
|
#
|
|
701
1445
|
#
|
|
702
1446
|
#
|
|
@@ -707,9 +1451,9 @@ module Aws::S3
|
|
|
707
1451
|
# for the part specified. Useful for downloading just a part of an
|
|
708
1452
|
# object.
|
|
709
1453
|
# @option options [String] :expected_bucket_owner
|
|
710
|
-
# The account ID of the expected bucket owner. If the
|
|
711
|
-
#
|
|
712
|
-
# Forbidden` (access denied).
|
|
1454
|
+
# The account ID of the expected bucket owner. If the account ID that
|
|
1455
|
+
# you provide does not match the actual owner of the bucket, the request
|
|
1456
|
+
# fails with the HTTP status code `403 Forbidden` (access denied).
|
|
713
1457
|
# @option options [String] :checksum_mode
|
|
714
1458
|
# To retrieve the checksum, this mode must be enabled.
|
|
715
1459
|
# @return [Types::GetObjectOutput]
|
|
@@ -718,7 +1462,7 @@ module Aws::S3
|
|
|
718
1462
|
bucket: @bucket_name,
|
|
719
1463
|
key: @key
|
|
720
1464
|
)
|
|
721
|
-
resp = Aws::Plugins::UserAgent.
|
|
1465
|
+
resp = Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
|
|
722
1466
|
@client.get_object(options, &block)
|
|
723
1467
|
end
|
|
724
1468
|
resp.data
|
|
@@ -741,8 +1485,8 @@ module Aws::S3
|
|
|
741
1485
|
# metadata: {
|
|
742
1486
|
# "MetadataKey" => "MetadataValue",
|
|
743
1487
|
# },
|
|
744
|
-
# server_side_encryption: "AES256", # accepts AES256, aws:kms, aws:kms:dsse
|
|
745
|
-
# storage_class: "STANDARD", # accepts STANDARD, REDUCED_REDUNDANCY, STANDARD_IA, ONEZONE_IA, INTELLIGENT_TIERING, GLACIER, DEEP_ARCHIVE, OUTPOSTS, GLACIER_IR, SNOW
|
|
1488
|
+
# server_side_encryption: "AES256", # accepts AES256, aws:fsx, aws:kms, aws:kms:dsse
|
|
1489
|
+
# 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
|
|
746
1490
|
# website_redirect_location: "WebsiteRedirectLocation",
|
|
747
1491
|
# sse_customer_algorithm: "SSECustomerAlgorithm",
|
|
748
1492
|
# sse_customer_key: "SSECustomerKey",
|
|
@@ -756,13 +1500,34 @@ module Aws::S3
|
|
|
756
1500
|
# object_lock_retain_until_date: Time.now,
|
|
757
1501
|
# object_lock_legal_hold_status: "ON", # accepts ON, OFF
|
|
758
1502
|
# expected_bucket_owner: "AccountId",
|
|
759
|
-
# checksum_algorithm: "CRC32", # accepts CRC32, CRC32C, SHA1, SHA256
|
|
1503
|
+
# checksum_algorithm: "CRC32", # accepts CRC32, CRC32C, SHA1, SHA256, CRC64NVME
|
|
1504
|
+
# checksum_type: "COMPOSITE", # accepts COMPOSITE, FULL_OBJECT
|
|
760
1505
|
# })
|
|
761
1506
|
# @param [Hash] options ({})
|
|
762
1507
|
# @option options [String] :acl
|
|
763
|
-
# The canned ACL to apply to the object.
|
|
1508
|
+
# The canned ACL to apply to the object. Amazon S3 supports a set of
|
|
1509
|
+
# predefined ACLs, known as *canned ACLs*. Each canned ACL has a
|
|
1510
|
+
# predefined set of grantees and permissions. For more information, see
|
|
1511
|
+
# [Canned ACL][1] in the *Amazon S3 User Guide*.
|
|
764
1512
|
#
|
|
765
|
-
#
|
|
1513
|
+
# By default, all objects are private. Only the owner has full access
|
|
1514
|
+
# control. When uploading an object, you can grant access permissions to
|
|
1515
|
+
# individual Amazon Web Services accounts or to predefined groups
|
|
1516
|
+
# defined by Amazon S3. These permissions are then added to the access
|
|
1517
|
+
# control list (ACL) on the new object. For more information, see [Using
|
|
1518
|
+
# ACLs][2]. One way to grant the permissions using the request headers
|
|
1519
|
+
# is to specify a canned ACL with the `x-amz-acl` request header.
|
|
1520
|
+
#
|
|
1521
|
+
# <note markdown="1"> * This functionality is not supported for directory buckets.
|
|
1522
|
+
#
|
|
1523
|
+
# * This functionality is not supported for Amazon S3 on Outposts.
|
|
1524
|
+
#
|
|
1525
|
+
# </note>
|
|
1526
|
+
#
|
|
1527
|
+
#
|
|
1528
|
+
#
|
|
1529
|
+
# [1]: https://docs.aws.amazon.com/AmazonS3/latest/dev/acl-overview.html#CannedACL
|
|
1530
|
+
# [2]: https://docs.aws.amazon.com/AmazonS3/latest/dev/S3_ACLs_UsingACLs.html
|
|
766
1531
|
# @option options [String] :cache_control
|
|
767
1532
|
# Specifies caching behavior along the request/reply chain.
|
|
768
1533
|
# @option options [String] :content_disposition
|
|
@@ -771,41 +1536,343 @@ module Aws::S3
|
|
|
771
1536
|
# Specifies what content encodings have been applied to the object and
|
|
772
1537
|
# thus what decoding mechanisms must be applied to obtain the media-type
|
|
773
1538
|
# referenced by the Content-Type header field.
|
|
1539
|
+
#
|
|
1540
|
+
# <note markdown="1"> For directory buckets, only the `aws-chunked` value is supported in
|
|
1541
|
+
# this header field.
|
|
1542
|
+
#
|
|
1543
|
+
# </note>
|
|
774
1544
|
# @option options [String] :content_language
|
|
775
|
-
# The language the content is in.
|
|
1545
|
+
# The language that the content is in.
|
|
776
1546
|
# @option options [String] :content_type
|
|
777
1547
|
# A standard MIME type describing the format of the object data.
|
|
778
1548
|
# @option options [Time,DateTime,Date,Integer,String] :expires
|
|
779
1549
|
# The date and time at which the object is no longer cacheable.
|
|
780
1550
|
# @option options [String] :grant_full_control
|
|
781
|
-
#
|
|
782
|
-
# object.
|
|
1551
|
+
# Specify access permissions explicitly to give the grantee READ,
|
|
1552
|
+
# READ\_ACP, and WRITE\_ACP permissions on the object.
|
|
1553
|
+
#
|
|
1554
|
+
# By default, all objects are private. Only the owner has full access
|
|
1555
|
+
# control. When uploading an object, you can use this header to
|
|
1556
|
+
# explicitly grant access permissions to specific Amazon Web Services
|
|
1557
|
+
# accounts or groups. This header maps to specific permissions that
|
|
1558
|
+
# Amazon S3 supports in an ACL. For more information, see [Access
|
|
1559
|
+
# Control List (ACL) Overview][1] in the *Amazon S3 User Guide*.
|
|
1560
|
+
#
|
|
1561
|
+
# You specify each grantee as a type=value pair, where the type is one
|
|
1562
|
+
# of the following:
|
|
1563
|
+
#
|
|
1564
|
+
# * `id` – if the value specified is the canonical user ID of an Amazon
|
|
1565
|
+
# Web Services account
|
|
1566
|
+
#
|
|
1567
|
+
# * `uri` – if you are granting permissions to a predefined group
|
|
1568
|
+
#
|
|
1569
|
+
# * `emailAddress` – if the value specified is the email address of an
|
|
1570
|
+
# Amazon Web Services account
|
|
1571
|
+
#
|
|
1572
|
+
# <note markdown="1"> Using email addresses to specify a grantee is only supported in the
|
|
1573
|
+
# following Amazon Web Services Regions:
|
|
1574
|
+
#
|
|
1575
|
+
# * US East (N. Virginia)
|
|
1576
|
+
#
|
|
1577
|
+
# * US West (N. California)
|
|
1578
|
+
#
|
|
1579
|
+
# * US West (Oregon)
|
|
1580
|
+
#
|
|
1581
|
+
# * Asia Pacific (Singapore)
|
|
1582
|
+
#
|
|
1583
|
+
# * Asia Pacific (Sydney)
|
|
1584
|
+
#
|
|
1585
|
+
# * Asia Pacific (Tokyo)
|
|
1586
|
+
#
|
|
1587
|
+
# * Europe (Ireland)
|
|
1588
|
+
#
|
|
1589
|
+
# * South America (São Paulo)
|
|
1590
|
+
#
|
|
1591
|
+
# For a list of all the Amazon S3 supported Regions and endpoints, see
|
|
1592
|
+
# [Regions and Endpoints][2] in the Amazon Web Services General
|
|
1593
|
+
# Reference.
|
|
1594
|
+
#
|
|
1595
|
+
# </note>
|
|
1596
|
+
#
|
|
1597
|
+
# For example, the following `x-amz-grant-read` header grants the Amazon
|
|
1598
|
+
# Web Services accounts identified by account IDs permissions to read
|
|
1599
|
+
# object data and its metadata:
|
|
1600
|
+
#
|
|
1601
|
+
# `x-amz-grant-read: id="11112222333", id="444455556666" `
|
|
1602
|
+
#
|
|
1603
|
+
# <note markdown="1"> * This functionality is not supported for directory buckets.
|
|
1604
|
+
#
|
|
1605
|
+
# * This functionality is not supported for Amazon S3 on Outposts.
|
|
1606
|
+
#
|
|
1607
|
+
# </note>
|
|
1608
|
+
#
|
|
1609
|
+
#
|
|
1610
|
+
#
|
|
1611
|
+
# [1]: https://docs.aws.amazon.com/AmazonS3/latest/dev/acl-overview.html
|
|
1612
|
+
# [2]: https://docs.aws.amazon.com/general/latest/gr/rande.html#s3_region
|
|
1613
|
+
# @option options [String] :grant_read
|
|
1614
|
+
# Specify access permissions explicitly to allow grantee to read the
|
|
1615
|
+
# object data and its metadata.
|
|
1616
|
+
#
|
|
1617
|
+
# By default, all objects are private. Only the owner has full access
|
|
1618
|
+
# control. When uploading an object, you can use this header to
|
|
1619
|
+
# explicitly grant access permissions to specific Amazon Web Services
|
|
1620
|
+
# accounts or groups. This header maps to specific permissions that
|
|
1621
|
+
# Amazon S3 supports in an ACL. For more information, see [Access
|
|
1622
|
+
# Control List (ACL) Overview][1] in the *Amazon S3 User Guide*.
|
|
1623
|
+
#
|
|
1624
|
+
# You specify each grantee as a type=value pair, where the type is one
|
|
1625
|
+
# of the following:
|
|
1626
|
+
#
|
|
1627
|
+
# * `id` – if the value specified is the canonical user ID of an Amazon
|
|
1628
|
+
# Web Services account
|
|
1629
|
+
#
|
|
1630
|
+
# * `uri` – if you are granting permissions to a predefined group
|
|
1631
|
+
#
|
|
1632
|
+
# * `emailAddress` – if the value specified is the email address of an
|
|
1633
|
+
# Amazon Web Services account
|
|
1634
|
+
#
|
|
1635
|
+
# <note markdown="1"> Using email addresses to specify a grantee is only supported in the
|
|
1636
|
+
# following Amazon Web Services Regions:
|
|
1637
|
+
#
|
|
1638
|
+
# * US East (N. Virginia)
|
|
1639
|
+
#
|
|
1640
|
+
# * US West (N. California)
|
|
1641
|
+
#
|
|
1642
|
+
# * US West (Oregon)
|
|
1643
|
+
#
|
|
1644
|
+
# * Asia Pacific (Singapore)
|
|
1645
|
+
#
|
|
1646
|
+
# * Asia Pacific (Sydney)
|
|
1647
|
+
#
|
|
1648
|
+
# * Asia Pacific (Tokyo)
|
|
1649
|
+
#
|
|
1650
|
+
# * Europe (Ireland)
|
|
1651
|
+
#
|
|
1652
|
+
# * South America (São Paulo)
|
|
1653
|
+
#
|
|
1654
|
+
# For a list of all the Amazon S3 supported Regions and endpoints, see
|
|
1655
|
+
# [Regions and Endpoints][2] in the Amazon Web Services General
|
|
1656
|
+
# Reference.
|
|
1657
|
+
#
|
|
1658
|
+
# </note>
|
|
1659
|
+
#
|
|
1660
|
+
# For example, the following `x-amz-grant-read` header grants the Amazon
|
|
1661
|
+
# Web Services accounts identified by account IDs permissions to read
|
|
1662
|
+
# object data and its metadata:
|
|
1663
|
+
#
|
|
1664
|
+
# `x-amz-grant-read: id="11112222333", id="444455556666" `
|
|
1665
|
+
#
|
|
1666
|
+
# <note markdown="1"> * This functionality is not supported for directory buckets.
|
|
1667
|
+
#
|
|
1668
|
+
# * This functionality is not supported for Amazon S3 on Outposts.
|
|
1669
|
+
#
|
|
1670
|
+
# </note>
|
|
783
1671
|
#
|
|
784
|
-
# This action is not supported by Amazon S3 on Outposts.
|
|
785
|
-
# @option options [String] :grant_read
|
|
786
|
-
# Allows grantee to read the object data and its metadata.
|
|
787
1672
|
#
|
|
788
|
-
#
|
|
1673
|
+
#
|
|
1674
|
+
# [1]: https://docs.aws.amazon.com/AmazonS3/latest/dev/acl-overview.html
|
|
1675
|
+
# [2]: https://docs.aws.amazon.com/general/latest/gr/rande.html#s3_region
|
|
789
1676
|
# @option options [String] :grant_read_acp
|
|
790
|
-
#
|
|
1677
|
+
# Specify access permissions explicitly to allows grantee to read the
|
|
1678
|
+
# object ACL.
|
|
1679
|
+
#
|
|
1680
|
+
# By default, all objects are private. Only the owner has full access
|
|
1681
|
+
# control. When uploading an object, you can use this header to
|
|
1682
|
+
# explicitly grant access permissions to specific Amazon Web Services
|
|
1683
|
+
# accounts or groups. This header maps to specific permissions that
|
|
1684
|
+
# Amazon S3 supports in an ACL. For more information, see [Access
|
|
1685
|
+
# Control List (ACL) Overview][1] in the *Amazon S3 User Guide*.
|
|
1686
|
+
#
|
|
1687
|
+
# You specify each grantee as a type=value pair, where the type is one
|
|
1688
|
+
# of the following:
|
|
1689
|
+
#
|
|
1690
|
+
# * `id` – if the value specified is the canonical user ID of an Amazon
|
|
1691
|
+
# Web Services account
|
|
1692
|
+
#
|
|
1693
|
+
# * `uri` – if you are granting permissions to a predefined group
|
|
1694
|
+
#
|
|
1695
|
+
# * `emailAddress` – if the value specified is the email address of an
|
|
1696
|
+
# Amazon Web Services account
|
|
1697
|
+
#
|
|
1698
|
+
# <note markdown="1"> Using email addresses to specify a grantee is only supported in the
|
|
1699
|
+
# following Amazon Web Services Regions:
|
|
1700
|
+
#
|
|
1701
|
+
# * US East (N. Virginia)
|
|
1702
|
+
#
|
|
1703
|
+
# * US West (N. California)
|
|
1704
|
+
#
|
|
1705
|
+
# * US West (Oregon)
|
|
1706
|
+
#
|
|
1707
|
+
# * Asia Pacific (Singapore)
|
|
1708
|
+
#
|
|
1709
|
+
# * Asia Pacific (Sydney)
|
|
1710
|
+
#
|
|
1711
|
+
# * Asia Pacific (Tokyo)
|
|
791
1712
|
#
|
|
792
|
-
#
|
|
1713
|
+
# * Europe (Ireland)
|
|
1714
|
+
#
|
|
1715
|
+
# * South America (São Paulo)
|
|
1716
|
+
#
|
|
1717
|
+
# For a list of all the Amazon S3 supported Regions and endpoints, see
|
|
1718
|
+
# [Regions and Endpoints][2] in the Amazon Web Services General
|
|
1719
|
+
# Reference.
|
|
1720
|
+
#
|
|
1721
|
+
# </note>
|
|
1722
|
+
#
|
|
1723
|
+
# For example, the following `x-amz-grant-read` header grants the Amazon
|
|
1724
|
+
# Web Services accounts identified by account IDs permissions to read
|
|
1725
|
+
# object data and its metadata:
|
|
1726
|
+
#
|
|
1727
|
+
# `x-amz-grant-read: id="11112222333", id="444455556666" `
|
|
1728
|
+
#
|
|
1729
|
+
# <note markdown="1"> * This functionality is not supported for directory buckets.
|
|
1730
|
+
#
|
|
1731
|
+
# * This functionality is not supported for Amazon S3 on Outposts.
|
|
1732
|
+
#
|
|
1733
|
+
# </note>
|
|
1734
|
+
#
|
|
1735
|
+
#
|
|
1736
|
+
#
|
|
1737
|
+
# [1]: https://docs.aws.amazon.com/AmazonS3/latest/dev/acl-overview.html
|
|
1738
|
+
# [2]: https://docs.aws.amazon.com/general/latest/gr/rande.html#s3_region
|
|
793
1739
|
# @option options [String] :grant_write_acp
|
|
794
|
-
#
|
|
1740
|
+
# Specify access permissions explicitly to allows grantee to allow
|
|
1741
|
+
# grantee to write the ACL for the applicable object.
|
|
1742
|
+
#
|
|
1743
|
+
# By default, all objects are private. Only the owner has full access
|
|
1744
|
+
# control. When uploading an object, you can use this header to
|
|
1745
|
+
# explicitly grant access permissions to specific Amazon Web Services
|
|
1746
|
+
# accounts or groups. This header maps to specific permissions that
|
|
1747
|
+
# Amazon S3 supports in an ACL. For more information, see [Access
|
|
1748
|
+
# Control List (ACL) Overview][1] in the *Amazon S3 User Guide*.
|
|
1749
|
+
#
|
|
1750
|
+
# You specify each grantee as a type=value pair, where the type is one
|
|
1751
|
+
# of the following:
|
|
795
1752
|
#
|
|
796
|
-
#
|
|
1753
|
+
# * `id` – if the value specified is the canonical user ID of an Amazon
|
|
1754
|
+
# Web Services account
|
|
1755
|
+
#
|
|
1756
|
+
# * `uri` – if you are granting permissions to a predefined group
|
|
1757
|
+
#
|
|
1758
|
+
# * `emailAddress` – if the value specified is the email address of an
|
|
1759
|
+
# Amazon Web Services account
|
|
1760
|
+
#
|
|
1761
|
+
# <note markdown="1"> Using email addresses to specify a grantee is only supported in the
|
|
1762
|
+
# following Amazon Web Services Regions:
|
|
1763
|
+
#
|
|
1764
|
+
# * US East (N. Virginia)
|
|
1765
|
+
#
|
|
1766
|
+
# * US West (N. California)
|
|
1767
|
+
#
|
|
1768
|
+
# * US West (Oregon)
|
|
1769
|
+
#
|
|
1770
|
+
# * Asia Pacific (Singapore)
|
|
1771
|
+
#
|
|
1772
|
+
# * Asia Pacific (Sydney)
|
|
1773
|
+
#
|
|
1774
|
+
# * Asia Pacific (Tokyo)
|
|
1775
|
+
#
|
|
1776
|
+
# * Europe (Ireland)
|
|
1777
|
+
#
|
|
1778
|
+
# * South America (São Paulo)
|
|
1779
|
+
#
|
|
1780
|
+
# For a list of all the Amazon S3 supported Regions and endpoints, see
|
|
1781
|
+
# [Regions and Endpoints][2] in the Amazon Web Services General
|
|
1782
|
+
# Reference.
|
|
1783
|
+
#
|
|
1784
|
+
# </note>
|
|
1785
|
+
#
|
|
1786
|
+
# For example, the following `x-amz-grant-read` header grants the Amazon
|
|
1787
|
+
# Web Services accounts identified by account IDs permissions to read
|
|
1788
|
+
# object data and its metadata:
|
|
1789
|
+
#
|
|
1790
|
+
# `x-amz-grant-read: id="11112222333", id="444455556666" `
|
|
1791
|
+
#
|
|
1792
|
+
# <note markdown="1"> * This functionality is not supported for directory buckets.
|
|
1793
|
+
#
|
|
1794
|
+
# * This functionality is not supported for Amazon S3 on Outposts.
|
|
1795
|
+
#
|
|
1796
|
+
# </note>
|
|
1797
|
+
#
|
|
1798
|
+
#
|
|
1799
|
+
#
|
|
1800
|
+
# [1]: https://docs.aws.amazon.com/AmazonS3/latest/dev/acl-overview.html
|
|
1801
|
+
# [2]: https://docs.aws.amazon.com/general/latest/gr/rande.html#s3_region
|
|
797
1802
|
# @option options [Hash<String,String>] :metadata
|
|
798
1803
|
# A map of metadata to store with the object in S3.
|
|
799
1804
|
# @option options [String] :server_side_encryption
|
|
800
|
-
# The server-side encryption algorithm used when
|
|
801
|
-
# Amazon S3
|
|
1805
|
+
# The server-side encryption algorithm used when you store this object
|
|
1806
|
+
# in Amazon S3 or Amazon FSx.
|
|
1807
|
+
#
|
|
1808
|
+
# * <b>Directory buckets </b> - For directory buckets, there are only
|
|
1809
|
+
# two supported options for server-side encryption: server-side
|
|
1810
|
+
# encryption with Amazon S3 managed keys (SSE-S3) (`AES256`) and
|
|
1811
|
+
# server-side encryption with KMS keys (SSE-KMS) (`aws:kms`). We
|
|
1812
|
+
# recommend that the bucket's default encryption uses the desired
|
|
1813
|
+
# encryption configuration and you don't override the bucket default
|
|
1814
|
+
# encryption in your `CreateSession` requests or `PUT` object
|
|
1815
|
+
# requests. Then, new objects are automatically encrypted with the
|
|
1816
|
+
# desired encryption settings. For more information, see [Protecting
|
|
1817
|
+
# data with server-side encryption][1] in the *Amazon S3 User Guide*.
|
|
1818
|
+
# For more information about the encryption overriding behaviors in
|
|
1819
|
+
# directory buckets, see [Specifying server-side encryption with KMS
|
|
1820
|
+
# for new object uploads][2].
|
|
1821
|
+
#
|
|
1822
|
+
# In the Zonal endpoint API calls (except [CopyObject][3] and
|
|
1823
|
+
# [UploadPartCopy][4]) using the REST API, the encryption request
|
|
1824
|
+
# headers must match the encryption settings that are specified in the
|
|
1825
|
+
# `CreateSession` request. You can't override the values of the
|
|
1826
|
+
# encryption settings (`x-amz-server-side-encryption`,
|
|
1827
|
+
# `x-amz-server-side-encryption-aws-kms-key-id`,
|
|
1828
|
+
# `x-amz-server-side-encryption-context`, and
|
|
1829
|
+
# `x-amz-server-side-encryption-bucket-key-enabled`) that are
|
|
1830
|
+
# specified in the `CreateSession` request. You don't need to
|
|
1831
|
+
# explicitly specify these encryption settings values in Zonal
|
|
1832
|
+
# endpoint API calls, and Amazon S3 will use the encryption settings
|
|
1833
|
+
# values from the `CreateSession` request to protect new objects in
|
|
1834
|
+
# the directory bucket.
|
|
1835
|
+
#
|
|
1836
|
+
# <note markdown="1"> When you use the CLI or the Amazon Web Services SDKs, for
|
|
1837
|
+
# `CreateSession`, the session token refreshes automatically to avoid
|
|
1838
|
+
# service interruptions when a session expires. The CLI or the Amazon
|
|
1839
|
+
# Web Services SDKs use the bucket's default encryption configuration
|
|
1840
|
+
# for the `CreateSession` request. It's not supported to override the
|
|
1841
|
+
# encryption settings values in the `CreateSession` request. So in the
|
|
1842
|
+
# Zonal endpoint API calls (except [CopyObject][3] and
|
|
1843
|
+
# [UploadPartCopy][4]), the encryption request headers must match the
|
|
1844
|
+
# default encryption configuration of the directory bucket.
|
|
1845
|
+
#
|
|
1846
|
+
# </note>
|
|
1847
|
+
#
|
|
1848
|
+
# * <b>S3 access points for Amazon FSx </b> - When accessing data stored
|
|
1849
|
+
# in Amazon FSx file systems using S3 access points, the only valid
|
|
1850
|
+
# server side encryption option is `aws:fsx`. All Amazon FSx file
|
|
1851
|
+
# systems have encryption configured by default and are encrypted at
|
|
1852
|
+
# rest. Data is automatically encrypted before being written to the
|
|
1853
|
+
# file system, and automatically decrypted as it is read. These
|
|
1854
|
+
# processes are handled transparently by Amazon FSx.
|
|
1855
|
+
#
|
|
1856
|
+
#
|
|
1857
|
+
#
|
|
1858
|
+
# [1]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-express-serv-side-encryption.html
|
|
1859
|
+
# [2]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-express-specifying-kms-encryption.html
|
|
1860
|
+
# [3]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_CopyObject.html
|
|
1861
|
+
# [4]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_UploadPartCopy.html
|
|
802
1862
|
# @option options [String] :storage_class
|
|
803
1863
|
# By default, Amazon S3 uses the STANDARD Storage Class to store newly
|
|
804
1864
|
# created objects. The STANDARD storage class provides high durability
|
|
805
1865
|
# and high availability. Depending on performance needs, you can specify
|
|
806
|
-
# a different Storage Class.
|
|
807
|
-
#
|
|
808
|
-
#
|
|
1866
|
+
# a different Storage Class. For more information, see [Storage
|
|
1867
|
+
# Classes][1] in the *Amazon S3 User Guide*.
|
|
1868
|
+
#
|
|
1869
|
+
# <note markdown="1"> * Directory buckets only support `EXPRESS_ONEZONE` (the S3 Express One
|
|
1870
|
+
# Zone storage class) in Availability Zones and `ONEZONE_IA` (the S3
|
|
1871
|
+
# One Zone-Infrequent Access storage class) in Dedicated Local Zones.
|
|
1872
|
+
#
|
|
1873
|
+
# * Amazon S3 on Outposts only uses the OUTPOSTS Storage Class.
|
|
1874
|
+
#
|
|
1875
|
+
# </note>
|
|
809
1876
|
#
|
|
810
1877
|
#
|
|
811
1878
|
#
|
|
@@ -814,51 +1881,114 @@ module Aws::S3
|
|
|
814
1881
|
# If the bucket is configured as a website, redirects requests for this
|
|
815
1882
|
# object to another object in the same bucket or to an external URL.
|
|
816
1883
|
# Amazon S3 stores the value of this header in the object metadata.
|
|
1884
|
+
#
|
|
1885
|
+
# <note markdown="1"> This functionality is not supported for directory buckets.
|
|
1886
|
+
#
|
|
1887
|
+
# </note>
|
|
817
1888
|
# @option options [String] :sse_customer_algorithm
|
|
818
|
-
# Specifies the algorithm to use
|
|
1889
|
+
# Specifies the algorithm to use when encrypting the object (for
|
|
819
1890
|
# example, AES256).
|
|
1891
|
+
#
|
|
1892
|
+
# <note markdown="1"> This functionality is not supported for directory buckets.
|
|
1893
|
+
#
|
|
1894
|
+
# </note>
|
|
820
1895
|
# @option options [String] :sse_customer_key
|
|
821
1896
|
# Specifies the customer-provided encryption key for Amazon S3 to use in
|
|
822
1897
|
# encrypting data. This value is used to store the object and then it is
|
|
823
1898
|
# discarded; Amazon S3 does not store the encryption key. The key must
|
|
824
1899
|
# be appropriate for use with the algorithm specified in the
|
|
825
1900
|
# `x-amz-server-side-encryption-customer-algorithm` header.
|
|
826
|
-
# @option options [String] :sse_customer_key_md5
|
|
827
|
-
# Specifies the 128-bit MD5 digest of the encryption key according to
|
|
828
|
-
# RFC 1321. Amazon S3 uses this header for a message integrity check to
|
|
829
|
-
# ensure that the encryption key was transmitted without error.
|
|
830
|
-
# @option options [String] :ssekms_key_id
|
|
831
|
-
# Specifies the ID (Key ID, Key ARN, or Key Alias) of the symmetric
|
|
832
|
-
# encryption customer managed key to use for object encryption. All GET
|
|
833
|
-
# and PUT requests for an object protected by KMS will fail if they're
|
|
834
|
-
# not made via SSL or using SigV4. For information about configuring any
|
|
835
|
-
# of the officially supported Amazon Web Services SDKs and Amazon Web
|
|
836
|
-
# Services CLI, see [Specifying the Signature Version in Request
|
|
837
|
-
# Authentication][1] in the *Amazon S3 User Guide*.
|
|
838
1901
|
#
|
|
1902
|
+
# <note markdown="1"> This functionality is not supported for directory buckets.
|
|
1903
|
+
#
|
|
1904
|
+
# </note>
|
|
1905
|
+
# @option options [String] :sse_customer_key_md5
|
|
1906
|
+
# Specifies the 128-bit MD5 digest of the customer-provided encryption
|
|
1907
|
+
# key according to RFC 1321. Amazon S3 uses this header for a message
|
|
1908
|
+
# integrity check to ensure that the encryption key was transmitted
|
|
1909
|
+
# without error.
|
|
839
1910
|
#
|
|
1911
|
+
# <note markdown="1"> This functionality is not supported for directory buckets.
|
|
840
1912
|
#
|
|
841
|
-
#
|
|
1913
|
+
# </note>
|
|
1914
|
+
# @option options [String] :ssekms_key_id
|
|
1915
|
+
# Specifies the KMS key ID (Key ID, Key ARN, or Key Alias) to use for
|
|
1916
|
+
# object encryption. If the KMS key doesn't exist in the same account
|
|
1917
|
+
# that's issuing the command, you must use the full Key ARN not the Key
|
|
1918
|
+
# ID.
|
|
1919
|
+
#
|
|
1920
|
+
# **General purpose buckets** - If you specify
|
|
1921
|
+
# `x-amz-server-side-encryption` with `aws:kms` or `aws:kms:dsse`, this
|
|
1922
|
+
# header specifies the ID (Key ID, Key ARN, or Key Alias) of the KMS key
|
|
1923
|
+
# to use. If you specify `x-amz-server-side-encryption:aws:kms` or
|
|
1924
|
+
# `x-amz-server-side-encryption:aws:kms:dsse`, but do not provide
|
|
1925
|
+
# `x-amz-server-side-encryption-aws-kms-key-id`, Amazon S3 uses the
|
|
1926
|
+
# Amazon Web Services managed key (`aws/s3`) to protect the data.
|
|
1927
|
+
#
|
|
1928
|
+
# **Directory buckets** - To encrypt data using SSE-KMS, it's
|
|
1929
|
+
# recommended to specify the `x-amz-server-side-encryption` header to
|
|
1930
|
+
# `aws:kms`. Then, the `x-amz-server-side-encryption-aws-kms-key-id`
|
|
1931
|
+
# header implicitly uses the bucket's default KMS customer managed key
|
|
1932
|
+
# ID. If you want to explicitly set the `
|
|
1933
|
+
# x-amz-server-side-encryption-aws-kms-key-id` header, it must match the
|
|
1934
|
+
# bucket's default customer managed key (using key ID or ARN, not
|
|
1935
|
+
# alias). Your SSE-KMS configuration can only support 1 [customer
|
|
1936
|
+
# managed key][1] per directory bucket's lifetime. The [Amazon Web
|
|
1937
|
+
# Services managed key][2] (`aws/s3`) isn't supported. Incorrect key
|
|
1938
|
+
# specification results in an HTTP `400 Bad Request` error.
|
|
1939
|
+
#
|
|
1940
|
+
#
|
|
1941
|
+
#
|
|
1942
|
+
# [1]: https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#customer-cmk
|
|
1943
|
+
# [2]: https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#aws-managed-cmk
|
|
842
1944
|
# @option options [String] :ssekms_encryption_context
|
|
843
1945
|
# Specifies the Amazon Web Services KMS Encryption Context to use for
|
|
844
|
-
# object encryption. The value of this header is a
|
|
845
|
-
#
|
|
1946
|
+
# object encryption. The value of this header is a Base64 encoded string
|
|
1947
|
+
# of a UTF-8 encoded JSON, which contains the encryption context as
|
|
1948
|
+
# key-value pairs.
|
|
1949
|
+
#
|
|
1950
|
+
# **Directory buckets** - You can optionally provide an explicit
|
|
1951
|
+
# encryption context value. The value must match the default encryption
|
|
1952
|
+
# context - the bucket Amazon Resource Name (ARN). An additional
|
|
1953
|
+
# encryption context value is not supported.
|
|
846
1954
|
# @option options [Boolean] :bucket_key_enabled
|
|
847
1955
|
# Specifies whether Amazon S3 should use an S3 Bucket Key for object
|
|
848
1956
|
# encryption with server-side encryption using Key Management Service
|
|
849
|
-
# (KMS) keys (SSE-KMS).
|
|
850
|
-
# to use an S3 Bucket Key for object encryption with SSE-KMS.
|
|
1957
|
+
# (KMS) keys (SSE-KMS).
|
|
851
1958
|
#
|
|
852
|
-
#
|
|
1959
|
+
# **General purpose buckets** - Setting this header to `true` causes
|
|
1960
|
+
# Amazon S3 to use an S3 Bucket Key for object encryption with SSE-KMS.
|
|
1961
|
+
# Also, specifying this header with a PUT action doesn't affect
|
|
853
1962
|
# bucket-level settings for S3 Bucket Key.
|
|
1963
|
+
#
|
|
1964
|
+
# **Directory buckets** - S3 Bucket Keys are always enabled for `GET`
|
|
1965
|
+
# and `PUT` operations in a directory bucket and can’t be disabled. S3
|
|
1966
|
+
# Bucket Keys aren't supported, when you copy SSE-KMS encrypted objects
|
|
1967
|
+
# from general purpose buckets to directory buckets, from directory
|
|
1968
|
+
# buckets to general purpose buckets, or between directory buckets,
|
|
1969
|
+
# through [CopyObject][1], [UploadPartCopy][2], [the Copy operation in
|
|
1970
|
+
# Batch Operations][3], or [the import jobs][4]. In this case, Amazon S3
|
|
1971
|
+
# makes a call to KMS every time a copy request is made for a
|
|
1972
|
+
# KMS-encrypted object.
|
|
1973
|
+
#
|
|
1974
|
+
#
|
|
1975
|
+
#
|
|
1976
|
+
# [1]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_CopyObject.html
|
|
1977
|
+
# [2]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_UploadPartCopy.html
|
|
1978
|
+
# [3]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/directory-buckets-objects-Batch-Ops
|
|
1979
|
+
# [4]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/create-import-job
|
|
854
1980
|
# @option options [String] :request_payer
|
|
855
1981
|
# Confirms that the requester knows that they will be charged for the
|
|
856
1982
|
# request. Bucket owners need not specify this parameter in their
|
|
857
|
-
# requests. If either the source or destination
|
|
858
|
-
#
|
|
859
|
-
#
|
|
860
|
-
#
|
|
861
|
-
#
|
|
1983
|
+
# requests. If either the source or destination S3 bucket has Requester
|
|
1984
|
+
# Pays enabled, the requester will pay for corresponding charges to copy
|
|
1985
|
+
# the object. For information about downloading objects from Requester
|
|
1986
|
+
# Pays buckets, see [Downloading Objects in Requester Pays Buckets][1]
|
|
1987
|
+
# in the *Amazon S3 User Guide*.
|
|
1988
|
+
#
|
|
1989
|
+
# <note markdown="1"> This functionality is not supported for directory buckets.
|
|
1990
|
+
#
|
|
1991
|
+
# </note>
|
|
862
1992
|
#
|
|
863
1993
|
#
|
|
864
1994
|
#
|
|
@@ -866,33 +1996,57 @@ module Aws::S3
|
|
|
866
1996
|
# @option options [String] :tagging
|
|
867
1997
|
# The tag-set for the object. The tag-set must be encoded as URL Query
|
|
868
1998
|
# parameters.
|
|
1999
|
+
#
|
|
2000
|
+
# <note markdown="1"> This functionality is not supported for directory buckets.
|
|
2001
|
+
#
|
|
2002
|
+
# </note>
|
|
869
2003
|
# @option options [String] :object_lock_mode
|
|
870
2004
|
# Specifies the Object Lock mode that you want to apply to the uploaded
|
|
871
2005
|
# object.
|
|
2006
|
+
#
|
|
2007
|
+
# <note markdown="1"> This functionality is not supported for directory buckets.
|
|
2008
|
+
#
|
|
2009
|
+
# </note>
|
|
872
2010
|
# @option options [Time,DateTime,Date,Integer,String] :object_lock_retain_until_date
|
|
873
2011
|
# Specifies the date and time when you want the Object Lock to expire.
|
|
2012
|
+
#
|
|
2013
|
+
# <note markdown="1"> This functionality is not supported for directory buckets.
|
|
2014
|
+
#
|
|
2015
|
+
# </note>
|
|
874
2016
|
# @option options [String] :object_lock_legal_hold_status
|
|
875
2017
|
# Specifies whether you want to apply a legal hold to the uploaded
|
|
876
2018
|
# object.
|
|
2019
|
+
#
|
|
2020
|
+
# <note markdown="1"> This functionality is not supported for directory buckets.
|
|
2021
|
+
#
|
|
2022
|
+
# </note>
|
|
877
2023
|
# @option options [String] :expected_bucket_owner
|
|
878
|
-
# The account ID of the expected bucket owner. If the
|
|
879
|
-
#
|
|
880
|
-
# Forbidden` (access denied).
|
|
2024
|
+
# The account ID of the expected bucket owner. If the account ID that
|
|
2025
|
+
# you provide does not match the actual owner of the bucket, the request
|
|
2026
|
+
# fails with the HTTP status code `403 Forbidden` (access denied).
|
|
881
2027
|
# @option options [String] :checksum_algorithm
|
|
882
|
-
# Indicates the algorithm you want Amazon S3 to use to create the
|
|
2028
|
+
# Indicates the algorithm that you want Amazon S3 to use to create the
|
|
883
2029
|
# checksum for the object. For more information, see [Checking object
|
|
884
2030
|
# integrity][1] in the *Amazon S3 User Guide*.
|
|
885
2031
|
#
|
|
886
2032
|
#
|
|
887
2033
|
#
|
|
888
2034
|
# [1]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html
|
|
2035
|
+
# @option options [String] :checksum_type
|
|
2036
|
+
# Indicates the checksum type that you want Amazon S3 to use to
|
|
2037
|
+
# calculate the object’s checksum value. For more information, see
|
|
2038
|
+
# [Checking object integrity in the Amazon S3 User Guide][1].
|
|
2039
|
+
#
|
|
2040
|
+
#
|
|
2041
|
+
#
|
|
2042
|
+
# [1]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html
|
|
889
2043
|
# @return [MultipartUpload]
|
|
890
2044
|
def initiate_multipart_upload(options = {})
|
|
891
2045
|
options = options.merge(
|
|
892
2046
|
bucket: @bucket_name,
|
|
893
2047
|
key: @key
|
|
894
2048
|
)
|
|
895
|
-
resp = Aws::Plugins::UserAgent.
|
|
2049
|
+
resp = Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
|
|
896
2050
|
@client.create_multipart_upload(options)
|
|
897
2051
|
end
|
|
898
2052
|
MultipartUpload.new(
|
|
@@ -915,21 +2069,25 @@ module Aws::S3
|
|
|
915
2069
|
# content_length: 1,
|
|
916
2070
|
# content_md5: "ContentMD5",
|
|
917
2071
|
# content_type: "ContentType",
|
|
918
|
-
# checksum_algorithm: "CRC32", # accepts CRC32, CRC32C, SHA1, SHA256
|
|
2072
|
+
# checksum_algorithm: "CRC32", # accepts CRC32, CRC32C, SHA1, SHA256, CRC64NVME
|
|
919
2073
|
# checksum_crc32: "ChecksumCRC32",
|
|
920
2074
|
# checksum_crc32c: "ChecksumCRC32C",
|
|
2075
|
+
# checksum_crc64nvme: "ChecksumCRC64NVME",
|
|
921
2076
|
# checksum_sha1: "ChecksumSHA1",
|
|
922
2077
|
# checksum_sha256: "ChecksumSHA256",
|
|
923
2078
|
# expires: Time.now,
|
|
2079
|
+
# if_match: "IfMatch",
|
|
2080
|
+
# if_none_match: "IfNoneMatch",
|
|
924
2081
|
# grant_full_control: "GrantFullControl",
|
|
925
2082
|
# grant_read: "GrantRead",
|
|
926
2083
|
# grant_read_acp: "GrantReadACP",
|
|
927
2084
|
# grant_write_acp: "GrantWriteACP",
|
|
2085
|
+
# write_offset_bytes: 1,
|
|
928
2086
|
# metadata: {
|
|
929
2087
|
# "MetadataKey" => "MetadataValue",
|
|
930
2088
|
# },
|
|
931
|
-
# server_side_encryption: "AES256", # accepts AES256, aws:kms, aws:kms:dsse
|
|
932
|
-
# storage_class: "STANDARD", # accepts STANDARD, REDUCED_REDUNDANCY, STANDARD_IA, ONEZONE_IA, INTELLIGENT_TIERING, GLACIER, DEEP_ARCHIVE, OUTPOSTS, GLACIER_IR, SNOW
|
|
2089
|
+
# server_side_encryption: "AES256", # accepts AES256, aws:fsx, aws:kms, aws:kms:dsse
|
|
2090
|
+
# 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
|
|
933
2091
|
# website_redirect_location: "WebsiteRedirectLocation",
|
|
934
2092
|
# sse_customer_algorithm: "SSECustomerAlgorithm",
|
|
935
2093
|
# sse_customer_key: "SSECustomerKey",
|
|
@@ -947,13 +2105,41 @@ module Aws::S3
|
|
|
947
2105
|
# @param [Hash] options ({})
|
|
948
2106
|
# @option options [String] :acl
|
|
949
2107
|
# The canned ACL to apply to the object. For more information, see
|
|
950
|
-
# [Canned ACL][1]
|
|
2108
|
+
# [Canned ACL][1] in the *Amazon S3 User Guide*.
|
|
2109
|
+
#
|
|
2110
|
+
# When adding a new object, you can use headers to grant ACL-based
|
|
2111
|
+
# permissions to individual Amazon Web Services accounts or to
|
|
2112
|
+
# predefined groups defined by Amazon S3. These permissions are then
|
|
2113
|
+
# added to the ACL on the object. By default, all objects are private.
|
|
2114
|
+
# Only the owner has full access control. For more information, see
|
|
2115
|
+
# [Access Control List (ACL) Overview][2] and [Managing ACLs Using the
|
|
2116
|
+
# REST API][3] in the *Amazon S3 User Guide*.
|
|
2117
|
+
#
|
|
2118
|
+
# If the bucket that you're uploading objects to uses the bucket owner
|
|
2119
|
+
# enforced setting for S3 Object Ownership, ACLs are disabled and no
|
|
2120
|
+
# longer affect permissions. Buckets that use this setting only accept
|
|
2121
|
+
# PUT requests that don't specify an ACL or PUT requests that specify
|
|
2122
|
+
# bucket owner full control ACLs, such as the
|
|
2123
|
+
# `bucket-owner-full-control` canned ACL or an equivalent form of this
|
|
2124
|
+
# ACL expressed in the XML format. PUT requests that contain other ACLs
|
|
2125
|
+
# (for example, custom grants to certain Amazon Web Services accounts)
|
|
2126
|
+
# fail and return a `400` error with the error code
|
|
2127
|
+
# `AccessControlListNotSupported`. For more information, see [
|
|
2128
|
+
# Controlling ownership of objects and disabling ACLs][4] in the *Amazon
|
|
2129
|
+
# S3 User Guide*.
|
|
2130
|
+
#
|
|
2131
|
+
# <note markdown="1"> * This functionality is not supported for directory buckets.
|
|
2132
|
+
#
|
|
2133
|
+
# * This functionality is not supported for Amazon S3 on Outposts.
|
|
951
2134
|
#
|
|
952
|
-
#
|
|
2135
|
+
# </note>
|
|
953
2136
|
#
|
|
954
2137
|
#
|
|
955
2138
|
#
|
|
956
2139
|
# [1]: https://docs.aws.amazon.com/AmazonS3/latest/dev/acl-overview.html#CannedACL
|
|
2140
|
+
# [2]: https://docs.aws.amazon.com/AmazonS3/latest/dev/acl-overview.html
|
|
2141
|
+
# [3]: https://docs.aws.amazon.com/AmazonS3/latest/dev/acl-using-rest-api.html
|
|
2142
|
+
# [4]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/about-object-ownership.html
|
|
957
2143
|
# @option options [String, StringIO, File] :body
|
|
958
2144
|
# Object data.
|
|
959
2145
|
# @option options [String] :cache_control
|
|
@@ -992,7 +2178,7 @@ module Aws::S3
|
|
|
992
2178
|
#
|
|
993
2179
|
# [1]: https://www.rfc-editor.org/rfc/rfc9110.html#name-content-length
|
|
994
2180
|
# @option options [String] :content_md5
|
|
995
|
-
# The
|
|
2181
|
+
# The Base64 encoded 128-bit `MD5` digest of the message (without the
|
|
996
2182
|
# headers) according to RFC 1864. This header can be used as a message
|
|
997
2183
|
# integrity check to verify that the data is the same data that was
|
|
998
2184
|
# originally sent. Although it is optional, we recommend using the
|
|
@@ -1000,9 +2186,22 @@ module Aws::S3
|
|
|
1000
2186
|
# information about REST request authentication, see [REST
|
|
1001
2187
|
# Authentication][1].
|
|
1002
2188
|
#
|
|
2189
|
+
# <note markdown="1"> The `Content-MD5` or `x-amz-sdk-checksum-algorithm` header is required
|
|
2190
|
+
# for any request to upload an object with a retention period configured
|
|
2191
|
+
# using Amazon S3 Object Lock. For more information, see [Uploading
|
|
2192
|
+
# objects to an Object Lock enabled bucket ][2] in the *Amazon S3 User
|
|
2193
|
+
# Guide*.
|
|
2194
|
+
#
|
|
2195
|
+
# </note>
|
|
2196
|
+
#
|
|
2197
|
+
# <note markdown="1"> This functionality is not supported for directory buckets.
|
|
2198
|
+
#
|
|
2199
|
+
# </note>
|
|
2200
|
+
#
|
|
1003
2201
|
#
|
|
1004
2202
|
#
|
|
1005
2203
|
# [1]: https://docs.aws.amazon.com/AmazonS3/latest/dev/RESTAuthentication.html
|
|
2204
|
+
# [2]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/object-lock-managing.html#object-lock-put-object
|
|
1006
2205
|
# @option options [String] :content_type
|
|
1007
2206
|
# A standard MIME type describing the format of the contents. For more
|
|
1008
2207
|
# information, see
|
|
@@ -1013,25 +2212,54 @@ module Aws::S3
|
|
|
1013
2212
|
# [1]: https://www.rfc-editor.org/rfc/rfc9110.html#name-content-type
|
|
1014
2213
|
# @option options [String] :checksum_algorithm
|
|
1015
2214
|
# Indicates the algorithm used to create the checksum for the object
|
|
1016
|
-
# when
|
|
1017
|
-
# functionality if
|
|
1018
|
-
# must be a corresponding `x-amz-checksum` or
|
|
1019
|
-
# sent. Otherwise, Amazon S3 fails the request
|
|
1020
|
-
# `400 Bad Request`.
|
|
1021
|
-
# integrity][1] in the *Amazon S3 User Guide*.
|
|
2215
|
+
# when you use the SDK. This header will not provide any additional
|
|
2216
|
+
# functionality if you don't use the SDK. When you send this header,
|
|
2217
|
+
# there must be a corresponding `x-amz-checksum-algorithm ` or
|
|
2218
|
+
# `x-amz-trailer` header sent. Otherwise, Amazon S3 fails the request
|
|
2219
|
+
# with the HTTP status code `400 Bad Request`.
|
|
1022
2220
|
#
|
|
1023
|
-
#
|
|
1024
|
-
#
|
|
2221
|
+
# For the `x-amz-checksum-algorithm ` header, replace ` algorithm ` with
|
|
2222
|
+
# the supported algorithm from the following list:
|
|
2223
|
+
#
|
|
2224
|
+
# * `CRC32`
|
|
2225
|
+
#
|
|
2226
|
+
# * `CRC32C`
|
|
2227
|
+
#
|
|
2228
|
+
# * `CRC64NVME`
|
|
2229
|
+
#
|
|
2230
|
+
# * `SHA1`
|
|
2231
|
+
#
|
|
2232
|
+
# * `SHA256`
|
|
2233
|
+
#
|
|
2234
|
+
# For more information, see [Checking object integrity][1] in the
|
|
2235
|
+
# *Amazon S3 User Guide*.
|
|
2236
|
+
#
|
|
2237
|
+
# If the individual checksum value you provide through
|
|
2238
|
+
# `x-amz-checksum-algorithm ` doesn't match the checksum algorithm you
|
|
2239
|
+
# set through `x-amz-sdk-checksum-algorithm`, Amazon S3 fails the
|
|
2240
|
+
# request with a `BadDigest` error.
|
|
2241
|
+
#
|
|
2242
|
+
# <note markdown="1"> The `Content-MD5` or `x-amz-sdk-checksum-algorithm` header is required
|
|
2243
|
+
# for any request to upload an object with a retention period configured
|
|
2244
|
+
# using Amazon S3 Object Lock. For more information, see [Uploading
|
|
2245
|
+
# objects to an Object Lock enabled bucket ][2] in the *Amazon S3 User
|
|
2246
|
+
# Guide*.
|
|
2247
|
+
#
|
|
2248
|
+
# </note>
|
|
2249
|
+
#
|
|
2250
|
+
# For directory buckets, when you use Amazon Web Services SDKs, `CRC32`
|
|
2251
|
+
# is the default checksum algorithm that's used for performance.
|
|
1025
2252
|
#
|
|
1026
2253
|
#
|
|
1027
2254
|
#
|
|
1028
2255
|
# [1]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html
|
|
2256
|
+
# [2]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/object-lock-managing.html#object-lock-put-object
|
|
1029
2257
|
# @option options [String] :checksum_crc32
|
|
1030
2258
|
# This header can be used as a data integrity check to verify that the
|
|
1031
2259
|
# data received is the same data that was originally sent. This header
|
|
1032
|
-
# specifies the
|
|
1033
|
-
# more information, see [Checking object integrity][1] in the
|
|
1034
|
-
# User Guide*.
|
|
2260
|
+
# specifies the Base64 encoded, 32-bit `CRC32` checksum of the object.
|
|
2261
|
+
# For more information, see [Checking object integrity][1] in the
|
|
2262
|
+
# *Amazon S3 User Guide*.
|
|
1035
2263
|
#
|
|
1036
2264
|
#
|
|
1037
2265
|
#
|
|
@@ -1039,17 +2267,28 @@ module Aws::S3
|
|
|
1039
2267
|
# @option options [String] :checksum_crc32c
|
|
1040
2268
|
# This header can be used as a data integrity check to verify that the
|
|
1041
2269
|
# data received is the same data that was originally sent. This header
|
|
1042
|
-
# specifies the
|
|
2270
|
+
# specifies the Base64 encoded, 32-bit `CRC32C` checksum of the object.
|
|
1043
2271
|
# For more information, see [Checking object integrity][1] in the
|
|
1044
2272
|
# *Amazon S3 User Guide*.
|
|
1045
2273
|
#
|
|
1046
2274
|
#
|
|
1047
2275
|
#
|
|
1048
2276
|
# [1]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html
|
|
2277
|
+
# @option options [String] :checksum_crc64nvme
|
|
2278
|
+
# This header can be used as a data integrity check to verify that the
|
|
2279
|
+
# data received is the same data that was originally sent. This header
|
|
2280
|
+
# specifies the Base64 encoded, 64-bit `CRC64NVME` checksum of the
|
|
2281
|
+
# object. The `CRC64NVME` checksum is always a full object checksum. For
|
|
2282
|
+
# more information, see [Checking object integrity in the Amazon S3 User
|
|
2283
|
+
# Guide][1].
|
|
2284
|
+
#
|
|
2285
|
+
#
|
|
2286
|
+
#
|
|
2287
|
+
# [1]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html
|
|
1049
2288
|
# @option options [String] :checksum_sha1
|
|
1050
2289
|
# This header can be used as a data integrity check to verify that the
|
|
1051
2290
|
# data received is the same data that was originally sent. This header
|
|
1052
|
-
# specifies the
|
|
2291
|
+
# specifies the Base64 encoded, 160-bit `SHA1` digest of the object. For
|
|
1053
2292
|
# more information, see [Checking object integrity][1] in the *Amazon S3
|
|
1054
2293
|
# User Guide*.
|
|
1055
2294
|
#
|
|
@@ -1059,7 +2298,7 @@ module Aws::S3
|
|
|
1059
2298
|
# @option options [String] :checksum_sha256
|
|
1060
2299
|
# This header can be used as a data integrity check to verify that the
|
|
1061
2300
|
# data received is the same data that was originally sent. This header
|
|
1062
|
-
# specifies the
|
|
2301
|
+
# specifies the Base64 encoded, 256-bit `SHA256` digest of the object.
|
|
1063
2302
|
# For more information, see [Checking object integrity][1] in the
|
|
1064
2303
|
# *Amazon S3 User Guide*.
|
|
1065
2304
|
#
|
|
@@ -1074,35 +2313,173 @@ module Aws::S3
|
|
|
1074
2313
|
#
|
|
1075
2314
|
#
|
|
1076
2315
|
# [1]: https://www.rfc-editor.org/rfc/rfc7234#section-5.3
|
|
2316
|
+
# @option options [String] :if_match
|
|
2317
|
+
# Uploads the object only if the ETag (entity tag) value provided during
|
|
2318
|
+
# the WRITE operation matches the ETag of the object in S3. If the ETag
|
|
2319
|
+
# values do not match, the operation returns a `412 Precondition Failed`
|
|
2320
|
+
# error.
|
|
2321
|
+
#
|
|
2322
|
+
# If a conflicting operation occurs during the upload S3 returns a `409
|
|
2323
|
+
# ConditionalRequestConflict` response. On a 409 failure you should
|
|
2324
|
+
# fetch the object's ETag and retry the upload.
|
|
2325
|
+
#
|
|
2326
|
+
# Expects the ETag value as a string.
|
|
2327
|
+
#
|
|
2328
|
+
# For more information about conditional requests, see [RFC 7232][1], or
|
|
2329
|
+
# [Conditional requests][2] in the *Amazon S3 User Guide*.
|
|
2330
|
+
#
|
|
2331
|
+
#
|
|
2332
|
+
#
|
|
2333
|
+
# [1]: https://tools.ietf.org/html/rfc7232
|
|
2334
|
+
# [2]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/conditional-requests.html
|
|
2335
|
+
# @option options [String] :if_none_match
|
|
2336
|
+
# Uploads the object only if the object key name does not already exist
|
|
2337
|
+
# in the bucket specified. Otherwise, Amazon S3 returns a `412
|
|
2338
|
+
# Precondition Failed` error.
|
|
2339
|
+
#
|
|
2340
|
+
# If a conflicting operation occurs during the upload S3 returns a `409
|
|
2341
|
+
# ConditionalRequestConflict` response. On a 409 failure you should
|
|
2342
|
+
# retry the upload.
|
|
2343
|
+
#
|
|
2344
|
+
# Expects the '*' (asterisk) character.
|
|
2345
|
+
#
|
|
2346
|
+
# For more information about conditional requests, see [RFC 7232][1], or
|
|
2347
|
+
# [Conditional requests][2] in the *Amazon S3 User Guide*.
|
|
2348
|
+
#
|
|
2349
|
+
#
|
|
2350
|
+
#
|
|
2351
|
+
# [1]: https://tools.ietf.org/html/rfc7232
|
|
2352
|
+
# [2]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/conditional-requests.html
|
|
1077
2353
|
# @option options [String] :grant_full_control
|
|
1078
2354
|
# Gives the grantee READ, READ\_ACP, and WRITE\_ACP permissions on the
|
|
1079
2355
|
# object.
|
|
1080
2356
|
#
|
|
1081
|
-
# This
|
|
2357
|
+
# <note markdown="1"> * This functionality is not supported for directory buckets.
|
|
2358
|
+
#
|
|
2359
|
+
# * This functionality is not supported for Amazon S3 on Outposts.
|
|
2360
|
+
#
|
|
2361
|
+
# </note>
|
|
1082
2362
|
# @option options [String] :grant_read
|
|
1083
2363
|
# Allows grantee to read the object data and its metadata.
|
|
1084
2364
|
#
|
|
1085
|
-
# This
|
|
2365
|
+
# <note markdown="1"> * This functionality is not supported for directory buckets.
|
|
2366
|
+
#
|
|
2367
|
+
# * This functionality is not supported for Amazon S3 on Outposts.
|
|
2368
|
+
#
|
|
2369
|
+
# </note>
|
|
1086
2370
|
# @option options [String] :grant_read_acp
|
|
1087
2371
|
# Allows grantee to read the object ACL.
|
|
1088
2372
|
#
|
|
1089
|
-
# This
|
|
2373
|
+
# <note markdown="1"> * This functionality is not supported for directory buckets.
|
|
2374
|
+
#
|
|
2375
|
+
# * This functionality is not supported for Amazon S3 on Outposts.
|
|
2376
|
+
#
|
|
2377
|
+
# </note>
|
|
1090
2378
|
# @option options [String] :grant_write_acp
|
|
1091
2379
|
# Allows grantee to write the ACL for the applicable object.
|
|
1092
2380
|
#
|
|
1093
|
-
# This
|
|
2381
|
+
# <note markdown="1"> * This functionality is not supported for directory buckets.
|
|
2382
|
+
#
|
|
2383
|
+
# * This functionality is not supported for Amazon S3 on Outposts.
|
|
2384
|
+
#
|
|
2385
|
+
# </note>
|
|
2386
|
+
# @option options [Integer] :write_offset_bytes
|
|
2387
|
+
# Specifies the offset for appending data to existing objects in bytes.
|
|
2388
|
+
# The offset must be equal to the size of the existing object being
|
|
2389
|
+
# appended to. If no object exists, setting this header to 0 will create
|
|
2390
|
+
# a new object.
|
|
2391
|
+
#
|
|
2392
|
+
# <note markdown="1"> This functionality is only supported for objects in the Amazon S3
|
|
2393
|
+
# Express One Zone storage class in directory buckets.
|
|
2394
|
+
#
|
|
2395
|
+
# </note>
|
|
1094
2396
|
# @option options [Hash<String,String>] :metadata
|
|
1095
2397
|
# A map of metadata to store with the object in S3.
|
|
1096
2398
|
# @option options [String] :server_side_encryption
|
|
1097
|
-
# The server-side encryption algorithm used when
|
|
1098
|
-
# Amazon S3
|
|
2399
|
+
# The server-side encryption algorithm that was used when you store this
|
|
2400
|
+
# object in Amazon S3 or Amazon FSx.
|
|
2401
|
+
#
|
|
2402
|
+
# * <b>General purpose buckets </b> - You have four mutually exclusive
|
|
2403
|
+
# options to protect data using server-side encryption in Amazon S3,
|
|
2404
|
+
# depending on how you choose to manage the encryption keys.
|
|
2405
|
+
# Specifically, the encryption key options are Amazon S3 managed keys
|
|
2406
|
+
# (SSE-S3), Amazon Web Services KMS keys (SSE-KMS or DSSE-KMS), and
|
|
2407
|
+
# customer-provided keys (SSE-C). Amazon S3 encrypts data with
|
|
2408
|
+
# server-side encryption by using Amazon S3 managed keys (SSE-S3) by
|
|
2409
|
+
# default. You can optionally tell Amazon S3 to encrypt data at rest
|
|
2410
|
+
# by using server-side encryption with other key options. For more
|
|
2411
|
+
# information, see [Using Server-Side Encryption][1] in the *Amazon S3
|
|
2412
|
+
# User Guide*.
|
|
2413
|
+
#
|
|
2414
|
+
# * <b>Directory buckets </b> - For directory buckets, there are only
|
|
2415
|
+
# two supported options for server-side encryption: server-side
|
|
2416
|
+
# encryption with Amazon S3 managed keys (SSE-S3) (`AES256`) and
|
|
2417
|
+
# server-side encryption with KMS keys (SSE-KMS) (`aws:kms`). We
|
|
2418
|
+
# recommend that the bucket's default encryption uses the desired
|
|
2419
|
+
# encryption configuration and you don't override the bucket default
|
|
2420
|
+
# encryption in your `CreateSession` requests or `PUT` object
|
|
2421
|
+
# requests. Then, new objects are automatically encrypted with the
|
|
2422
|
+
# desired encryption settings. For more information, see [Protecting
|
|
2423
|
+
# data with server-side encryption][2] in the *Amazon S3 User Guide*.
|
|
2424
|
+
# For more information about the encryption overriding behaviors in
|
|
2425
|
+
# directory buckets, see [Specifying server-side encryption with KMS
|
|
2426
|
+
# for new object uploads][3].
|
|
2427
|
+
#
|
|
2428
|
+
# In the Zonal endpoint API calls (except [CopyObject][4] and
|
|
2429
|
+
# [UploadPartCopy][5]) using the REST API, the encryption request
|
|
2430
|
+
# headers must match the encryption settings that are specified in the
|
|
2431
|
+
# `CreateSession` request. You can't override the values of the
|
|
2432
|
+
# encryption settings (`x-amz-server-side-encryption`,
|
|
2433
|
+
# `x-amz-server-side-encryption-aws-kms-key-id`,
|
|
2434
|
+
# `x-amz-server-side-encryption-context`, and
|
|
2435
|
+
# `x-amz-server-side-encryption-bucket-key-enabled`) that are
|
|
2436
|
+
# specified in the `CreateSession` request. You don't need to
|
|
2437
|
+
# explicitly specify these encryption settings values in Zonal
|
|
2438
|
+
# endpoint API calls, and Amazon S3 will use the encryption settings
|
|
2439
|
+
# values from the `CreateSession` request to protect new objects in
|
|
2440
|
+
# the directory bucket.
|
|
2441
|
+
#
|
|
2442
|
+
# <note markdown="1"> When you use the CLI or the Amazon Web Services SDKs, for
|
|
2443
|
+
# `CreateSession`, the session token refreshes automatically to avoid
|
|
2444
|
+
# service interruptions when a session expires. The CLI or the Amazon
|
|
2445
|
+
# Web Services SDKs use the bucket's default encryption configuration
|
|
2446
|
+
# for the `CreateSession` request. It's not supported to override the
|
|
2447
|
+
# encryption settings values in the `CreateSession` request. So in the
|
|
2448
|
+
# Zonal endpoint API calls (except [CopyObject][4] and
|
|
2449
|
+
# [UploadPartCopy][5]), the encryption request headers must match the
|
|
2450
|
+
# default encryption configuration of the directory bucket.
|
|
2451
|
+
#
|
|
2452
|
+
# </note>
|
|
2453
|
+
#
|
|
2454
|
+
# * <b>S3 access points for Amazon FSx </b> - When accessing data stored
|
|
2455
|
+
# in Amazon FSx file systems using S3 access points, the only valid
|
|
2456
|
+
# server side encryption option is `aws:fsx`. All Amazon FSx file
|
|
2457
|
+
# systems have encryption configured by default and are encrypted at
|
|
2458
|
+
# rest. Data is automatically encrypted before being written to the
|
|
2459
|
+
# file system, and automatically decrypted as it is read. These
|
|
2460
|
+
# processes are handled transparently by Amazon FSx.
|
|
2461
|
+
#
|
|
2462
|
+
#
|
|
2463
|
+
#
|
|
2464
|
+
# [1]: https://docs.aws.amazon.com/AmazonS3/latest/dev/UsingServerSideEncryption.html
|
|
2465
|
+
# [2]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-express-serv-side-encryption.html
|
|
2466
|
+
# [3]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-express-specifying-kms-encryption.html
|
|
2467
|
+
# [4]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_CopyObject.html
|
|
2468
|
+
# [5]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_UploadPartCopy.html
|
|
1099
2469
|
# @option options [String] :storage_class
|
|
1100
2470
|
# By default, Amazon S3 uses the STANDARD Storage Class to store newly
|
|
1101
2471
|
# created objects. The STANDARD storage class provides high durability
|
|
1102
2472
|
# and high availability. Depending on performance needs, you can specify
|
|
1103
|
-
# a different Storage Class.
|
|
1104
|
-
#
|
|
1105
|
-
#
|
|
2473
|
+
# a different Storage Class. For more information, see [Storage
|
|
2474
|
+
# Classes][1] in the *Amazon S3 User Guide*.
|
|
2475
|
+
#
|
|
2476
|
+
# <note markdown="1"> * Directory buckets only support `EXPRESS_ONEZONE` (the S3 Express One
|
|
2477
|
+
# Zone storage class) in Availability Zones and `ONEZONE_IA` (the S3
|
|
2478
|
+
# One Zone-Infrequent Access storage class) in Dedicated Local Zones.
|
|
2479
|
+
#
|
|
2480
|
+
# * Amazon S3 on Outposts only uses the OUTPOSTS Storage Class.
|
|
2481
|
+
#
|
|
2482
|
+
# </note>
|
|
1106
2483
|
#
|
|
1107
2484
|
#
|
|
1108
2485
|
#
|
|
@@ -1111,7 +2488,8 @@ module Aws::S3
|
|
|
1111
2488
|
# If the bucket is configured as a website, redirects requests for this
|
|
1112
2489
|
# object to another object in the same bucket or to an external URL.
|
|
1113
2490
|
# Amazon S3 stores the value of this header in the object metadata. For
|
|
1114
|
-
# information about object metadata, see [Object Key and Metadata][1]
|
|
2491
|
+
# information about object metadata, see [Object Key and Metadata][1] in
|
|
2492
|
+
# the *Amazon S3 User Guide*.
|
|
1115
2493
|
#
|
|
1116
2494
|
# In the following example, the request header sets the redirect to an
|
|
1117
2495
|
# object (anotherPage.html) in the same bucket:
|
|
@@ -1125,7 +2503,11 @@ module Aws::S3
|
|
|
1125
2503
|
#
|
|
1126
2504
|
# For more information about website hosting in Amazon S3, see [Hosting
|
|
1127
2505
|
# Websites on Amazon S3][2] and [How to Configure Website Page
|
|
1128
|
-
# Redirects][3]
|
|
2506
|
+
# Redirects][3] in the *Amazon S3 User Guide*.
|
|
2507
|
+
#
|
|
2508
|
+
# <note markdown="1"> This functionality is not supported for directory buckets.
|
|
2509
|
+
#
|
|
2510
|
+
# </note>
|
|
1129
2511
|
#
|
|
1130
2512
|
#
|
|
1131
2513
|
#
|
|
@@ -1133,52 +2515,120 @@ module Aws::S3
|
|
|
1133
2515
|
# [2]: https://docs.aws.amazon.com/AmazonS3/latest/dev/WebsiteHosting.html
|
|
1134
2516
|
# [3]: https://docs.aws.amazon.com/AmazonS3/latest/dev/how-to-page-redirect.html
|
|
1135
2517
|
# @option options [String] :sse_customer_algorithm
|
|
1136
|
-
# Specifies the algorithm to use
|
|
1137
|
-
# example, AES256).
|
|
2518
|
+
# Specifies the algorithm to use when encrypting the object (for
|
|
2519
|
+
# example, `AES256`).
|
|
2520
|
+
#
|
|
2521
|
+
# <note markdown="1"> This functionality is not supported for directory buckets.
|
|
2522
|
+
#
|
|
2523
|
+
# </note>
|
|
1138
2524
|
# @option options [String] :sse_customer_key
|
|
1139
2525
|
# Specifies the customer-provided encryption key for Amazon S3 to use in
|
|
1140
2526
|
# encrypting data. This value is used to store the object and then it is
|
|
1141
2527
|
# discarded; Amazon S3 does not store the encryption key. The key must
|
|
1142
2528
|
# be appropriate for use with the algorithm specified in the
|
|
1143
2529
|
# `x-amz-server-side-encryption-customer-algorithm` header.
|
|
2530
|
+
#
|
|
2531
|
+
# <note markdown="1"> This functionality is not supported for directory buckets.
|
|
2532
|
+
#
|
|
2533
|
+
# </note>
|
|
1144
2534
|
# @option options [String] :sse_customer_key_md5
|
|
1145
2535
|
# Specifies the 128-bit MD5 digest of the encryption key according to
|
|
1146
2536
|
# RFC 1321. Amazon S3 uses this header for a message integrity check to
|
|
1147
2537
|
# ensure that the encryption key was transmitted without error.
|
|
2538
|
+
#
|
|
2539
|
+
# <note markdown="1"> This functionality is not supported for directory buckets.
|
|
2540
|
+
#
|
|
2541
|
+
# </note>
|
|
1148
2542
|
# @option options [String] :ssekms_key_id
|
|
1149
|
-
#
|
|
1150
|
-
#
|
|
1151
|
-
#
|
|
1152
|
-
#
|
|
1153
|
-
#
|
|
1154
|
-
#
|
|
1155
|
-
# x-amz-server-side-encryption
|
|
1156
|
-
#
|
|
1157
|
-
#
|
|
1158
|
-
#
|
|
2543
|
+
# Specifies the KMS key ID (Key ID, Key ARN, or Key Alias) to use for
|
|
2544
|
+
# object encryption. If the KMS key doesn't exist in the same account
|
|
2545
|
+
# that's issuing the command, you must use the full Key ARN not the Key
|
|
2546
|
+
# ID.
|
|
2547
|
+
#
|
|
2548
|
+
# **General purpose buckets** - If you specify
|
|
2549
|
+
# `x-amz-server-side-encryption` with `aws:kms` or `aws:kms:dsse`, this
|
|
2550
|
+
# header specifies the ID (Key ID, Key ARN, or Key Alias) of the KMS key
|
|
2551
|
+
# to use. If you specify `x-amz-server-side-encryption:aws:kms` or
|
|
2552
|
+
# `x-amz-server-side-encryption:aws:kms:dsse`, but do not provide
|
|
2553
|
+
# `x-amz-server-side-encryption-aws-kms-key-id`, Amazon S3 uses the
|
|
2554
|
+
# Amazon Web Services managed key (`aws/s3`) to protect the data.
|
|
2555
|
+
#
|
|
2556
|
+
# **Directory buckets** - To encrypt data using SSE-KMS, it's
|
|
2557
|
+
# recommended to specify the `x-amz-server-side-encryption` header to
|
|
2558
|
+
# `aws:kms`. Then, the `x-amz-server-side-encryption-aws-kms-key-id`
|
|
2559
|
+
# header implicitly uses the bucket's default KMS customer managed key
|
|
2560
|
+
# ID. If you want to explicitly set the `
|
|
2561
|
+
# x-amz-server-side-encryption-aws-kms-key-id` header, it must match the
|
|
2562
|
+
# bucket's default customer managed key (using key ID or ARN, not
|
|
2563
|
+
# alias). Your SSE-KMS configuration can only support 1 [customer
|
|
2564
|
+
# managed key][1] per directory bucket's lifetime. The [Amazon Web
|
|
2565
|
+
# Services managed key][2] (`aws/s3`) isn't supported. Incorrect key
|
|
2566
|
+
# specification results in an HTTP `400 Bad Request` error.
|
|
2567
|
+
#
|
|
2568
|
+
#
|
|
2569
|
+
#
|
|
2570
|
+
# [1]: https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#customer-cmk
|
|
2571
|
+
# [2]: https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#aws-managed-cmk
|
|
1159
2572
|
# @option options [String] :ssekms_encryption_context
|
|
1160
|
-
# Specifies the Amazon Web Services KMS Encryption Context
|
|
1161
|
-
#
|
|
1162
|
-
#
|
|
1163
|
-
#
|
|
1164
|
-
#
|
|
1165
|
-
# operations on this
|
|
2573
|
+
# Specifies the Amazon Web Services KMS Encryption Context as an
|
|
2574
|
+
# additional encryption context to use for object encryption. The value
|
|
2575
|
+
# of this header is a Base64 encoded string of a UTF-8 encoded JSON,
|
|
2576
|
+
# which contains the encryption context as key-value pairs. This value
|
|
2577
|
+
# is stored as object metadata and automatically gets passed on to
|
|
2578
|
+
# Amazon Web Services KMS for future `GetObject` operations on this
|
|
2579
|
+
# object.
|
|
2580
|
+
#
|
|
2581
|
+
# **General purpose buckets** - This value must be explicitly added
|
|
2582
|
+
# during `CopyObject` operations if you want an additional encryption
|
|
2583
|
+
# context for your object. For more information, see [Encryption
|
|
2584
|
+
# context][1] in the *Amazon S3 User Guide*.
|
|
2585
|
+
#
|
|
2586
|
+
# **Directory buckets** - You can optionally provide an explicit
|
|
2587
|
+
# encryption context value. The value must match the default encryption
|
|
2588
|
+
# context - the bucket Amazon Resource Name (ARN). An additional
|
|
2589
|
+
# encryption context value is not supported.
|
|
2590
|
+
#
|
|
2591
|
+
#
|
|
2592
|
+
#
|
|
2593
|
+
# [1]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/UsingKMSEncryption.html#encryption-context
|
|
1166
2594
|
# @option options [Boolean] :bucket_key_enabled
|
|
1167
2595
|
# Specifies whether Amazon S3 should use an S3 Bucket Key for object
|
|
1168
2596
|
# encryption with server-side encryption using Key Management Service
|
|
1169
|
-
# (KMS) keys (SSE-KMS).
|
|
1170
|
-
#
|
|
2597
|
+
# (KMS) keys (SSE-KMS).
|
|
2598
|
+
#
|
|
2599
|
+
# **General purpose buckets** - Setting this header to `true` causes
|
|
2600
|
+
# Amazon S3 to use an S3 Bucket Key for object encryption with SSE-KMS.
|
|
2601
|
+
# Also, specifying this header with a PUT action doesn't affect
|
|
2602
|
+
# bucket-level settings for S3 Bucket Key.
|
|
2603
|
+
#
|
|
2604
|
+
# **Directory buckets** - S3 Bucket Keys are always enabled for `GET`
|
|
2605
|
+
# and `PUT` operations in a directory bucket and can’t be disabled. S3
|
|
2606
|
+
# Bucket Keys aren't supported, when you copy SSE-KMS encrypted objects
|
|
2607
|
+
# from general purpose buckets to directory buckets, from directory
|
|
2608
|
+
# buckets to general purpose buckets, or between directory buckets,
|
|
2609
|
+
# through [CopyObject][1], [UploadPartCopy][2], [the Copy operation in
|
|
2610
|
+
# Batch Operations][3], or [the import jobs][4]. In this case, Amazon S3
|
|
2611
|
+
# makes a call to KMS every time a copy request is made for a
|
|
2612
|
+
# KMS-encrypted object.
|
|
2613
|
+
#
|
|
2614
|
+
#
|
|
1171
2615
|
#
|
|
1172
|
-
#
|
|
1173
|
-
#
|
|
2616
|
+
# [1]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_CopyObject.html
|
|
2617
|
+
# [2]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_UploadPartCopy.html
|
|
2618
|
+
# [3]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/directory-buckets-objects-Batch-Ops
|
|
2619
|
+
# [4]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/create-import-job
|
|
1174
2620
|
# @option options [String] :request_payer
|
|
1175
2621
|
# Confirms that the requester knows that they will be charged for the
|
|
1176
2622
|
# request. Bucket owners need not specify this parameter in their
|
|
1177
|
-
# requests. If either the source or destination
|
|
1178
|
-
#
|
|
1179
|
-
#
|
|
1180
|
-
#
|
|
1181
|
-
#
|
|
2623
|
+
# requests. If either the source or destination S3 bucket has Requester
|
|
2624
|
+
# Pays enabled, the requester will pay for corresponding charges to copy
|
|
2625
|
+
# the object. For information about downloading objects from Requester
|
|
2626
|
+
# Pays buckets, see [Downloading Objects in Requester Pays Buckets][1]
|
|
2627
|
+
# in the *Amazon S3 User Guide*.
|
|
2628
|
+
#
|
|
2629
|
+
# <note markdown="1"> This functionality is not supported for directory buckets.
|
|
2630
|
+
#
|
|
2631
|
+
# </note>
|
|
1182
2632
|
#
|
|
1183
2633
|
#
|
|
1184
2634
|
#
|
|
@@ -1186,29 +2636,46 @@ module Aws::S3
|
|
|
1186
2636
|
# @option options [String] :tagging
|
|
1187
2637
|
# The tag-set for the object. The tag-set must be encoded as URL Query
|
|
1188
2638
|
# parameters. (For example, "Key1=Value1")
|
|
2639
|
+
#
|
|
2640
|
+
# <note markdown="1"> This functionality is not supported for directory buckets.
|
|
2641
|
+
#
|
|
2642
|
+
# </note>
|
|
1189
2643
|
# @option options [String] :object_lock_mode
|
|
1190
2644
|
# The Object Lock mode that you want to apply to this object.
|
|
2645
|
+
#
|
|
2646
|
+
# <note markdown="1"> This functionality is not supported for directory buckets.
|
|
2647
|
+
#
|
|
2648
|
+
# </note>
|
|
1191
2649
|
# @option options [Time,DateTime,Date,Integer,String] :object_lock_retain_until_date
|
|
1192
2650
|
# The date and time when you want this object's Object Lock to expire.
|
|
1193
2651
|
# Must be formatted as a timestamp parameter.
|
|
2652
|
+
#
|
|
2653
|
+
# <note markdown="1"> This functionality is not supported for directory buckets.
|
|
2654
|
+
#
|
|
2655
|
+
# </note>
|
|
1194
2656
|
# @option options [String] :object_lock_legal_hold_status
|
|
1195
2657
|
# Specifies whether a legal hold will be applied to this object. For
|
|
1196
|
-
# more information about S3 Object Lock, see [Object Lock][1]
|
|
2658
|
+
# more information about S3 Object Lock, see [Object Lock][1] in the
|
|
2659
|
+
# *Amazon S3 User Guide*.
|
|
2660
|
+
#
|
|
2661
|
+
# <note markdown="1"> This functionality is not supported for directory buckets.
|
|
2662
|
+
#
|
|
2663
|
+
# </note>
|
|
1197
2664
|
#
|
|
1198
2665
|
#
|
|
1199
2666
|
#
|
|
1200
2667
|
# [1]: https://docs.aws.amazon.com/AmazonS3/latest/dev/object-lock.html
|
|
1201
2668
|
# @option options [String] :expected_bucket_owner
|
|
1202
|
-
# The account ID of the expected bucket owner. If the
|
|
1203
|
-
#
|
|
1204
|
-
# Forbidden` (access denied).
|
|
2669
|
+
# The account ID of the expected bucket owner. If the account ID that
|
|
2670
|
+
# you provide does not match the actual owner of the bucket, the request
|
|
2671
|
+
# fails with the HTTP status code `403 Forbidden` (access denied).
|
|
1205
2672
|
# @return [Types::PutObjectOutput]
|
|
1206
2673
|
def put(options = {})
|
|
1207
2674
|
options = options.merge(
|
|
1208
2675
|
bucket: @bucket_name,
|
|
1209
2676
|
key: @key
|
|
1210
2677
|
)
|
|
1211
|
-
resp = Aws::Plugins::UserAgent.
|
|
2678
|
+
resp = Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
|
|
1212
2679
|
@client.put_object(options)
|
|
1213
2680
|
end
|
|
1214
2681
|
resp.data
|
|
@@ -1264,7 +2731,7 @@ module Aws::S3
|
|
|
1264
2731
|
# bucket_name: "BucketName", # required
|
|
1265
2732
|
# prefix: "LocationPrefix", # required
|
|
1266
2733
|
# encryption: {
|
|
1267
|
-
# encryption_type: "AES256", # required, accepts AES256, aws:kms, aws:kms:dsse
|
|
2734
|
+
# encryption_type: "AES256", # required, accepts AES256, aws:fsx, aws:kms, aws:kms:dsse
|
|
1268
2735
|
# kms_key_id: "SSEKMSKeyId",
|
|
1269
2736
|
# kms_context: "KMSContext",
|
|
1270
2737
|
# },
|
|
@@ -1295,12 +2762,12 @@ module Aws::S3
|
|
|
1295
2762
|
# value: "MetadataValue",
|
|
1296
2763
|
# },
|
|
1297
2764
|
# ],
|
|
1298
|
-
# storage_class: "STANDARD", # accepts STANDARD, REDUCED_REDUNDANCY, STANDARD_IA, ONEZONE_IA, INTELLIGENT_TIERING, GLACIER, DEEP_ARCHIVE, OUTPOSTS, GLACIER_IR, SNOW
|
|
2765
|
+
# 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
|
|
1299
2766
|
# },
|
|
1300
2767
|
# },
|
|
1301
2768
|
# },
|
|
1302
2769
|
# request_payer: "requester", # accepts requester
|
|
1303
|
-
# checksum_algorithm: "CRC32", # accepts CRC32, CRC32C, SHA1, SHA256
|
|
2770
|
+
# checksum_algorithm: "CRC32", # accepts CRC32, CRC32C, SHA1, SHA256, CRC64NVME
|
|
1304
2771
|
# expected_bucket_owner: "AccountId",
|
|
1305
2772
|
# })
|
|
1306
2773
|
# @param [Hash] options ({})
|
|
@@ -1311,23 +2778,27 @@ module Aws::S3
|
|
|
1311
2778
|
# @option options [String] :request_payer
|
|
1312
2779
|
# Confirms that the requester knows that they will be charged for the
|
|
1313
2780
|
# request. Bucket owners need not specify this parameter in their
|
|
1314
|
-
# requests. If either the source or destination
|
|
1315
|
-
#
|
|
1316
|
-
#
|
|
1317
|
-
#
|
|
1318
|
-
#
|
|
2781
|
+
# requests. If either the source or destination S3 bucket has Requester
|
|
2782
|
+
# Pays enabled, the requester will pay for corresponding charges to copy
|
|
2783
|
+
# the object. For information about downloading objects from Requester
|
|
2784
|
+
# Pays buckets, see [Downloading Objects in Requester Pays Buckets][1]
|
|
2785
|
+
# in the *Amazon S3 User Guide*.
|
|
2786
|
+
#
|
|
2787
|
+
# <note markdown="1"> This functionality is not supported for directory buckets.
|
|
2788
|
+
#
|
|
2789
|
+
# </note>
|
|
1319
2790
|
#
|
|
1320
2791
|
#
|
|
1321
2792
|
#
|
|
1322
2793
|
# [1]: https://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html
|
|
1323
2794
|
# @option options [String] :checksum_algorithm
|
|
1324
2795
|
# Indicates the algorithm used to create the checksum for the object
|
|
1325
|
-
# when
|
|
1326
|
-
# functionality if
|
|
1327
|
-
# must be a corresponding `x-amz-checksum` or `x-amz-trailer`
|
|
1328
|
-
# sent. Otherwise, Amazon S3 fails the request with the HTTP
|
|
1329
|
-
# `400 Bad Request`. For more information, see [Checking
|
|
1330
|
-
# integrity][1] in the *Amazon S3 User Guide*.
|
|
2796
|
+
# when you use the SDK. This header will not provide any additional
|
|
2797
|
+
# functionality if you don't use the SDK. When you send this header,
|
|
2798
|
+
# there must be a corresponding `x-amz-checksum` or `x-amz-trailer`
|
|
2799
|
+
# header sent. Otherwise, Amazon S3 fails the request with the HTTP
|
|
2800
|
+
# status code `400 Bad Request`. For more information, see [Checking
|
|
2801
|
+
# object integrity][1] in the *Amazon S3 User Guide*.
|
|
1331
2802
|
#
|
|
1332
2803
|
# If you provide an individual checksum, Amazon S3 ignores any provided
|
|
1333
2804
|
# `ChecksumAlgorithm` parameter.
|
|
@@ -1336,16 +2807,16 @@ module Aws::S3
|
|
|
1336
2807
|
#
|
|
1337
2808
|
# [1]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html
|
|
1338
2809
|
# @option options [String] :expected_bucket_owner
|
|
1339
|
-
# The account ID of the expected bucket owner. If the
|
|
1340
|
-
#
|
|
1341
|
-
# Forbidden` (access denied).
|
|
2810
|
+
# The account ID of the expected bucket owner. If the account ID that
|
|
2811
|
+
# you provide does not match the actual owner of the bucket, the request
|
|
2812
|
+
# fails with the HTTP status code `403 Forbidden` (access denied).
|
|
1342
2813
|
# @return [Types::RestoreObjectOutput]
|
|
1343
2814
|
def restore_object(options = {})
|
|
1344
2815
|
options = options.merge(
|
|
1345
2816
|
bucket: @bucket_name,
|
|
1346
2817
|
key: @key
|
|
1347
2818
|
)
|
|
1348
|
-
resp = Aws::Plugins::UserAgent.
|
|
2819
|
+
resp = Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
|
|
1349
2820
|
@client.restore_object(options)
|
|
1350
2821
|
end
|
|
1351
2822
|
resp.data
|
|
@@ -1473,7 +2944,7 @@ module Aws::S3
|
|
|
1473
2944
|
# request_payer: "requester", # accepts requester
|
|
1474
2945
|
# bypass_governance_retention: false,
|
|
1475
2946
|
# expected_bucket_owner: "AccountId",
|
|
1476
|
-
# checksum_algorithm: "CRC32", # accepts CRC32, CRC32C, SHA1, SHA256
|
|
2947
|
+
# checksum_algorithm: "CRC32", # accepts CRC32, CRC32C, SHA1, SHA256, CRC64NVME
|
|
1477
2948
|
# })
|
|
1478
2949
|
# @param options ({})
|
|
1479
2950
|
# @option options [String] :mfa
|
|
@@ -1481,14 +2952,35 @@ module Aws::S3
|
|
|
1481
2952
|
# space, and the value that is displayed on your authentication device.
|
|
1482
2953
|
# Required to permanently delete a versioned object if versioning is
|
|
1483
2954
|
# configured with MFA delete enabled.
|
|
2955
|
+
#
|
|
2956
|
+
# When performing the `DeleteObjects` operation on an MFA delete enabled
|
|
2957
|
+
# bucket, which attempts to delete the specified versioned objects, you
|
|
2958
|
+
# must include an MFA token. If you don't provide an MFA token, the
|
|
2959
|
+
# entire request will fail, even if there are non-versioned objects that
|
|
2960
|
+
# you are trying to delete. If you provide an invalid token, whether
|
|
2961
|
+
# there are versioned object keys in the request or not, the entire
|
|
2962
|
+
# Multi-Object Delete request will fail. For information about MFA
|
|
2963
|
+
# Delete, see [ MFA Delete][1] in the *Amazon S3 User Guide*.
|
|
2964
|
+
#
|
|
2965
|
+
# <note markdown="1"> This functionality is not supported for directory buckets.
|
|
2966
|
+
#
|
|
2967
|
+
# </note>
|
|
2968
|
+
#
|
|
2969
|
+
#
|
|
2970
|
+
#
|
|
2971
|
+
# [1]: https://docs.aws.amazon.com/AmazonS3/latest/dev/Versioning.html#MultiFactorAuthenticationDelete
|
|
1484
2972
|
# @option options [String] :request_payer
|
|
1485
2973
|
# Confirms that the requester knows that they will be charged for the
|
|
1486
2974
|
# request. Bucket owners need not specify this parameter in their
|
|
1487
|
-
# requests. If either the source or destination
|
|
1488
|
-
#
|
|
1489
|
-
#
|
|
1490
|
-
#
|
|
1491
|
-
#
|
|
2975
|
+
# requests. If either the source or destination S3 bucket has Requester
|
|
2976
|
+
# Pays enabled, the requester will pay for corresponding charges to copy
|
|
2977
|
+
# the object. For information about downloading objects from Requester
|
|
2978
|
+
# Pays buckets, see [Downloading Objects in Requester Pays Buckets][1]
|
|
2979
|
+
# in the *Amazon S3 User Guide*.
|
|
2980
|
+
#
|
|
2981
|
+
# <note markdown="1"> This functionality is not supported for directory buckets.
|
|
2982
|
+
#
|
|
2983
|
+
# </note>
|
|
1492
2984
|
#
|
|
1493
2985
|
#
|
|
1494
2986
|
#
|
|
@@ -1497,25 +2989,46 @@ module Aws::S3
|
|
|
1497
2989
|
# Specifies whether you want to delete this object even if it has a
|
|
1498
2990
|
# Governance-type Object Lock in place. To use this header, you must
|
|
1499
2991
|
# have the `s3:BypassGovernanceRetention` permission.
|
|
2992
|
+
#
|
|
2993
|
+
# <note markdown="1"> This functionality is not supported for directory buckets.
|
|
2994
|
+
#
|
|
2995
|
+
# </note>
|
|
1500
2996
|
# @option options [String] :expected_bucket_owner
|
|
1501
|
-
# The account ID of the expected bucket owner. If the
|
|
1502
|
-
#
|
|
1503
|
-
# Forbidden` (access denied).
|
|
2997
|
+
# The account ID of the expected bucket owner. If the account ID that
|
|
2998
|
+
# you provide does not match the actual owner of the bucket, the request
|
|
2999
|
+
# fails with the HTTP status code `403 Forbidden` (access denied).
|
|
1504
3000
|
# @option options [String] :checksum_algorithm
|
|
1505
3001
|
# Indicates the algorithm used to create the checksum for the object
|
|
1506
|
-
# when
|
|
1507
|
-
# functionality if
|
|
1508
|
-
# must be a corresponding `x-amz-checksum` or
|
|
1509
|
-
# sent. Otherwise, Amazon S3 fails the request
|
|
1510
|
-
# `400 Bad Request`.
|
|
1511
|
-
#
|
|
3002
|
+
# when you use the SDK. This header will not provide any additional
|
|
3003
|
+
# functionality if you don't use the SDK. When you send this header,
|
|
3004
|
+
# there must be a corresponding `x-amz-checksum-algorithm ` or
|
|
3005
|
+
# `x-amz-trailer` header sent. Otherwise, Amazon S3 fails the request
|
|
3006
|
+
# with the HTTP status code `400 Bad Request`.
|
|
3007
|
+
#
|
|
3008
|
+
# For the `x-amz-checksum-algorithm ` header, replace ` algorithm ` with
|
|
3009
|
+
# the supported algorithm from the following list:
|
|
3010
|
+
#
|
|
3011
|
+
# * `CRC32`
|
|
3012
|
+
#
|
|
3013
|
+
# * `CRC32C`
|
|
3014
|
+
#
|
|
3015
|
+
# * `CRC64NVME`
|
|
3016
|
+
#
|
|
3017
|
+
# * `SHA1`
|
|
3018
|
+
#
|
|
3019
|
+
# * `SHA256`
|
|
3020
|
+
#
|
|
3021
|
+
# For more information, see [Checking object integrity][1] in the
|
|
3022
|
+
# *Amazon S3 User Guide*.
|
|
3023
|
+
#
|
|
3024
|
+
# If the individual checksum value you provide through
|
|
3025
|
+
# `x-amz-checksum-algorithm ` doesn't match the checksum algorithm you
|
|
3026
|
+
# set through `x-amz-sdk-checksum-algorithm`, Amazon S3 fails the
|
|
3027
|
+
# request with a `BadDigest` error.
|
|
1512
3028
|
#
|
|
1513
3029
|
# If you provide an individual checksum, Amazon S3 ignores any provided
|
|
1514
3030
|
# `ChecksumAlgorithm` parameter.
|
|
1515
3031
|
#
|
|
1516
|
-
# This checksum algorithm must be the same for all parts and it match
|
|
1517
|
-
# the checksum value supplied in the `CreateMultipartUpload` request.
|
|
1518
|
-
#
|
|
1519
3032
|
#
|
|
1520
3033
|
#
|
|
1521
3034
|
# [1]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html
|
|
@@ -1531,7 +3044,7 @@ module Aws::S3
|
|
|
1531
3044
|
key: item.key
|
|
1532
3045
|
}
|
|
1533
3046
|
end
|
|
1534
|
-
Aws::Plugins::UserAgent.
|
|
3047
|
+
Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
|
|
1535
3048
|
batch[0].client.delete_objects(params)
|
|
1536
3049
|
end
|
|
1537
3050
|
end
|
|
@@ -1543,3 +3056,6 @@ module Aws::S3
|
|
|
1543
3056
|
end
|
|
1544
3057
|
end
|
|
1545
3058
|
end
|
|
3059
|
+
|
|
3060
|
+
# Load customizations if they exist
|
|
3061
|
+
require 'aws-sdk-s3/customizations/object_summary'
|