aws-sdk-s3 1.150.0 → 1.169.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 +110 -0
- data/VERSION +1 -1
- data/lib/aws-sdk-s3/access_grants_credentials_provider.rb +12 -3
- data/lib/aws-sdk-s3/bucket.rb +252 -88
- data/lib/aws-sdk-s3/bucket_acl.rb +3 -3
- data/lib/aws-sdk-s3/bucket_cors.rb +4 -4
- data/lib/aws-sdk-s3/bucket_lifecycle.rb +4 -4
- data/lib/aws-sdk-s3/bucket_lifecycle_configuration.rb +42 -5
- data/lib/aws-sdk-s3/bucket_logging.rb +3 -3
- data/lib/aws-sdk-s3/bucket_notification.rb +3 -3
- data/lib/aws-sdk-s3/bucket_policy.rb +8 -8
- data/lib/aws-sdk-s3/bucket_request_payment.rb +3 -3
- data/lib/aws-sdk-s3/bucket_tagging.rb +4 -4
- data/lib/aws-sdk-s3/bucket_versioning.rb +5 -5
- data/lib/aws-sdk-s3/bucket_website.rb +4 -4
- data/lib/aws-sdk-s3/client.rb +1685 -668
- data/lib/aws-sdk-s3/client_api.rb +49 -4
- data/lib/aws-sdk-s3/customizations/bucket.rb +1 -1
- data/lib/aws-sdk-s3/customizations/object.rb +11 -5
- 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 +24 -38
- 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 +21 -18
- data/lib/aws-sdk-s3/endpoint_provider.rb +1 -0
- data/lib/aws-sdk-s3/endpoints.rb +416 -1614
- data/lib/aws-sdk-s3/errors.rb +3 -0
- data/lib/aws-sdk-s3/file_downloader.rb +1 -1
- data/lib/aws-sdk-s3/file_uploader.rb +1 -1
- data/lib/aws-sdk-s3/multipart_stream_uploader.rb +1 -1
- data/lib/aws-sdk-s3/multipart_upload.rb +31 -8
- data/lib/aws-sdk-s3/multipart_upload_part.rb +11 -11
- data/lib/aws-sdk-s3/object.rb +441 -158
- data/lib/aws-sdk-s3/object_acl.rb +3 -3
- data/lib/aws-sdk-s3/object_copier.rb +1 -1
- data/lib/aws-sdk-s3/object_summary.rb +403 -134
- data/lib/aws-sdk-s3/object_version.rb +53 -13
- data/lib/aws-sdk-s3/plugins/access_grants.rb +75 -5
- data/lib/aws-sdk-s3/plugins/endpoints.rb +24 -212
- data/lib/aws-sdk-s3/plugins/express_session_auth.rb +7 -1
- data/lib/aws-sdk-s3/plugins/http_200_errors.rb +53 -16
- data/lib/aws-sdk-s3/resource.rb +37 -11
- data/lib/aws-sdk-s3/types.rb +1106 -401
- data/lib/aws-sdk-s3.rb +35 -31
- data/sig/bucket.rbs +4 -0
- data/sig/bucket_lifecycle_configuration.rbs +7 -3
- data/sig/client.rbs +49 -5
- data/sig/multipart_upload.rbs +1 -0
- data/sig/object.rbs +7 -0
- data/sig/object_summary.rbs +1 -0
- data/sig/object_version.rbs +6 -0
- data/sig/resource.rbs +7 -1
- data/sig/types.rbs +36 -2
- data/sig/waiters.rbs +12 -0
- metadata +7 -6
data/lib/aws-sdk-s3/bucket.rb
CHANGED
@@ -41,6 +41,14 @@ 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
|
+
|
44
52
|
# @!endgroup
|
45
53
|
|
46
54
|
# @return [Client]
|
@@ -95,7 +103,7 @@ module Aws::S3
|
|
95
103
|
options, params = separate_params_and_options(options)
|
96
104
|
waiter = Waiters::BucketExists.new(options)
|
97
105
|
yield_waiter_and_warn(waiter, &block) if block_given?
|
98
|
-
Aws::Plugins::UserAgent.
|
106
|
+
Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
|
99
107
|
waiter.wait(params.merge(bucket: @name))
|
100
108
|
end
|
101
109
|
Bucket.new({
|
@@ -114,7 +122,7 @@ module Aws::S3
|
|
114
122
|
options, params = separate_params_and_options(options)
|
115
123
|
waiter = Waiters::BucketNotExists.new(options)
|
116
124
|
yield_waiter_and_warn(waiter, &block) if block_given?
|
117
|
-
Aws::Plugins::UserAgent.
|
125
|
+
Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
|
118
126
|
waiter.wait(params.merge(bucket: @name))
|
119
127
|
end
|
120
128
|
Bucket.new({
|
@@ -217,7 +225,7 @@ module Aws::S3
|
|
217
225
|
:retry
|
218
226
|
end
|
219
227
|
end
|
220
|
-
Aws::Plugins::UserAgent.
|
228
|
+
Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
|
221
229
|
Aws::Waiters::Waiter.new(options).wait({})
|
222
230
|
end
|
223
231
|
end
|
@@ -334,7 +342,7 @@ module Aws::S3
|
|
334
342
|
# @return [Types::CreateBucketOutput]
|
335
343
|
def create(options = {})
|
336
344
|
options = options.merge(bucket: @name)
|
337
|
-
resp = Aws::Plugins::UserAgent.
|
345
|
+
resp = Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
|
338
346
|
@client.create_bucket(options)
|
339
347
|
end
|
340
348
|
resp.data
|
@@ -359,7 +367,7 @@ module Aws::S3
|
|
359
367
|
# @return [EmptyStructure]
|
360
368
|
def delete(options = {})
|
361
369
|
options = options.merge(bucket: @name)
|
362
|
-
resp = Aws::Plugins::UserAgent.
|
370
|
+
resp = Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
|
363
371
|
@client.delete_bucket(options)
|
364
372
|
end
|
365
373
|
resp.data
|
@@ -447,13 +455,13 @@ module Aws::S3
|
|
447
455
|
# For the `x-amz-checksum-algorithm ` header, replace ` algorithm ` with
|
448
456
|
# the supported algorithm from the following list:
|
449
457
|
#
|
450
|
-
# * CRC32
|
458
|
+
# * `CRC32`
|
451
459
|
#
|
452
|
-
# * CRC32C
|
460
|
+
# * `CRC32C`
|
453
461
|
#
|
454
|
-
# * SHA1
|
462
|
+
# * `SHA1`
|
455
463
|
#
|
456
|
-
# * SHA256
|
464
|
+
# * `SHA256`
|
457
465
|
#
|
458
466
|
# For more information, see [Checking object integrity][1] in the
|
459
467
|
# *Amazon S3 User Guide*.
|
@@ -473,7 +481,7 @@ module Aws::S3
|
|
473
481
|
# @return [Types::DeleteObjectsOutput]
|
474
482
|
def delete_objects(options = {})
|
475
483
|
options = options.merge(bucket: @name)
|
476
|
-
resp = Aws::Plugins::UserAgent.
|
484
|
+
resp = Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
|
477
485
|
@client.delete_objects(options)
|
478
486
|
end
|
479
487
|
resp.data
|
@@ -497,6 +505,7 @@ module Aws::S3
|
|
497
505
|
# checksum_sha1: "ChecksumSHA1",
|
498
506
|
# checksum_sha256: "ChecksumSHA256",
|
499
507
|
# expires: Time.now,
|
508
|
+
# if_none_match: "IfNoneMatch",
|
500
509
|
# grant_full_control: "GrantFullControl",
|
501
510
|
# grant_read: "GrantRead",
|
502
511
|
# grant_read_acp: "GrantReadACP",
|
@@ -605,10 +614,11 @@ module Aws::S3
|
|
605
614
|
# information about REST request authentication, see [REST
|
606
615
|
# Authentication][1].
|
607
616
|
#
|
608
|
-
# <note markdown="1"> The `Content-MD5` header is required
|
609
|
-
# object with a retention period configured
|
610
|
-
#
|
611
|
-
# Object Lock
|
617
|
+
# <note markdown="1"> The `Content-MD5` or `x-amz-sdk-checksum-algorithm` header is required
|
618
|
+
# for any request to upload an object with a retention period configured
|
619
|
+
# using Amazon S3 Object Lock. For more information, see [Uploading
|
620
|
+
# objects to an Object Lock enabled bucket ][2] in the *Amazon S3 User
|
621
|
+
# Guide*.
|
612
622
|
#
|
613
623
|
# </note>
|
614
624
|
#
|
@@ -619,7 +629,7 @@ module Aws::S3
|
|
619
629
|
#
|
620
630
|
#
|
621
631
|
# [1]: https://docs.aws.amazon.com/AmazonS3/latest/dev/RESTAuthentication.html
|
622
|
-
# [2]: https://docs.aws.amazon.com/AmazonS3/latest/
|
632
|
+
# [2]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/object-lock-managing.html#object-lock-put-object
|
623
633
|
# @option options [String] :content_type
|
624
634
|
# A standard MIME type describing the format of the contents. For more
|
625
635
|
# information, see
|
@@ -639,13 +649,13 @@ module Aws::S3
|
|
639
649
|
# For the `x-amz-checksum-algorithm ` header, replace ` algorithm ` with
|
640
650
|
# the supported algorithm from the following list:
|
641
651
|
#
|
642
|
-
# * CRC32
|
652
|
+
# * `CRC32`
|
643
653
|
#
|
644
|
-
# * CRC32C
|
654
|
+
# * `CRC32C`
|
645
655
|
#
|
646
|
-
# * SHA1
|
656
|
+
# * `SHA1`
|
647
657
|
#
|
648
|
-
# * SHA256
|
658
|
+
# * `SHA256`
|
649
659
|
#
|
650
660
|
# For more information, see [Checking object integrity][1] in the
|
651
661
|
# *Amazon S3 User Guide*.
|
@@ -656,20 +666,27 @@ module Aws::S3
|
|
656
666
|
# provided `ChecksumAlgorithm` parameter and uses the checksum algorithm
|
657
667
|
# that matches the provided value in `x-amz-checksum-algorithm `.
|
658
668
|
#
|
659
|
-
# <note markdown="1">
|
660
|
-
#
|
669
|
+
# <note markdown="1"> The `Content-MD5` or `x-amz-sdk-checksum-algorithm` header is required
|
670
|
+
# for any request to upload an object with a retention period configured
|
671
|
+
# using Amazon S3 Object Lock. For more information, see [Uploading
|
672
|
+
# objects to an Object Lock enabled bucket ][2] in the *Amazon S3 User
|
673
|
+
# Guide*.
|
661
674
|
#
|
662
675
|
# </note>
|
663
676
|
#
|
677
|
+
# For directory buckets, when you use Amazon Web Services SDKs, `CRC32`
|
678
|
+
# is the default checksum algorithm that's used for performance.
|
679
|
+
#
|
664
680
|
#
|
665
681
|
#
|
666
682
|
# [1]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html
|
683
|
+
# [2]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/object-lock-managing.html#object-lock-put-object
|
667
684
|
# @option options [String] :checksum_crc32
|
668
685
|
# This header can be used as a data integrity check to verify that the
|
669
686
|
# data received is the same data that was originally sent. This header
|
670
|
-
# specifies the base64-encoded, 32-bit
|
671
|
-
# more information, see [Checking object integrity][1] in the
|
672
|
-
# User Guide*.
|
687
|
+
# specifies the base64-encoded, 32-bit CRC-32 checksum of the object.
|
688
|
+
# For more information, see [Checking object integrity][1] in the
|
689
|
+
# *Amazon S3 User Guide*.
|
673
690
|
#
|
674
691
|
#
|
675
692
|
#
|
@@ -677,7 +694,7 @@ module Aws::S3
|
|
677
694
|
# @option options [String] :checksum_crc32c
|
678
695
|
# This header can be used as a data integrity check to verify that the
|
679
696
|
# data received is the same data that was originally sent. This header
|
680
|
-
# specifies the base64-encoded, 32-bit
|
697
|
+
# specifies the base64-encoded, 32-bit CRC-32C checksum of the object.
|
681
698
|
# For more information, see [Checking object integrity][1] in the
|
682
699
|
# *Amazon S3 User Guide*.
|
683
700
|
#
|
@@ -712,6 +729,24 @@ module Aws::S3
|
|
712
729
|
#
|
713
730
|
#
|
714
731
|
# [1]: https://www.rfc-editor.org/rfc/rfc7234#section-5.3
|
732
|
+
# @option options [String] :if_none_match
|
733
|
+
# Uploads the object only if the object key name does not already exist
|
734
|
+
# in the bucket specified. Otherwise, Amazon S3 returns a `412
|
735
|
+
# Precondition Failed` error.
|
736
|
+
#
|
737
|
+
# If a conflicting operation occurs during the upload S3 returns a `409
|
738
|
+
# ConditionalRequestConflict` response. On a 409 failure you should
|
739
|
+
# retry the upload.
|
740
|
+
#
|
741
|
+
# Expects the '*' (asterisk) character.
|
742
|
+
#
|
743
|
+
# For more information about conditional requests, see [RFC 7232][1], or
|
744
|
+
# [Conditional requests][2] in the *Amazon S3 User Guide*.
|
745
|
+
#
|
746
|
+
#
|
747
|
+
#
|
748
|
+
# [1]: https://tools.ietf.org/html/rfc7232
|
749
|
+
# [2]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/conditional-requests.html
|
715
750
|
# @option options [String] :grant_full_control
|
716
751
|
# Gives the grantee READ, READ\_ACP, and WRITE\_ACP permissions on the
|
717
752
|
# object.
|
@@ -754,25 +789,65 @@ module Aws::S3
|
|
754
789
|
# object in Amazon S3 (for example, `AES256`, `aws:kms`,
|
755
790
|
# `aws:kms:dsse`).
|
756
791
|
#
|
757
|
-
# <b>General purpose buckets </b> - You have four mutually exclusive
|
758
|
-
#
|
759
|
-
#
|
760
|
-
#
|
761
|
-
#
|
762
|
-
#
|
763
|
-
#
|
764
|
-
#
|
765
|
-
#
|
766
|
-
#
|
767
|
-
#
|
768
|
-
#
|
769
|
-
# <b>Directory buckets </b> - For directory buckets, only
|
770
|
-
#
|
771
|
-
#
|
792
|
+
# * <b>General purpose buckets </b> - You have four mutually exclusive
|
793
|
+
# options to protect data using server-side encryption in Amazon S3,
|
794
|
+
# depending on how you choose to manage the encryption keys.
|
795
|
+
# Specifically, the encryption key options are Amazon S3 managed keys
|
796
|
+
# (SSE-S3), Amazon Web Services KMS keys (SSE-KMS or DSSE-KMS), and
|
797
|
+
# customer-provided keys (SSE-C). Amazon S3 encrypts data with
|
798
|
+
# server-side encryption by using Amazon S3 managed keys (SSE-S3) by
|
799
|
+
# default. You can optionally tell Amazon S3 to encrypt data at rest
|
800
|
+
# by using server-side encryption with other key options. For more
|
801
|
+
# information, see [Using Server-Side Encryption][1] in the *Amazon S3
|
802
|
+
# User Guide*.
|
803
|
+
#
|
804
|
+
# * <b>Directory buckets </b> - For directory buckets, there are only
|
805
|
+
# two supported options for server-side encryption: server-side
|
806
|
+
# encryption with Amazon S3 managed keys (SSE-S3) (`AES256`) and
|
807
|
+
# server-side encryption with KMS keys (SSE-KMS) (`aws:kms`). We
|
808
|
+
# recommend that the bucket's default encryption uses the desired
|
809
|
+
# encryption configuration and you don't override the bucket default
|
810
|
+
# encryption in your `CreateSession` requests or `PUT` object
|
811
|
+
# requests. Then, new objects are automatically encrypted with the
|
812
|
+
# desired encryption settings. For more information, see [Protecting
|
813
|
+
# data with server-side encryption][2] in the *Amazon S3 User Guide*.
|
814
|
+
# For more information about the encryption overriding behaviors in
|
815
|
+
# directory buckets, see [Specifying server-side encryption with KMS
|
816
|
+
# for new object uploads][3].
|
817
|
+
#
|
818
|
+
# In the Zonal endpoint API calls (except [CopyObject][4] and
|
819
|
+
# [UploadPartCopy][5]) using the REST API, the encryption request
|
820
|
+
# headers must match the encryption settings that are specified in the
|
821
|
+
# `CreateSession` request. You can't override the values of the
|
822
|
+
# encryption settings (`x-amz-server-side-encryption`,
|
823
|
+
# `x-amz-server-side-encryption-aws-kms-key-id`,
|
824
|
+
# `x-amz-server-side-encryption-context`, and
|
825
|
+
# `x-amz-server-side-encryption-bucket-key-enabled`) that are
|
826
|
+
# specified in the `CreateSession` request. You don't need to
|
827
|
+
# explicitly specify these encryption settings values in Zonal
|
828
|
+
# endpoint API calls, and Amazon S3 will use the encryption settings
|
829
|
+
# values from the `CreateSession` request to protect new objects in
|
830
|
+
# the directory bucket.
|
831
|
+
#
|
832
|
+
# <note markdown="1"> When you use the CLI or the Amazon Web Services SDKs, for
|
833
|
+
# `CreateSession`, the session token refreshes automatically to avoid
|
834
|
+
# service interruptions when a session expires. The CLI or the Amazon
|
835
|
+
# Web Services SDKs use the bucket's default encryption configuration
|
836
|
+
# for the `CreateSession` request. It's not supported to override the
|
837
|
+
# encryption settings values in the `CreateSession` request. So in the
|
838
|
+
# Zonal endpoint API calls (except [CopyObject][4] and
|
839
|
+
# [UploadPartCopy][5]), the encryption request headers must match the
|
840
|
+
# default encryption configuration of the directory bucket.
|
841
|
+
#
|
842
|
+
# </note>
|
772
843
|
#
|
773
844
|
#
|
774
845
|
#
|
775
846
|
# [1]: https://docs.aws.amazon.com/AmazonS3/latest/dev/UsingServerSideEncryption.html
|
847
|
+
# [2]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-express-serv-side-encryption.html
|
848
|
+
# [3]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-express-specifying-kms-encryption.html
|
849
|
+
# [4]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_CopyObject.html
|
850
|
+
# [5]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_UploadPartCopy.html
|
776
851
|
# @option options [String] :storage_class
|
777
852
|
# By default, Amazon S3 uses the STANDARD Storage Class to store newly
|
778
853
|
# created objects. The STANDARD storage class provides high durability
|
@@ -846,44 +921,86 @@ module Aws::S3
|
|
846
921
|
#
|
847
922
|
# </note>
|
848
923
|
# @option options [String] :ssekms_key_id
|
849
|
-
#
|
850
|
-
#
|
851
|
-
#
|
852
|
-
#
|
853
|
-
#
|
854
|
-
#
|
855
|
-
# x-amz-server-side-encryption
|
856
|
-
#
|
857
|
-
#
|
858
|
-
#
|
924
|
+
# Specifies the KMS key ID (Key ID, Key ARN, or Key Alias) to use for
|
925
|
+
# object encryption. If the KMS key doesn't exist in the same account
|
926
|
+
# that's issuing the command, you must use the full Key ARN not the Key
|
927
|
+
# ID.
|
928
|
+
#
|
929
|
+
# **General purpose buckets** - If you specify
|
930
|
+
# `x-amz-server-side-encryption` with `aws:kms` or `aws:kms:dsse`, this
|
931
|
+
# header specifies the ID (Key ID, Key ARN, or Key Alias) of the KMS key
|
932
|
+
# to use. If you specify `x-amz-server-side-encryption:aws:kms` or
|
933
|
+
# `x-amz-server-side-encryption:aws:kms:dsse`, but do not provide
|
934
|
+
# `x-amz-server-side-encryption-aws-kms-key-id`, Amazon S3 uses the
|
935
|
+
# Amazon Web Services managed key (`aws/s3`) to protect the data.
|
936
|
+
#
|
937
|
+
# **Directory buckets** - If you specify `x-amz-server-side-encryption`
|
938
|
+
# with `aws:kms`, the ` x-amz-server-side-encryption-aws-kms-key-id`
|
939
|
+
# header is implicitly assigned the ID of the KMS symmetric encryption
|
940
|
+
# customer managed key that's configured for your directory bucket's
|
941
|
+
# default encryption setting. If you want to specify the `
|
942
|
+
# x-amz-server-side-encryption-aws-kms-key-id` header explicitly, you
|
943
|
+
# can only specify it with the ID (Key ID or Key ARN) of the KMS
|
944
|
+
# customer managed key that's configured for your directory bucket's
|
945
|
+
# default encryption setting. Otherwise, you get an HTTP `400 Bad
|
946
|
+
# Request` error. Only use the key ID or key ARN. The key alias format
|
947
|
+
# of the KMS key isn't supported. Your SSE-KMS configuration can only
|
948
|
+
# support 1 [customer managed key][1] per directory bucket for the
|
949
|
+
# lifetime of the bucket. The [Amazon Web Services managed key][2]
|
950
|
+
# (`aws/s3`) isn't supported.
|
951
|
+
#
|
952
|
+
#
|
953
|
+
#
|
954
|
+
# [1]: https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#customer-cmk
|
955
|
+
# [2]: https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#aws-managed-cmk
|
956
|
+
# @option options [String] :ssekms_encryption_context
|
957
|
+
# Specifies the Amazon Web Services KMS Encryption Context as an
|
958
|
+
# additional encryption context to use for object encryption. The value
|
959
|
+
# of this header is a Base64-encoded string of a UTF-8 encoded JSON,
|
960
|
+
# which contains the encryption context as key-value pairs. This value
|
961
|
+
# is stored as object metadata and automatically gets passed on to
|
962
|
+
# Amazon Web Services KMS for future `GetObject` operations on this
|
963
|
+
# object.
|
859
964
|
#
|
860
|
-
#
|
965
|
+
# **General purpose buckets** - This value must be explicitly added
|
966
|
+
# during `CopyObject` operations if you want an additional encryption
|
967
|
+
# context for your object. For more information, see [Encryption
|
968
|
+
# context][1] in the *Amazon S3 User Guide*.
|
861
969
|
#
|
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.
|
970
|
+
# **Directory buckets** - You can optionally provide an explicit
|
971
|
+
# encryption context value. The value must match the default encryption
|
972
|
+
# context - the bucket Amazon Resource Name (ARN). An additional
|
973
|
+
# encryption context value is not supported.
|
871
974
|
#
|
872
|
-
# <note markdown="1"> This functionality is not supported for directory buckets.
|
873
975
|
#
|
874
|
-
#
|
976
|
+
#
|
977
|
+
# [1]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/UsingKMSEncryption.html#encryption-context
|
875
978
|
# @option options [Boolean] :bucket_key_enabled
|
876
979
|
# Specifies whether Amazon S3 should use an S3 Bucket Key for object
|
877
980
|
# 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.
|
981
|
+
# (KMS) keys (SSE-KMS).
|
880
982
|
#
|
881
|
-
#
|
882
|
-
#
|
983
|
+
# **General purpose buckets** - Setting this header to `true` causes
|
984
|
+
# Amazon S3 to use an S3 Bucket Key for object encryption with SSE-KMS.
|
985
|
+
# Also, specifying this header with a PUT action doesn't affect
|
986
|
+
# bucket-level settings for S3 Bucket Key.
|
883
987
|
#
|
884
|
-
#
|
988
|
+
# **Directory buckets** - S3 Bucket Keys are always enabled for `GET`
|
989
|
+
# and `PUT` operations in a directory bucket and can’t be disabled. S3
|
990
|
+
# Bucket Keys aren't supported, when you copy SSE-KMS encrypted objects
|
991
|
+
# from general purpose buckets to directory buckets, from directory
|
992
|
+
# buckets to general purpose buckets, or between directory buckets,
|
993
|
+
# through [CopyObject][1], [UploadPartCopy][2], [the Copy operation in
|
994
|
+
# Batch Operations][3], or [the import jobs][4]. In this case, Amazon S3
|
995
|
+
# makes a call to KMS every time a copy request is made for a
|
996
|
+
# KMS-encrypted object.
|
885
997
|
#
|
886
|
-
#
|
998
|
+
#
|
999
|
+
#
|
1000
|
+
# [1]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_CopyObject.html
|
1001
|
+
# [2]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_UploadPartCopy.html
|
1002
|
+
# [3]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/directory-buckets-objects-Batch-Ops
|
1003
|
+
# [4]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/create-import-job
|
887
1004
|
# @option options [String] :request_payer
|
888
1005
|
# Confirms that the requester knows that they will be charged for the
|
889
1006
|
# request. Bucket owners need not specify this parameter in their
|
@@ -939,7 +1056,7 @@ module Aws::S3
|
|
939
1056
|
# @return [Object]
|
940
1057
|
def put_object(options = {})
|
941
1058
|
options = options.merge(bucket: @name)
|
942
|
-
Aws::Plugins::UserAgent.
|
1059
|
+
Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
|
943
1060
|
@client.put_object(options)
|
944
1061
|
end
|
945
1062
|
Object.new(
|
@@ -1018,12 +1135,26 @@ module Aws::S3
|
|
1018
1135
|
#
|
1019
1136
|
# </note>
|
1020
1137
|
# @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
|
1138
|
+
# Encoding type used by Amazon S3 to encode the [object keys][1] in the
|
1139
|
+
# response. Responses are encoded only in UTF-8. An object key can
|
1140
|
+
# contain any Unicode character. However, the XML 1.0 parser can't
|
1141
|
+
# parse certain characters, such as characters with an ASCII value from
|
1142
|
+
# 0 to 10. For characters that aren't supported in XML 1.0, you can add
|
1143
|
+
# this parameter to request that Amazon S3 encode the keys in the
|
1144
|
+
# response. For more information about characters to avoid in object key
|
1145
|
+
# names, see [Object key naming guidelines][2].
|
1146
|
+
#
|
1147
|
+
# <note markdown="1"> When using the URL encoding type, non-ASCII characters that are used
|
1148
|
+
# in an object's key name will be percent-encoded according to UTF-8
|
1149
|
+
# code values. For example, the object `test_file(3).png` will appear as
|
1150
|
+
# `test_file%283%29.png`.
|
1151
|
+
#
|
1152
|
+
# </note>
|
1153
|
+
#
|
1154
|
+
#
|
1155
|
+
#
|
1156
|
+
# [1]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/object-keys.html
|
1157
|
+
# [2]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/object-keys.html#object-key-guidelines
|
1027
1158
|
# @option options [String] :key_marker
|
1028
1159
|
# Specifies the multipart upload after which listing should begin.
|
1029
1160
|
#
|
@@ -1097,7 +1228,7 @@ module Aws::S3
|
|
1097
1228
|
def multipart_uploads(options = {})
|
1098
1229
|
batches = Enumerator.new do |y|
|
1099
1230
|
options = options.merge(bucket: @name)
|
1100
|
-
resp = Aws::Plugins::UserAgent.
|
1231
|
+
resp = Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
|
1101
1232
|
@client.list_multipart_uploads(options)
|
1102
1233
|
end
|
1103
1234
|
resp.each_page do |page|
|
@@ -1156,12 +1287,26 @@ module Aws::S3
|
|
1156
1287
|
# the `max-keys` limitation. These keys are not returned elsewhere in
|
1157
1288
|
# the response.
|
1158
1289
|
# @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
|
1290
|
+
# Encoding type used by Amazon S3 to encode the [object keys][1] in the
|
1291
|
+
# response. Responses are encoded only in UTF-8. An object key can
|
1292
|
+
# contain any Unicode character. However, the XML 1.0 parser can't
|
1293
|
+
# parse certain characters, such as characters with an ASCII value from
|
1294
|
+
# 0 to 10. For characters that aren't supported in XML 1.0, you can add
|
1295
|
+
# this parameter to request that Amazon S3 encode the keys in the
|
1296
|
+
# response. For more information about characters to avoid in object key
|
1297
|
+
# names, see [Object key naming guidelines][2].
|
1298
|
+
#
|
1299
|
+
# <note markdown="1"> When using the URL encoding type, non-ASCII characters that are used
|
1300
|
+
# in an object's key name will be percent-encoded according to UTF-8
|
1301
|
+
# code values. For example, the object `test_file(3).png` will appear as
|
1302
|
+
# `test_file%283%29.png`.
|
1303
|
+
#
|
1304
|
+
# </note>
|
1305
|
+
#
|
1306
|
+
#
|
1307
|
+
#
|
1308
|
+
# [1]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/object-keys.html
|
1309
|
+
# [2]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/object-keys.html#object-key-guidelines
|
1165
1310
|
# @option options [String] :key_marker
|
1166
1311
|
# Specifies the key to start with when listing objects in a bucket.
|
1167
1312
|
# @option options [String] :prefix
|
@@ -1200,7 +1345,7 @@ module Aws::S3
|
|
1200
1345
|
def object_versions(options = {})
|
1201
1346
|
batches = Enumerator.new do |y|
|
1202
1347
|
options = options.merge(bucket: @name)
|
1203
|
-
resp = Aws::Plugins::UserAgent.
|
1348
|
+
resp = Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
|
1204
1349
|
@client.list_object_versions(options)
|
1205
1350
|
end
|
1206
1351
|
resp.each_page do |page|
|
@@ -1252,10 +1397,26 @@ module Aws::S3
|
|
1252
1397
|
#
|
1253
1398
|
# [1]: https://docs.aws.amazon.com/AmazonS3/latest/dev/mpuoverview.html
|
1254
1399
|
# @option options [String] :encoding_type
|
1255
|
-
# Encoding type used by Amazon S3 to encode object keys in the
|
1256
|
-
#
|
1257
|
-
#
|
1258
|
-
#
|
1400
|
+
# Encoding type used by Amazon S3 to encode the [object keys][1] in the
|
1401
|
+
# response. Responses are encoded only in UTF-8. An object key can
|
1402
|
+
# contain any Unicode character. However, the XML 1.0 parser can't
|
1403
|
+
# parse certain characters, such as characters with an ASCII value from
|
1404
|
+
# 0 to 10. For characters that aren't supported in XML 1.0, you can add
|
1405
|
+
# this parameter to request that Amazon S3 encode the keys in the
|
1406
|
+
# response. For more information about characters to avoid in object key
|
1407
|
+
# names, see [Object key naming guidelines][2].
|
1408
|
+
#
|
1409
|
+
# <note markdown="1"> When using the URL encoding type, non-ASCII characters that are used
|
1410
|
+
# in an object's key name will be percent-encoded according to UTF-8
|
1411
|
+
# code values. For example, the object `test_file(3).png` will appear as
|
1412
|
+
# `test_file%283%29.png`.
|
1413
|
+
#
|
1414
|
+
# </note>
|
1415
|
+
#
|
1416
|
+
#
|
1417
|
+
#
|
1418
|
+
# [1]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/object-keys.html
|
1419
|
+
# [2]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/object-keys.html#object-key-guidelines
|
1259
1420
|
# @option options [String] :prefix
|
1260
1421
|
# Limits the response to keys that begin with the specified prefix.
|
1261
1422
|
#
|
@@ -1303,7 +1464,7 @@ module Aws::S3
|
|
1303
1464
|
def objects(options = {})
|
1304
1465
|
batches = Enumerator.new do |y|
|
1305
1466
|
options = options.merge(bucket: @name)
|
1306
|
-
resp = Aws::Plugins::UserAgent.
|
1467
|
+
resp = Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
|
1307
1468
|
@client.list_objects_v2(options)
|
1308
1469
|
end
|
1309
1470
|
resp.each_page do |page|
|
@@ -1412,3 +1573,6 @@ module Aws::S3
|
|
1412
1573
|
class Collection < Aws::Resources::Collection; end
|
1413
1574
|
end
|
1414
1575
|
end
|
1576
|
+
|
1577
|
+
# Load customizations if they exist
|
1578
|
+
require 'aws-sdk-s3/customizations/bucket'
|
@@ -60,7 +60,7 @@ module Aws::S3
|
|
60
60
|
#
|
61
61
|
# @return [self]
|
62
62
|
def load
|
63
|
-
resp = Aws::Plugins::UserAgent.
|
63
|
+
resp = Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
|
64
64
|
@client.get_bucket_acl(bucket: @bucket_name)
|
65
65
|
end
|
66
66
|
@data = resp.data
|
@@ -177,7 +177,7 @@ module Aws::S3
|
|
177
177
|
:retry
|
178
178
|
end
|
179
179
|
end
|
180
|
-
Aws::Plugins::UserAgent.
|
180
|
+
Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
|
181
181
|
Aws::Waiters::Waiter.new(options).wait({})
|
182
182
|
end
|
183
183
|
end
|
@@ -269,7 +269,7 @@ module Aws::S3
|
|
269
269
|
# @return [EmptyStructure]
|
270
270
|
def put(options = {})
|
271
271
|
options = options.merge(bucket: @bucket_name)
|
272
|
-
resp = Aws::Plugins::UserAgent.
|
272
|
+
resp = Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
|
273
273
|
@client.put_bucket_acl(options)
|
274
274
|
end
|
275
275
|
resp.data
|
@@ -55,7 +55,7 @@ module Aws::S3
|
|
55
55
|
#
|
56
56
|
# @return [self]
|
57
57
|
def load
|
58
|
-
resp = Aws::Plugins::UserAgent.
|
58
|
+
resp = Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
|
59
59
|
@client.get_bucket_cors(bucket: @bucket_name)
|
60
60
|
end
|
61
61
|
@data = resp.data
|
@@ -172,7 +172,7 @@ module Aws::S3
|
|
172
172
|
:retry
|
173
173
|
end
|
174
174
|
end
|
175
|
-
Aws::Plugins::UserAgent.
|
175
|
+
Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
|
176
176
|
Aws::Waiters::Waiter.new(options).wait({})
|
177
177
|
end
|
178
178
|
end
|
@@ -192,7 +192,7 @@ module Aws::S3
|
|
192
192
|
# @return [EmptyStructure]
|
193
193
|
def delete(options = {})
|
194
194
|
options = options.merge(bucket: @bucket_name)
|
195
|
-
resp = Aws::Plugins::UserAgent.
|
195
|
+
resp = Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
|
196
196
|
@client.delete_bucket_cors(options)
|
197
197
|
end
|
198
198
|
resp.data
|
@@ -260,7 +260,7 @@ module Aws::S3
|
|
260
260
|
# @return [EmptyStructure]
|
261
261
|
def put(options = {})
|
262
262
|
options = options.merge(bucket: @bucket_name)
|
263
|
-
resp = Aws::Plugins::UserAgent.
|
263
|
+
resp = Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
|
264
264
|
@client.put_bucket_cors(options)
|
265
265
|
end
|
266
266
|
resp.data
|
@@ -54,7 +54,7 @@ module Aws::S3
|
|
54
54
|
#
|
55
55
|
# @return [self]
|
56
56
|
def load
|
57
|
-
resp = Aws::Plugins::UserAgent.
|
57
|
+
resp = Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
|
58
58
|
@client.get_bucket_lifecycle(bucket: @bucket_name)
|
59
59
|
end
|
60
60
|
@data = resp.data
|
@@ -171,7 +171,7 @@ module Aws::S3
|
|
171
171
|
:retry
|
172
172
|
end
|
173
173
|
end
|
174
|
-
Aws::Plugins::UserAgent.
|
174
|
+
Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
|
175
175
|
Aws::Waiters::Waiter.new(options).wait({})
|
176
176
|
end
|
177
177
|
end
|
@@ -191,7 +191,7 @@ module Aws::S3
|
|
191
191
|
# @return [EmptyStructure]
|
192
192
|
def delete(options = {})
|
193
193
|
options = options.merge(bucket: @bucket_name)
|
194
|
-
resp = Aws::Plugins::UserAgent.
|
194
|
+
resp = Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
|
195
195
|
@client.delete_bucket_lifecycle(options)
|
196
196
|
end
|
197
197
|
resp.data
|
@@ -263,7 +263,7 @@ module Aws::S3
|
|
263
263
|
# @return [EmptyStructure]
|
264
264
|
def put(options = {})
|
265
265
|
options = options.merge(bucket: @bucket_name)
|
266
|
-
resp = Aws::Plugins::UserAgent.
|
266
|
+
resp = Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
|
267
267
|
@client.put_bucket_lifecycle(options)
|
268
268
|
end
|
269
269
|
resp.data
|