aws-sdk-s3 1.142.0 → 1.208.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +417 -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 +358 -106
- data/lib/aws-sdk-s3/bucket_acl.rb +10 -9
- data/lib/aws-sdk-s3/bucket_cors.rb +10 -9
- data/lib/aws-sdk-s3/bucket_lifecycle.rb +11 -6
- data/lib/aws-sdk-s3/bucket_lifecycle_configuration.rb +64 -7
- data/lib/aws-sdk-s3/bucket_logging.rb +5 -5
- data/lib/aws-sdk-s3/bucket_notification.rb +3 -3
- data/lib/aws-sdk-s3/bucket_policy.rb +14 -13
- data/lib/aws-sdk-s3/bucket_region_cache.rb +9 -5
- data/lib/aws-sdk-s3/bucket_request_payment.rb +6 -6
- data/lib/aws-sdk-s3/bucket_tagging.rb +7 -7
- data/lib/aws-sdk-s3/bucket_versioning.rb +47 -14
- data/lib/aws-sdk-s3/bucket_website.rb +7 -7
- data/lib/aws-sdk-s3/client.rb +5671 -2195
- data/lib/aws-sdk-s3/client_api.rb +665 -166
- data/lib/aws-sdk-s3/customizations/bucket.rb +1 -1
- data/lib/aws-sdk-s3/customizations/errors.rb +15 -2
- data/lib/aws-sdk-s3/customizations/object.rb +87 -91
- data/lib/aws-sdk-s3/customizations/object_summary.rb +5 -0
- data/lib/aws-sdk-s3/customizations/object_version.rb +13 -0
- data/lib/aws-sdk-s3/customizations.rb +28 -36
- data/lib/aws-sdk-s3/default_executor.rb +103 -0
- data/lib/aws-sdk-s3/encryption/client.rb +4 -4
- data/lib/aws-sdk-s3/encryption/default_cipher_provider.rb +2 -0
- data/lib/aws-sdk-s3/encryption/encrypt_handler.rb +2 -0
- data/lib/aws-sdk-s3/encryption/kms_cipher_provider.rb +4 -2
- data/lib/aws-sdk-s3/encryptionV2/client.rb +100 -25
- data/lib/aws-sdk-s3/encryptionV2/decrypt_handler.rb +7 -162
- data/lib/aws-sdk-s3/encryptionV2/decryption.rb +205 -0
- data/lib/aws-sdk-s3/encryptionV2/default_cipher_provider.rb +17 -0
- data/lib/aws-sdk-s3/encryptionV2/encrypt_handler.rb +2 -0
- data/lib/aws-sdk-s3/encryptionV2/io_encrypter.rb +2 -0
- data/lib/aws-sdk-s3/encryptionV2/kms_cipher_provider.rb +10 -2
- data/lib/aws-sdk-s3/encryptionV2/utils.rb +5 -0
- data/lib/aws-sdk-s3/encryptionV3/client.rb +885 -0
- data/lib/aws-sdk-s3/encryptionV3/decrypt_handler.rb +98 -0
- data/lib/aws-sdk-s3/encryptionV3/decryption.rb +244 -0
- data/lib/aws-sdk-s3/encryptionV3/default_cipher_provider.rb +159 -0
- data/lib/aws-sdk-s3/encryptionV3/default_key_provider.rb +35 -0
- data/lib/aws-sdk-s3/encryptionV3/encrypt_handler.rb +98 -0
- data/lib/aws-sdk-s3/encryptionV3/errors.rb +47 -0
- data/lib/aws-sdk-s3/encryptionV3/io_auth_decrypter.rb +60 -0
- data/lib/aws-sdk-s3/encryptionV3/io_decrypter.rb +35 -0
- data/lib/aws-sdk-s3/encryptionV3/io_encrypter.rb +84 -0
- data/lib/aws-sdk-s3/encryptionV3/key_provider.rb +28 -0
- data/lib/aws-sdk-s3/encryptionV3/kms_cipher_provider.rb +159 -0
- data/lib/aws-sdk-s3/encryptionV3/materials.rb +58 -0
- data/lib/aws-sdk-s3/encryptionV3/utils.rb +321 -0
- data/lib/aws-sdk-s3/encryption_v2.rb +1 -0
- data/lib/aws-sdk-s3/encryption_v3.rb +24 -0
- data/lib/aws-sdk-s3/endpoint_parameters.rb +37 -34
- data/lib/aws-sdk-s3/endpoint_provider.rb +572 -277
- data/lib/aws-sdk-s3/endpoints.rb +566 -1612
- data/lib/aws-sdk-s3/errors.rb +58 -0
- data/lib/aws-sdk-s3/express_credentials_provider.rb +27 -4
- data/lib/aws-sdk-s3/file_downloader.rb +192 -146
- data/lib/aws-sdk-s3/file_uploader.rb +10 -14
- data/lib/aws-sdk-s3/legacy_signer.rb +2 -1
- data/lib/aws-sdk-s3/multipart_download_error.rb +8 -0
- data/lib/aws-sdk-s3/multipart_file_uploader.rb +106 -102
- data/lib/aws-sdk-s3/multipart_stream_uploader.rb +99 -108
- data/lib/aws-sdk-s3/multipart_upload.rb +112 -12
- data/lib/aws-sdk-s3/multipart_upload_error.rb +3 -4
- data/lib/aws-sdk-s3/multipart_upload_part.rb +55 -39
- data/lib/aws-sdk-s3/object.rb +713 -227
- data/lib/aws-sdk-s3/object_acl.rb +15 -9
- data/lib/aws-sdk-s3/object_copier.rb +1 -1
- data/lib/aws-sdk-s3/object_multipart_copier.rb +12 -9
- data/lib/aws-sdk-s3/object_summary.rb +592 -173
- data/lib/aws-sdk-s3/object_version.rb +102 -17
- 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 +26 -213
- data/lib/aws-sdk-s3/plugins/express_session_auth.rb +19 -21
- data/lib/aws-sdk-s3/plugins/http_200_errors.rb +55 -18
- data/lib/aws-sdk-s3/plugins/md5s.rb +10 -71
- data/lib/aws-sdk-s3/plugins/s3_signer.rb +7 -2
- data/lib/aws-sdk-s3/plugins/streaming_retry.rb +5 -7
- data/lib/aws-sdk-s3/plugins/url_encoded_keys.rb +2 -1
- data/lib/aws-sdk-s3/presigner.rb +7 -5
- data/lib/aws-sdk-s3/resource.rb +53 -20
- data/lib/aws-sdk-s3/transfer_manager.rb +303 -0
- data/lib/aws-sdk-s3/types.rb +4738 -1542
- data/lib/aws-sdk-s3.rb +35 -31
- data/sig/bucket.rbs +231 -0
- data/sig/bucket_acl.rbs +78 -0
- data/sig/bucket_cors.rbs +69 -0
- data/sig/bucket_lifecycle.rbs +88 -0
- data/sig/bucket_lifecycle_configuration.rbs +115 -0
- data/sig/bucket_logging.rbs +76 -0
- data/sig/bucket_notification.rbs +114 -0
- data/sig/bucket_policy.rbs +59 -0
- data/sig/bucket_request_payment.rbs +54 -0
- data/sig/bucket_tagging.rbs +65 -0
- data/sig/bucket_versioning.rbs +77 -0
- data/sig/bucket_website.rbs +93 -0
- data/sig/client.rbs +2612 -0
- data/sig/customizations/bucket.rbs +19 -0
- data/sig/customizations/object.rbs +38 -0
- data/sig/customizations/object_summary.rbs +35 -0
- data/sig/errors.rbs +44 -0
- data/sig/multipart_upload.rbs +120 -0
- data/sig/multipart_upload_part.rbs +109 -0
- data/sig/object.rbs +464 -0
- data/sig/object_acl.rbs +86 -0
- data/sig/object_summary.rbs +347 -0
- data/sig/object_version.rbs +143 -0
- data/sig/resource.rbs +141 -0
- data/sig/types.rbs +2899 -0
- data/sig/waiters.rbs +95 -0
- metadata +58 -13
- data/lib/aws-sdk-s3/express_credentials_cache.rb +0 -30
- data/lib/aws-sdk-s3/plugins/skip_whole_multipart_get_checksums.rb +0 -31
data/lib/aws-sdk-s3/bucket.rb
CHANGED
|
@@ -41,6 +41,31 @@ module Aws::S3
|
|
|
41
41
|
data[:creation_date]
|
|
42
42
|
end
|
|
43
43
|
|
|
44
|
+
# `BucketRegion` indicates the Amazon Web Services region where the
|
|
45
|
+
# bucket is located. If the request contains at least one valid
|
|
46
|
+
# parameter, it is included in the response.
|
|
47
|
+
# @return [String]
|
|
48
|
+
def bucket_region
|
|
49
|
+
data[:bucket_region]
|
|
50
|
+
end
|
|
51
|
+
|
|
52
|
+
# The Amazon Resource Name (ARN) of the S3 bucket. ARNs uniquely
|
|
53
|
+
# identify Amazon Web Services resources across all of Amazon Web
|
|
54
|
+
# Services.
|
|
55
|
+
#
|
|
56
|
+
# <note markdown="1"> This parameter is only supported for S3 directory buckets. For more
|
|
57
|
+
# information, see [Using tags with directory buckets][1].
|
|
58
|
+
#
|
|
59
|
+
# </note>
|
|
60
|
+
#
|
|
61
|
+
#
|
|
62
|
+
#
|
|
63
|
+
# [1]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/directory-buckets-tagging.html
|
|
64
|
+
# @return [String]
|
|
65
|
+
def bucket_arn
|
|
66
|
+
data[:bucket_arn]
|
|
67
|
+
end
|
|
68
|
+
|
|
44
69
|
# @!endgroup
|
|
45
70
|
|
|
46
71
|
# @return [Client]
|
|
@@ -95,7 +120,7 @@ module Aws::S3
|
|
|
95
120
|
options, params = separate_params_and_options(options)
|
|
96
121
|
waiter = Waiters::BucketExists.new(options)
|
|
97
122
|
yield_waiter_and_warn(waiter, &block) if block_given?
|
|
98
|
-
Aws::Plugins::UserAgent.
|
|
123
|
+
Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
|
|
99
124
|
waiter.wait(params.merge(bucket: @name))
|
|
100
125
|
end
|
|
101
126
|
Bucket.new({
|
|
@@ -114,7 +139,7 @@ module Aws::S3
|
|
|
114
139
|
options, params = separate_params_and_options(options)
|
|
115
140
|
waiter = Waiters::BucketNotExists.new(options)
|
|
116
141
|
yield_waiter_and_warn(waiter, &block) if block_given?
|
|
117
|
-
Aws::Plugins::UserAgent.
|
|
142
|
+
Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
|
|
118
143
|
waiter.wait(params.merge(bucket: @name))
|
|
119
144
|
end
|
|
120
145
|
Bucket.new({
|
|
@@ -217,7 +242,7 @@ module Aws::S3
|
|
|
217
242
|
:retry
|
|
218
243
|
end
|
|
219
244
|
end
|
|
220
|
-
Aws::Plugins::UserAgent.
|
|
245
|
+
Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
|
|
221
246
|
Aws::Waiters::Waiter.new(options).wait({})
|
|
222
247
|
end
|
|
223
248
|
end
|
|
@@ -229,15 +254,21 @@ module Aws::S3
|
|
|
229
254
|
# bucket.create({
|
|
230
255
|
# acl: "private", # accepts private, public-read, public-read-write, authenticated-read
|
|
231
256
|
# create_bucket_configuration: {
|
|
232
|
-
# location_constraint: "af-south-1", # accepts af-south-1, ap-east-1, ap-northeast-1, ap-northeast-2, ap-northeast-3, ap-south-1, ap-south-2, ap-southeast-1, ap-southeast-2, ap-southeast-3, ca-central-1, cn-north-1, cn-northwest-1, EU, eu-central-1, eu-north-1, eu-south-1, eu-south-2, eu-west-1, eu-west-2, eu-west-3, me-south-1, sa-east-1, us-east-2, us-gov-east-1, us-gov-west-1, us-west-1, us-west-2
|
|
257
|
+
# location_constraint: "af-south-1", # accepts af-south-1, ap-east-1, ap-northeast-1, ap-northeast-2, ap-northeast-3, ap-south-1, ap-south-2, ap-southeast-1, ap-southeast-2, ap-southeast-3, ap-southeast-4, ap-southeast-5, ca-central-1, cn-north-1, cn-northwest-1, EU, eu-central-1, eu-central-2, eu-north-1, eu-south-1, eu-south-2, eu-west-1, eu-west-2, eu-west-3, il-central-1, me-central-1, me-south-1, sa-east-1, us-east-2, us-gov-east-1, us-gov-west-1, us-west-1, us-west-2
|
|
233
258
|
# location: {
|
|
234
|
-
# type: "AvailabilityZone", # accepts AvailabilityZone
|
|
259
|
+
# type: "AvailabilityZone", # accepts AvailabilityZone, LocalZone
|
|
235
260
|
# name: "LocationNameAsString",
|
|
236
261
|
# },
|
|
237
262
|
# bucket: {
|
|
238
|
-
# data_redundancy: "SingleAvailabilityZone", # accepts SingleAvailabilityZone
|
|
263
|
+
# data_redundancy: "SingleAvailabilityZone", # accepts SingleAvailabilityZone, SingleLocalZone
|
|
239
264
|
# type: "Directory", # accepts Directory
|
|
240
265
|
# },
|
|
266
|
+
# tags: [
|
|
267
|
+
# {
|
|
268
|
+
# key: "ObjectKey", # required
|
|
269
|
+
# value: "Value", # required
|
|
270
|
+
# },
|
|
271
|
+
# ],
|
|
241
272
|
# },
|
|
242
273
|
# grant_full_control: "GrantFullControl",
|
|
243
274
|
# grant_read: "GrantRead",
|
|
@@ -334,7 +365,7 @@ module Aws::S3
|
|
|
334
365
|
# @return [Types::CreateBucketOutput]
|
|
335
366
|
def create(options = {})
|
|
336
367
|
options = options.merge(bucket: @name)
|
|
337
|
-
resp = Aws::Plugins::UserAgent.
|
|
368
|
+
resp = Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
|
|
338
369
|
@client.create_bucket(options)
|
|
339
370
|
end
|
|
340
371
|
resp.data
|
|
@@ -359,7 +390,7 @@ module Aws::S3
|
|
|
359
390
|
# @return [EmptyStructure]
|
|
360
391
|
def delete(options = {})
|
|
361
392
|
options = options.merge(bucket: @name)
|
|
362
|
-
resp = Aws::Plugins::UserAgent.
|
|
393
|
+
resp = Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
|
|
363
394
|
@client.delete_bucket(options)
|
|
364
395
|
end
|
|
365
396
|
resp.data
|
|
@@ -373,6 +404,9 @@ module Aws::S3
|
|
|
373
404
|
# {
|
|
374
405
|
# key: "ObjectKey", # required
|
|
375
406
|
# version_id: "ObjectVersionId",
|
|
407
|
+
# etag: "ETag",
|
|
408
|
+
# last_modified_time: Time.now,
|
|
409
|
+
# size: 1,
|
|
376
410
|
# },
|
|
377
411
|
# ],
|
|
378
412
|
# quiet: false,
|
|
@@ -381,7 +415,7 @@ module Aws::S3
|
|
|
381
415
|
# request_payer: "requester", # accepts requester
|
|
382
416
|
# bypass_governance_retention: false,
|
|
383
417
|
# expected_bucket_owner: "AccountId",
|
|
384
|
-
# checksum_algorithm: "CRC32", # accepts CRC32, CRC32C, SHA1, SHA256
|
|
418
|
+
# checksum_algorithm: "CRC32", # accepts CRC32, CRC32C, SHA1, SHA256, CRC64NVME
|
|
385
419
|
# })
|
|
386
420
|
# @param [Hash] options ({})
|
|
387
421
|
# @option options [required, Types::Delete] :delete
|
|
@@ -447,22 +481,23 @@ module Aws::S3
|
|
|
447
481
|
# For the `x-amz-checksum-algorithm ` header, replace ` algorithm ` with
|
|
448
482
|
# the supported algorithm from the following list:
|
|
449
483
|
#
|
|
450
|
-
# * CRC32
|
|
484
|
+
# * `CRC32`
|
|
451
485
|
#
|
|
452
|
-
# * CRC32C
|
|
486
|
+
# * `CRC32C`
|
|
453
487
|
#
|
|
454
|
-
# *
|
|
488
|
+
# * `CRC64NVME`
|
|
455
489
|
#
|
|
456
|
-
# *
|
|
490
|
+
# * `SHA1`
|
|
491
|
+
#
|
|
492
|
+
# * `SHA256`
|
|
457
493
|
#
|
|
458
494
|
# For more information, see [Checking object integrity][1] in the
|
|
459
495
|
# *Amazon S3 User Guide*.
|
|
460
496
|
#
|
|
461
497
|
# If the individual checksum value you provide through
|
|
462
498
|
# `x-amz-checksum-algorithm ` doesn't match the checksum algorithm you
|
|
463
|
-
# set through `x-amz-sdk-checksum-algorithm`, Amazon S3
|
|
464
|
-
#
|
|
465
|
-
# that matches the provided value in `x-amz-checksum-algorithm `.
|
|
499
|
+
# set through `x-amz-sdk-checksum-algorithm`, Amazon S3 fails the
|
|
500
|
+
# request with a `BadDigest` error.
|
|
466
501
|
#
|
|
467
502
|
# If you provide an individual checksum, Amazon S3 ignores any provided
|
|
468
503
|
# `ChecksumAlgorithm` parameter.
|
|
@@ -473,7 +508,7 @@ module Aws::S3
|
|
|
473
508
|
# @return [Types::DeleteObjectsOutput]
|
|
474
509
|
def delete_objects(options = {})
|
|
475
510
|
options = options.merge(bucket: @name)
|
|
476
|
-
resp = Aws::Plugins::UserAgent.
|
|
511
|
+
resp = Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
|
|
477
512
|
@client.delete_objects(options)
|
|
478
513
|
end
|
|
479
514
|
resp.data
|
|
@@ -491,22 +526,26 @@ module Aws::S3
|
|
|
491
526
|
# content_length: 1,
|
|
492
527
|
# content_md5: "ContentMD5",
|
|
493
528
|
# content_type: "ContentType",
|
|
494
|
-
# checksum_algorithm: "CRC32", # accepts CRC32, CRC32C, SHA1, SHA256
|
|
529
|
+
# checksum_algorithm: "CRC32", # accepts CRC32, CRC32C, SHA1, SHA256, CRC64NVME
|
|
495
530
|
# checksum_crc32: "ChecksumCRC32",
|
|
496
531
|
# checksum_crc32c: "ChecksumCRC32C",
|
|
532
|
+
# checksum_crc64nvme: "ChecksumCRC64NVME",
|
|
497
533
|
# checksum_sha1: "ChecksumSHA1",
|
|
498
534
|
# checksum_sha256: "ChecksumSHA256",
|
|
499
535
|
# expires: Time.now,
|
|
536
|
+
# if_match: "IfMatch",
|
|
537
|
+
# if_none_match: "IfNoneMatch",
|
|
500
538
|
# grant_full_control: "GrantFullControl",
|
|
501
539
|
# grant_read: "GrantRead",
|
|
502
540
|
# grant_read_acp: "GrantReadACP",
|
|
503
541
|
# grant_write_acp: "GrantWriteACP",
|
|
504
542
|
# key: "ObjectKey", # required
|
|
543
|
+
# write_offset_bytes: 1,
|
|
505
544
|
# metadata: {
|
|
506
545
|
# "MetadataKey" => "MetadataValue",
|
|
507
546
|
# },
|
|
508
|
-
# server_side_encryption: "AES256", # accepts AES256, aws:kms, aws:kms:dsse
|
|
509
|
-
# storage_class: "STANDARD", # accepts STANDARD, REDUCED_REDUNDANCY, STANDARD_IA, ONEZONE_IA, INTELLIGENT_TIERING, GLACIER, DEEP_ARCHIVE, OUTPOSTS, GLACIER_IR, SNOW, EXPRESS_ONEZONE
|
|
547
|
+
# server_side_encryption: "AES256", # accepts AES256, aws:fsx, aws:kms, aws:kms:dsse
|
|
548
|
+
# storage_class: "STANDARD", # accepts STANDARD, REDUCED_REDUNDANCY, STANDARD_IA, ONEZONE_IA, INTELLIGENT_TIERING, GLACIER, DEEP_ARCHIVE, OUTPOSTS, GLACIER_IR, SNOW, EXPRESS_ONEZONE, FSX_OPENZFS, FSX_ONTAP
|
|
510
549
|
# website_redirect_location: "WebsiteRedirectLocation",
|
|
511
550
|
# sse_customer_algorithm: "SSECustomerAlgorithm",
|
|
512
551
|
# sse_customer_key: "SSECustomerKey",
|
|
@@ -597,7 +636,7 @@ module Aws::S3
|
|
|
597
636
|
#
|
|
598
637
|
# [1]: https://www.rfc-editor.org/rfc/rfc9110.html#name-content-length
|
|
599
638
|
# @option options [String] :content_md5
|
|
600
|
-
# The
|
|
639
|
+
# The Base64 encoded 128-bit `MD5` digest of the message (without the
|
|
601
640
|
# headers) according to RFC 1864. This header can be used as a message
|
|
602
641
|
# integrity check to verify that the data is the same data that was
|
|
603
642
|
# originally sent. Although it is optional, we recommend using the
|
|
@@ -605,10 +644,11 @@ module Aws::S3
|
|
|
605
644
|
# information about REST request authentication, see [REST
|
|
606
645
|
# Authentication][1].
|
|
607
646
|
#
|
|
608
|
-
# <note markdown="1"> The `Content-MD5` header is required
|
|
609
|
-
# object with a retention period configured
|
|
610
|
-
#
|
|
611
|
-
# Object Lock
|
|
647
|
+
# <note markdown="1"> The `Content-MD5` or `x-amz-sdk-checksum-algorithm` header is required
|
|
648
|
+
# for any request to upload an object with a retention period configured
|
|
649
|
+
# using Amazon S3 Object Lock. For more information, see [Uploading
|
|
650
|
+
# objects to an Object Lock enabled bucket ][2] in the *Amazon S3 User
|
|
651
|
+
# Guide*.
|
|
612
652
|
#
|
|
613
653
|
# </note>
|
|
614
654
|
#
|
|
@@ -619,7 +659,7 @@ module Aws::S3
|
|
|
619
659
|
#
|
|
620
660
|
#
|
|
621
661
|
# [1]: https://docs.aws.amazon.com/AmazonS3/latest/dev/RESTAuthentication.html
|
|
622
|
-
# [2]: https://docs.aws.amazon.com/AmazonS3/latest/
|
|
662
|
+
# [2]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/object-lock-managing.html#object-lock-put-object
|
|
623
663
|
# @option options [String] :content_type
|
|
624
664
|
# A standard MIME type describing the format of the contents. For more
|
|
625
665
|
# information, see
|
|
@@ -639,37 +679,45 @@ module Aws::S3
|
|
|
639
679
|
# For the `x-amz-checksum-algorithm ` header, replace ` algorithm ` with
|
|
640
680
|
# the supported algorithm from the following list:
|
|
641
681
|
#
|
|
642
|
-
# * CRC32
|
|
682
|
+
# * `CRC32`
|
|
683
|
+
#
|
|
684
|
+
# * `CRC32C`
|
|
643
685
|
#
|
|
644
|
-
# *
|
|
686
|
+
# * `CRC64NVME`
|
|
645
687
|
#
|
|
646
|
-
# * SHA1
|
|
688
|
+
# * `SHA1`
|
|
647
689
|
#
|
|
648
|
-
# * SHA256
|
|
690
|
+
# * `SHA256`
|
|
649
691
|
#
|
|
650
692
|
# For more information, see [Checking object integrity][1] in the
|
|
651
693
|
# *Amazon S3 User Guide*.
|
|
652
694
|
#
|
|
653
695
|
# If the individual checksum value you provide through
|
|
654
696
|
# `x-amz-checksum-algorithm ` doesn't match the checksum algorithm you
|
|
655
|
-
# set through `x-amz-sdk-checksum-algorithm`, Amazon S3
|
|
656
|
-
#
|
|
657
|
-
# that matches the provided value in `x-amz-checksum-algorithm `.
|
|
697
|
+
# set through `x-amz-sdk-checksum-algorithm`, Amazon S3 fails the
|
|
698
|
+
# request with a `BadDigest` error.
|
|
658
699
|
#
|
|
659
|
-
# <note markdown="1">
|
|
660
|
-
#
|
|
700
|
+
# <note markdown="1"> The `Content-MD5` or `x-amz-sdk-checksum-algorithm` header is required
|
|
701
|
+
# for any request to upload an object with a retention period configured
|
|
702
|
+
# using Amazon S3 Object Lock. For more information, see [Uploading
|
|
703
|
+
# objects to an Object Lock enabled bucket ][2] in the *Amazon S3 User
|
|
704
|
+
# Guide*.
|
|
661
705
|
#
|
|
662
706
|
# </note>
|
|
663
707
|
#
|
|
708
|
+
# For directory buckets, when you use Amazon Web Services SDKs, `CRC32`
|
|
709
|
+
# is the default checksum algorithm that's used for performance.
|
|
710
|
+
#
|
|
664
711
|
#
|
|
665
712
|
#
|
|
666
713
|
# [1]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html
|
|
714
|
+
# [2]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/object-lock-managing.html#object-lock-put-object
|
|
667
715
|
# @option options [String] :checksum_crc32
|
|
668
716
|
# This header can be used as a data integrity check to verify that the
|
|
669
717
|
# data received is the same data that was originally sent. This header
|
|
670
|
-
# specifies the
|
|
671
|
-
# more information, see [Checking object integrity][1] in the
|
|
672
|
-
# User Guide*.
|
|
718
|
+
# specifies the Base64 encoded, 32-bit `CRC32` checksum of the object.
|
|
719
|
+
# For more information, see [Checking object integrity][1] in the
|
|
720
|
+
# *Amazon S3 User Guide*.
|
|
673
721
|
#
|
|
674
722
|
#
|
|
675
723
|
#
|
|
@@ -677,17 +725,28 @@ module Aws::S3
|
|
|
677
725
|
# @option options [String] :checksum_crc32c
|
|
678
726
|
# This header can be used as a data integrity check to verify that the
|
|
679
727
|
# data received is the same data that was originally sent. This header
|
|
680
|
-
# specifies the
|
|
728
|
+
# specifies the Base64 encoded, 32-bit `CRC32C` checksum of the object.
|
|
681
729
|
# For more information, see [Checking object integrity][1] in the
|
|
682
730
|
# *Amazon S3 User Guide*.
|
|
683
731
|
#
|
|
684
732
|
#
|
|
685
733
|
#
|
|
686
734
|
# [1]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html
|
|
735
|
+
# @option options [String] :checksum_crc64nvme
|
|
736
|
+
# This header can be used as a data integrity check to verify that the
|
|
737
|
+
# data received is the same data that was originally sent. This header
|
|
738
|
+
# specifies the Base64 encoded, 64-bit `CRC64NVME` checksum of the
|
|
739
|
+
# object. The `CRC64NVME` checksum is always a full object checksum. For
|
|
740
|
+
# more information, see [Checking object integrity in the Amazon S3 User
|
|
741
|
+
# Guide][1].
|
|
742
|
+
#
|
|
743
|
+
#
|
|
744
|
+
#
|
|
745
|
+
# [1]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html
|
|
687
746
|
# @option options [String] :checksum_sha1
|
|
688
747
|
# This header can be used as a data integrity check to verify that the
|
|
689
748
|
# data received is the same data that was originally sent. This header
|
|
690
|
-
# specifies the
|
|
749
|
+
# specifies the Base64 encoded, 160-bit `SHA1` digest of the object. For
|
|
691
750
|
# more information, see [Checking object integrity][1] in the *Amazon S3
|
|
692
751
|
# User Guide*.
|
|
693
752
|
#
|
|
@@ -697,7 +756,7 @@ module Aws::S3
|
|
|
697
756
|
# @option options [String] :checksum_sha256
|
|
698
757
|
# This header can be used as a data integrity check to verify that the
|
|
699
758
|
# data received is the same data that was originally sent. This header
|
|
700
|
-
# specifies the
|
|
759
|
+
# specifies the Base64 encoded, 256-bit `SHA256` digest of the object.
|
|
701
760
|
# For more information, see [Checking object integrity][1] in the
|
|
702
761
|
# *Amazon S3 User Guide*.
|
|
703
762
|
#
|
|
@@ -712,6 +771,43 @@ module Aws::S3
|
|
|
712
771
|
#
|
|
713
772
|
#
|
|
714
773
|
# [1]: https://www.rfc-editor.org/rfc/rfc7234#section-5.3
|
|
774
|
+
# @option options [String] :if_match
|
|
775
|
+
# Uploads the object only if the ETag (entity tag) value provided during
|
|
776
|
+
# the WRITE operation matches the ETag of the object in S3. If the ETag
|
|
777
|
+
# values do not match, the operation returns a `412 Precondition Failed`
|
|
778
|
+
# error.
|
|
779
|
+
#
|
|
780
|
+
# If a conflicting operation occurs during the upload S3 returns a `409
|
|
781
|
+
# ConditionalRequestConflict` response. On a 409 failure you should
|
|
782
|
+
# fetch the object's ETag and retry the upload.
|
|
783
|
+
#
|
|
784
|
+
# Expects the ETag value as a string.
|
|
785
|
+
#
|
|
786
|
+
# For more information about conditional requests, see [RFC 7232][1], or
|
|
787
|
+
# [Conditional requests][2] in the *Amazon S3 User Guide*.
|
|
788
|
+
#
|
|
789
|
+
#
|
|
790
|
+
#
|
|
791
|
+
# [1]: https://tools.ietf.org/html/rfc7232
|
|
792
|
+
# [2]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/conditional-requests.html
|
|
793
|
+
# @option options [String] :if_none_match
|
|
794
|
+
# Uploads the object only if the object key name does not already exist
|
|
795
|
+
# in the bucket specified. Otherwise, Amazon S3 returns a `412
|
|
796
|
+
# Precondition Failed` error.
|
|
797
|
+
#
|
|
798
|
+
# If a conflicting operation occurs during the upload S3 returns a `409
|
|
799
|
+
# ConditionalRequestConflict` response. On a 409 failure you should
|
|
800
|
+
# retry the upload.
|
|
801
|
+
#
|
|
802
|
+
# Expects the '*' (asterisk) character.
|
|
803
|
+
#
|
|
804
|
+
# For more information about conditional requests, see [RFC 7232][1], or
|
|
805
|
+
# [Conditional requests][2] in the *Amazon S3 User Guide*.
|
|
806
|
+
#
|
|
807
|
+
#
|
|
808
|
+
#
|
|
809
|
+
# [1]: https://tools.ietf.org/html/rfc7232
|
|
810
|
+
# [2]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/conditional-requests.html
|
|
715
811
|
# @option options [String] :grant_full_control
|
|
716
812
|
# Gives the grantee READ, READ\_ACP, and WRITE\_ACP permissions on the
|
|
717
813
|
# object.
|
|
@@ -747,32 +843,89 @@ module Aws::S3
|
|
|
747
843
|
# </note>
|
|
748
844
|
# @option options [required, String] :key
|
|
749
845
|
# Object key for which the PUT action was initiated.
|
|
846
|
+
# @option options [Integer] :write_offset_bytes
|
|
847
|
+
# Specifies the offset for appending data to existing objects in bytes.
|
|
848
|
+
# The offset must be equal to the size of the existing object being
|
|
849
|
+
# appended to. If no object exists, setting this header to 0 will create
|
|
850
|
+
# a new object.
|
|
851
|
+
#
|
|
852
|
+
# <note markdown="1"> This functionality is only supported for objects in the Amazon S3
|
|
853
|
+
# Express One Zone storage class in directory buckets.
|
|
854
|
+
#
|
|
855
|
+
# </note>
|
|
750
856
|
# @option options [Hash<String,String>] :metadata
|
|
751
857
|
# A map of metadata to store with the object in S3.
|
|
752
858
|
# @option options [String] :server_side_encryption
|
|
753
859
|
# The server-side encryption algorithm that was used when you store this
|
|
754
|
-
# object in Amazon S3
|
|
755
|
-
#
|
|
756
|
-
#
|
|
757
|
-
#
|
|
758
|
-
#
|
|
759
|
-
#
|
|
760
|
-
#
|
|
761
|
-
#
|
|
762
|
-
#
|
|
763
|
-
#
|
|
764
|
-
#
|
|
765
|
-
#
|
|
766
|
-
#
|
|
767
|
-
#
|
|
768
|
-
#
|
|
769
|
-
#
|
|
770
|
-
#
|
|
771
|
-
#
|
|
860
|
+
# object in Amazon S3 or Amazon FSx.
|
|
861
|
+
#
|
|
862
|
+
# * <b>General purpose buckets </b> - You have four mutually exclusive
|
|
863
|
+
# options to protect data using server-side encryption in Amazon S3,
|
|
864
|
+
# depending on how you choose to manage the encryption keys.
|
|
865
|
+
# Specifically, the encryption key options are Amazon S3 managed keys
|
|
866
|
+
# (SSE-S3), Amazon Web Services KMS keys (SSE-KMS or DSSE-KMS), and
|
|
867
|
+
# customer-provided keys (SSE-C). Amazon S3 encrypts data with
|
|
868
|
+
# server-side encryption by using Amazon S3 managed keys (SSE-S3) by
|
|
869
|
+
# default. You can optionally tell Amazon S3 to encrypt data at rest
|
|
870
|
+
# by using server-side encryption with other key options. For more
|
|
871
|
+
# information, see [Using Server-Side Encryption][1] in the *Amazon S3
|
|
872
|
+
# User Guide*.
|
|
873
|
+
#
|
|
874
|
+
# * <b>Directory buckets </b> - For directory buckets, there are only
|
|
875
|
+
# two supported options for server-side encryption: server-side
|
|
876
|
+
# encryption with Amazon S3 managed keys (SSE-S3) (`AES256`) and
|
|
877
|
+
# server-side encryption with KMS keys (SSE-KMS) (`aws:kms`). We
|
|
878
|
+
# recommend that the bucket's default encryption uses the desired
|
|
879
|
+
# encryption configuration and you don't override the bucket default
|
|
880
|
+
# encryption in your `CreateSession` requests or `PUT` object
|
|
881
|
+
# requests. Then, new objects are automatically encrypted with the
|
|
882
|
+
# desired encryption settings. For more information, see [Protecting
|
|
883
|
+
# data with server-side encryption][2] in the *Amazon S3 User Guide*.
|
|
884
|
+
# For more information about the encryption overriding behaviors in
|
|
885
|
+
# directory buckets, see [Specifying server-side encryption with KMS
|
|
886
|
+
# for new object uploads][3].
|
|
887
|
+
#
|
|
888
|
+
# In the Zonal endpoint API calls (except [CopyObject][4] and
|
|
889
|
+
# [UploadPartCopy][5]) using the REST API, the encryption request
|
|
890
|
+
# headers must match the encryption settings that are specified in the
|
|
891
|
+
# `CreateSession` request. You can't override the values of the
|
|
892
|
+
# encryption settings (`x-amz-server-side-encryption`,
|
|
893
|
+
# `x-amz-server-side-encryption-aws-kms-key-id`,
|
|
894
|
+
# `x-amz-server-side-encryption-context`, and
|
|
895
|
+
# `x-amz-server-side-encryption-bucket-key-enabled`) that are
|
|
896
|
+
# specified in the `CreateSession` request. You don't need to
|
|
897
|
+
# explicitly specify these encryption settings values in Zonal
|
|
898
|
+
# endpoint API calls, and Amazon S3 will use the encryption settings
|
|
899
|
+
# values from the `CreateSession` request to protect new objects in
|
|
900
|
+
# the directory bucket.
|
|
901
|
+
#
|
|
902
|
+
# <note markdown="1"> When you use the CLI or the Amazon Web Services SDKs, for
|
|
903
|
+
# `CreateSession`, the session token refreshes automatically to avoid
|
|
904
|
+
# service interruptions when a session expires. The CLI or the Amazon
|
|
905
|
+
# Web Services SDKs use the bucket's default encryption configuration
|
|
906
|
+
# for the `CreateSession` request. It's not supported to override the
|
|
907
|
+
# encryption settings values in the `CreateSession` request. So in the
|
|
908
|
+
# Zonal endpoint API calls (except [CopyObject][4] and
|
|
909
|
+
# [UploadPartCopy][5]), the encryption request headers must match the
|
|
910
|
+
# default encryption configuration of the directory bucket.
|
|
911
|
+
#
|
|
912
|
+
# </note>
|
|
913
|
+
#
|
|
914
|
+
# * <b>S3 access points for Amazon FSx </b> - When accessing data stored
|
|
915
|
+
# in Amazon FSx file systems using S3 access points, the only valid
|
|
916
|
+
# server side encryption option is `aws:fsx`. All Amazon FSx file
|
|
917
|
+
# systems have encryption configured by default and are encrypted at
|
|
918
|
+
# rest. Data is automatically encrypted before being written to the
|
|
919
|
+
# file system, and automatically decrypted as it is read. These
|
|
920
|
+
# processes are handled transparently by Amazon FSx.
|
|
772
921
|
#
|
|
773
922
|
#
|
|
774
923
|
#
|
|
775
924
|
# [1]: https://docs.aws.amazon.com/AmazonS3/latest/dev/UsingServerSideEncryption.html
|
|
925
|
+
# [2]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-express-serv-side-encryption.html
|
|
926
|
+
# [3]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-express-specifying-kms-encryption.html
|
|
927
|
+
# [4]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_CopyObject.html
|
|
928
|
+
# [5]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_UploadPartCopy.html
|
|
776
929
|
# @option options [String] :storage_class
|
|
777
930
|
# By default, Amazon S3 uses the STANDARD Storage Class to store newly
|
|
778
931
|
# created objects. The STANDARD storage class provides high durability
|
|
@@ -780,8 +933,9 @@ module Aws::S3
|
|
|
780
933
|
# a different Storage Class. For more information, see [Storage
|
|
781
934
|
# Classes][1] in the *Amazon S3 User Guide*.
|
|
782
935
|
#
|
|
783
|
-
# <note markdown="1"> *
|
|
784
|
-
#
|
|
936
|
+
# <note markdown="1"> * Directory buckets only support `EXPRESS_ONEZONE` (the S3 Express One
|
|
937
|
+
# Zone storage class) in Availability Zones and `ONEZONE_IA` (the S3
|
|
938
|
+
# One Zone-Infrequent Access storage class) in Dedicated Local Zones.
|
|
785
939
|
#
|
|
786
940
|
# * Amazon S3 on Outposts only uses the OUTPOSTS Storage Class.
|
|
787
941
|
#
|
|
@@ -846,44 +1000,83 @@ module Aws::S3
|
|
|
846
1000
|
#
|
|
847
1001
|
# </note>
|
|
848
1002
|
# @option options [String] :ssekms_key_id
|
|
849
|
-
#
|
|
850
|
-
#
|
|
851
|
-
#
|
|
852
|
-
#
|
|
853
|
-
#
|
|
854
|
-
#
|
|
855
|
-
# x-amz-server-side-encryption
|
|
856
|
-
#
|
|
857
|
-
#
|
|
858
|
-
#
|
|
1003
|
+
# Specifies the KMS key ID (Key ID, Key ARN, or Key Alias) to use for
|
|
1004
|
+
# object encryption. If the KMS key doesn't exist in the same account
|
|
1005
|
+
# that's issuing the command, you must use the full Key ARN not the Key
|
|
1006
|
+
# ID.
|
|
1007
|
+
#
|
|
1008
|
+
# **General purpose buckets** - If you specify
|
|
1009
|
+
# `x-amz-server-side-encryption` with `aws:kms` or `aws:kms:dsse`, this
|
|
1010
|
+
# header specifies the ID (Key ID, Key ARN, or Key Alias) of the KMS key
|
|
1011
|
+
# to use. If you specify `x-amz-server-side-encryption:aws:kms` or
|
|
1012
|
+
# `x-amz-server-side-encryption:aws:kms:dsse`, but do not provide
|
|
1013
|
+
# `x-amz-server-side-encryption-aws-kms-key-id`, Amazon S3 uses the
|
|
1014
|
+
# Amazon Web Services managed key (`aws/s3`) to protect the data.
|
|
1015
|
+
#
|
|
1016
|
+
# **Directory buckets** - To encrypt data using SSE-KMS, it's
|
|
1017
|
+
# recommended to specify the `x-amz-server-side-encryption` header to
|
|
1018
|
+
# `aws:kms`. Then, the `x-amz-server-side-encryption-aws-kms-key-id`
|
|
1019
|
+
# header implicitly uses the bucket's default KMS customer managed key
|
|
1020
|
+
# ID. If you want to explicitly set the `
|
|
1021
|
+
# x-amz-server-side-encryption-aws-kms-key-id` header, it must match the
|
|
1022
|
+
# bucket's default customer managed key (using key ID or ARN, not
|
|
1023
|
+
# alias). Your SSE-KMS configuration can only support 1 [customer
|
|
1024
|
+
# managed key][1] per directory bucket's lifetime. The [Amazon Web
|
|
1025
|
+
# Services managed key][2] (`aws/s3`) isn't supported. Incorrect key
|
|
1026
|
+
# specification results in an HTTP `400 Bad Request` error.
|
|
1027
|
+
#
|
|
1028
|
+
#
|
|
1029
|
+
#
|
|
1030
|
+
# [1]: https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#customer-cmk
|
|
1031
|
+
# [2]: https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#aws-managed-cmk
|
|
1032
|
+
# @option options [String] :ssekms_encryption_context
|
|
1033
|
+
# Specifies the Amazon Web Services KMS Encryption Context as an
|
|
1034
|
+
# additional encryption context to use for object encryption. The value
|
|
1035
|
+
# of this header is a Base64 encoded string of a UTF-8 encoded JSON,
|
|
1036
|
+
# which contains the encryption context as key-value pairs. This value
|
|
1037
|
+
# is stored as object metadata and automatically gets passed on to
|
|
1038
|
+
# Amazon Web Services KMS for future `GetObject` operations on this
|
|
1039
|
+
# object.
|
|
859
1040
|
#
|
|
860
|
-
#
|
|
1041
|
+
# **General purpose buckets** - This value must be explicitly added
|
|
1042
|
+
# during `CopyObject` operations if you want an additional encryption
|
|
1043
|
+
# context for your object. For more information, see [Encryption
|
|
1044
|
+
# context][1] in the *Amazon S3 User Guide*.
|
|
861
1045
|
#
|
|
862
|
-
#
|
|
863
|
-
#
|
|
864
|
-
#
|
|
865
|
-
#
|
|
866
|
-
# string holding JSON with the encryption context key-value pairs. This
|
|
867
|
-
# value is stored as object metadata and automatically gets passed on to
|
|
868
|
-
# Amazon Web Services KMS for future `GetObject` or `CopyObject`
|
|
869
|
-
# operations on this object. This value must be explicitly added during
|
|
870
|
-
# `CopyObject` operations.
|
|
1046
|
+
# **Directory buckets** - You can optionally provide an explicit
|
|
1047
|
+
# encryption context value. The value must match the default encryption
|
|
1048
|
+
# context - the bucket Amazon Resource Name (ARN). An additional
|
|
1049
|
+
# encryption context value is not supported.
|
|
871
1050
|
#
|
|
872
|
-
# <note markdown="1"> This functionality is not supported for directory buckets.
|
|
873
1051
|
#
|
|
874
|
-
#
|
|
1052
|
+
#
|
|
1053
|
+
# [1]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/UsingKMSEncryption.html#encryption-context
|
|
875
1054
|
# @option options [Boolean] :bucket_key_enabled
|
|
876
1055
|
# Specifies whether Amazon S3 should use an S3 Bucket Key for object
|
|
877
1056
|
# encryption with server-side encryption using Key Management Service
|
|
878
|
-
# (KMS) keys (SSE-KMS).
|
|
879
|
-
# to use an S3 Bucket Key for object encryption with SSE-KMS.
|
|
1057
|
+
# (KMS) keys (SSE-KMS).
|
|
880
1058
|
#
|
|
881
|
-
#
|
|
882
|
-
#
|
|
1059
|
+
# **General purpose buckets** - Setting this header to `true` causes
|
|
1060
|
+
# Amazon S3 to use an S3 Bucket Key for object encryption with SSE-KMS.
|
|
1061
|
+
# Also, specifying this header with a PUT action doesn't affect
|
|
1062
|
+
# bucket-level settings for S3 Bucket Key.
|
|
883
1063
|
#
|
|
884
|
-
#
|
|
1064
|
+
# **Directory buckets** - S3 Bucket Keys are always enabled for `GET`
|
|
1065
|
+
# and `PUT` operations in a directory bucket and can’t be disabled. S3
|
|
1066
|
+
# Bucket Keys aren't supported, when you copy SSE-KMS encrypted objects
|
|
1067
|
+
# from general purpose buckets to directory buckets, from directory
|
|
1068
|
+
# buckets to general purpose buckets, or between directory buckets,
|
|
1069
|
+
# through [CopyObject][1], [UploadPartCopy][2], [the Copy operation in
|
|
1070
|
+
# Batch Operations][3], or [the import jobs][4]. In this case, Amazon S3
|
|
1071
|
+
# makes a call to KMS every time a copy request is made for a
|
|
1072
|
+
# KMS-encrypted object.
|
|
885
1073
|
#
|
|
886
|
-
#
|
|
1074
|
+
#
|
|
1075
|
+
#
|
|
1076
|
+
# [1]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_CopyObject.html
|
|
1077
|
+
# [2]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_UploadPartCopy.html
|
|
1078
|
+
# [3]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/directory-buckets-objects-Batch-Ops
|
|
1079
|
+
# [4]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/create-import-job
|
|
887
1080
|
# @option options [String] :request_payer
|
|
888
1081
|
# Confirms that the requester knows that they will be charged for the
|
|
889
1082
|
# request. Bucket owners need not specify this parameter in their
|
|
@@ -939,7 +1132,7 @@ module Aws::S3
|
|
|
939
1132
|
# @return [Object]
|
|
940
1133
|
def put_object(options = {})
|
|
941
1134
|
options = options.merge(bucket: @name)
|
|
942
|
-
Aws::Plugins::UserAgent.
|
|
1135
|
+
Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
|
|
943
1136
|
@client.put_object(options)
|
|
944
1137
|
end
|
|
945
1138
|
Object.new(
|
|
@@ -1013,17 +1206,34 @@ module Aws::S3
|
|
|
1013
1206
|
# beginning of the key. The keys that are grouped under `CommonPrefixes`
|
|
1014
1207
|
# result element are not returned elsewhere in the response.
|
|
1015
1208
|
#
|
|
1209
|
+
# `CommonPrefixes` is filtered out from results if it is not
|
|
1210
|
+
# lexicographically greater than the key-marker.
|
|
1211
|
+
#
|
|
1016
1212
|
# <note markdown="1"> **Directory buckets** - For directory buckets, `/` is the only
|
|
1017
1213
|
# supported delimiter.
|
|
1018
1214
|
#
|
|
1019
1215
|
# </note>
|
|
1020
1216
|
# @option options [String] :encoding_type
|
|
1021
|
-
#
|
|
1022
|
-
#
|
|
1023
|
-
# Unicode character
|
|
1024
|
-
# characters, such as characters with an ASCII value from
|
|
1025
|
-
# characters that
|
|
1026
|
-
# parameter to request that Amazon S3 encode the keys in the
|
|
1217
|
+
# Encoding type used by Amazon S3 to encode the [object keys][1] in the
|
|
1218
|
+
# response. Responses are encoded only in UTF-8. An object key can
|
|
1219
|
+
# contain any Unicode character. However, the XML 1.0 parser can't
|
|
1220
|
+
# parse certain characters, such as characters with an ASCII value from
|
|
1221
|
+
# 0 to 10. For characters that aren't supported in XML 1.0, you can add
|
|
1222
|
+
# this parameter to request that Amazon S3 encode the keys in the
|
|
1223
|
+
# response. For more information about characters to avoid in object key
|
|
1224
|
+
# names, see [Object key naming guidelines][2].
|
|
1225
|
+
#
|
|
1226
|
+
# <note markdown="1"> When using the URL encoding type, non-ASCII characters that are used
|
|
1227
|
+
# in an object's key name will be percent-encoded according to UTF-8
|
|
1228
|
+
# code values. For example, the object `test_file(3).png` will appear as
|
|
1229
|
+
# `test_file%283%29.png`.
|
|
1230
|
+
#
|
|
1231
|
+
# </note>
|
|
1232
|
+
#
|
|
1233
|
+
#
|
|
1234
|
+
#
|
|
1235
|
+
# [1]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/object-keys.html
|
|
1236
|
+
# [2]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/object-keys.html#object-key-guidelines
|
|
1027
1237
|
# @option options [String] :key_marker
|
|
1028
1238
|
# Specifies the multipart upload after which listing should begin.
|
|
1029
1239
|
#
|
|
@@ -1097,7 +1307,7 @@ module Aws::S3
|
|
|
1097
1307
|
def multipart_uploads(options = {})
|
|
1098
1308
|
batches = Enumerator.new do |y|
|
|
1099
1309
|
options = options.merge(bucket: @name)
|
|
1100
|
-
resp = Aws::Plugins::UserAgent.
|
|
1310
|
+
resp = Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
|
|
1101
1311
|
@client.list_multipart_uploads(options)
|
|
1102
1312
|
end
|
|
1103
1313
|
resp.each_page do |page|
|
|
@@ -1155,13 +1365,30 @@ module Aws::S3
|
|
|
1155
1365
|
# in `CommonPrefixes`. These groups are counted as one result against
|
|
1156
1366
|
# the `max-keys` limitation. These keys are not returned elsewhere in
|
|
1157
1367
|
# the response.
|
|
1368
|
+
#
|
|
1369
|
+
# `CommonPrefixes` is filtered out from results if it is not
|
|
1370
|
+
# lexicographically greater than the key-marker.
|
|
1158
1371
|
# @option options [String] :encoding_type
|
|
1159
|
-
#
|
|
1160
|
-
#
|
|
1161
|
-
# Unicode character
|
|
1162
|
-
# characters, such as characters with an ASCII value from
|
|
1163
|
-
# characters that
|
|
1164
|
-
# parameter to request that Amazon S3 encode the keys in the
|
|
1372
|
+
# Encoding type used by Amazon S3 to encode the [object keys][1] in the
|
|
1373
|
+
# response. Responses are encoded only in UTF-8. An object key can
|
|
1374
|
+
# contain any Unicode character. However, the XML 1.0 parser can't
|
|
1375
|
+
# parse certain characters, such as characters with an ASCII value from
|
|
1376
|
+
# 0 to 10. For characters that aren't supported in XML 1.0, you can add
|
|
1377
|
+
# this parameter to request that Amazon S3 encode the keys in the
|
|
1378
|
+
# response. For more information about characters to avoid in object key
|
|
1379
|
+
# names, see [Object key naming guidelines][2].
|
|
1380
|
+
#
|
|
1381
|
+
# <note markdown="1"> When using the URL encoding type, non-ASCII characters that are used
|
|
1382
|
+
# in an object's key name will be percent-encoded according to UTF-8
|
|
1383
|
+
# code values. For example, the object `test_file(3).png` will appear as
|
|
1384
|
+
# `test_file%283%29.png`.
|
|
1385
|
+
#
|
|
1386
|
+
# </note>
|
|
1387
|
+
#
|
|
1388
|
+
#
|
|
1389
|
+
#
|
|
1390
|
+
# [1]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/object-keys.html
|
|
1391
|
+
# [2]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/object-keys.html#object-key-guidelines
|
|
1165
1392
|
# @option options [String] :key_marker
|
|
1166
1393
|
# Specifies the key to start with when listing objects in a bucket.
|
|
1167
1394
|
# @option options [String] :prefix
|
|
@@ -1200,7 +1427,7 @@ module Aws::S3
|
|
|
1200
1427
|
def object_versions(options = {})
|
|
1201
1428
|
batches = Enumerator.new do |y|
|
|
1202
1429
|
options = options.merge(bucket: @name)
|
|
1203
|
-
resp = Aws::Plugins::UserAgent.
|
|
1430
|
+
resp = Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
|
|
1204
1431
|
@client.list_object_versions(options)
|
|
1205
1432
|
end
|
|
1206
1433
|
resp.each_page do |page|
|
|
@@ -1236,6 +1463,9 @@ module Aws::S3
|
|
|
1236
1463
|
# @option options [String] :delimiter
|
|
1237
1464
|
# A delimiter is a character that you use to group keys.
|
|
1238
1465
|
#
|
|
1466
|
+
# `CommonPrefixes` is filtered out from results if it is not
|
|
1467
|
+
# lexicographically greater than the `StartAfter` value.
|
|
1468
|
+
#
|
|
1239
1469
|
# <note markdown="1"> * **Directory buckets** - For directory buckets, `/` is the only
|
|
1240
1470
|
# supported delimiter.
|
|
1241
1471
|
#
|
|
@@ -1252,7 +1482,26 @@ module Aws::S3
|
|
|
1252
1482
|
#
|
|
1253
1483
|
# [1]: https://docs.aws.amazon.com/AmazonS3/latest/dev/mpuoverview.html
|
|
1254
1484
|
# @option options [String] :encoding_type
|
|
1255
|
-
# Encoding type used by Amazon S3 to encode object keys in the
|
|
1485
|
+
# Encoding type used by Amazon S3 to encode the [object keys][1] in the
|
|
1486
|
+
# response. Responses are encoded only in UTF-8. An object key can
|
|
1487
|
+
# contain any Unicode character. However, the XML 1.0 parser can't
|
|
1488
|
+
# parse certain characters, such as characters with an ASCII value from
|
|
1489
|
+
# 0 to 10. For characters that aren't supported in XML 1.0, you can add
|
|
1490
|
+
# this parameter to request that Amazon S3 encode the keys in the
|
|
1491
|
+
# response. For more information about characters to avoid in object key
|
|
1492
|
+
# names, see [Object key naming guidelines][2].
|
|
1493
|
+
#
|
|
1494
|
+
# <note markdown="1"> When using the URL encoding type, non-ASCII characters that are used
|
|
1495
|
+
# in an object's key name will be percent-encoded according to UTF-8
|
|
1496
|
+
# code values. For example, the object `test_file(3).png` will appear as
|
|
1497
|
+
# `test_file%283%29.png`.
|
|
1498
|
+
#
|
|
1499
|
+
# </note>
|
|
1500
|
+
#
|
|
1501
|
+
#
|
|
1502
|
+
#
|
|
1503
|
+
# [1]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/object-keys.html
|
|
1504
|
+
# [2]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/object-keys.html#object-key-guidelines
|
|
1256
1505
|
# @option options [String] :prefix
|
|
1257
1506
|
# Limits the response to keys that begin with the specified prefix.
|
|
1258
1507
|
#
|
|
@@ -1300,7 +1549,7 @@ module Aws::S3
|
|
|
1300
1549
|
def objects(options = {})
|
|
1301
1550
|
batches = Enumerator.new do |y|
|
|
1302
1551
|
options = options.merge(bucket: @name)
|
|
1303
|
-
resp = Aws::Plugins::UserAgent.
|
|
1552
|
+
resp = Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
|
|
1304
1553
|
@client.list_objects_v2(options)
|
|
1305
1554
|
end
|
|
1306
1555
|
resp.each_page do |page|
|
|
@@ -1409,3 +1658,6 @@ module Aws::S3
|
|
|
1409
1658
|
class Collection < Aws::Resources::Collection; end
|
|
1410
1659
|
end
|
|
1411
1660
|
end
|
|
1661
|
+
|
|
1662
|
+
# Load customizations if they exist
|
|
1663
|
+
require 'aws-sdk-s3/customizations/bucket'
|