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