aws-sdk-s3 1.156.0 → 1.166.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 444d8fbcdc8d19b75228bdec52d8e1651f4d35459866847055b0d7e16d56371a
4
- data.tar.gz: 785d49ecff3a7441d4f3c196ed64d7cfbe79330627c585fc7108a4a7b11d6d2b
3
+ metadata.gz: 23940562598b8073e4e1e7fb5f300a75ccedfa51af9fba10603af1537c2e50e9
4
+ data.tar.gz: b741a11a7fe934ae6b0e5e263a99075191296916b8aceecbfdeecaa57ec10bf1
5
5
  SHA512:
6
- metadata.gz: e60cb04b18ce10ec62f4b63f28cf8ed7adf206a22910c7251ed9d1c2040a3466cb2d09a0987d6fc8d2361b4c15dfa0b764877b5c7bdedd03146383b5a11a79ae
7
- data.tar.gz: 2e5654d95f462359aebeae89f2b855211b95acbe1820ad354a7a8c0e8261ff1188715e469637aea8c647124a7672f102a08e5fa78d73ed27253fcb886cfa13b8
6
+ metadata.gz: 1442957d392d64949c12f0c9f8e6f409c90486538987aa4d9d5e738b4065e050104761522bcd8a38b413ca3bf554e6e328b0cbf3f43d4f79440c7e339162c4d2
7
+ data.tar.gz: e415e5c21aa9e5942b353e84372fbccb727e76deb7f3ecc4124a2ad4a680b856e1988f950e0ba7c5468102a269aa3b47214d5777a172004f789525a27d5eff3c
data/CHANGELOG.md CHANGED
@@ -1,6 +1,56 @@
1
1
  Unreleased Changes
2
2
  ------------------
3
3
 
4
+ 1.166.0 (2024-09-24)
5
+ ------------------
6
+
7
+ * Feature - Code Generated Changes, see `./build_tools` or `aws-sdk-core`'s CHANGELOG.md for details.
8
+
9
+ 1.165.0 (2024-09-23)
10
+ ------------------
11
+
12
+ * Feature - Code Generated Changes, see `./build_tools` or `aws-sdk-core`'s CHANGELOG.md for details.
13
+
14
+ 1.164.0 (2024-09-20)
15
+ ------------------
16
+
17
+ * Feature - Code Generated Changes, see `./build_tools` or `aws-sdk-core`'s CHANGELOG.md for details.
18
+
19
+ 1.163.0 (2024-09-18)
20
+ ------------------
21
+
22
+ * Feature - Added SSE-KMS support for directory buckets.
23
+
24
+ 1.162.0 (2024-09-11)
25
+ ------------------
26
+
27
+ * Feature - Code Generated Changes, see `./build_tools` or `aws-sdk-core`'s CHANGELOG.md for details.
28
+
29
+ 1.161.0 (2024-09-10)
30
+ ------------------
31
+
32
+ * Feature - Code Generated Changes, see `./build_tools` or `aws-sdk-core`'s CHANGELOG.md for details.
33
+
34
+ 1.160.0 (2024-09-03)
35
+ ------------------
36
+
37
+ * Feature - Code Generated Changes, see `./build_tools` or `aws-sdk-core`'s CHANGELOG.md for details.
38
+
39
+ 1.159.0 (2024-08-20)
40
+ ------------------
41
+
42
+ * Feature - Amazon Simple Storage Service / Features : Add support for conditional writes for PutObject and CompleteMultipartUpload APIs.
43
+
44
+ 1.158.0 (2024-08-15)
45
+ ------------------
46
+
47
+ * Feature - Amazon Simple Storage Service / Features : Adds support for pagination in the S3 ListBuckets API.
48
+
49
+ 1.157.0 (2024-08-01)
50
+ ------------------
51
+
52
+ * Feature - Support `head_bucket`, `get_object_attributes`, `delete_objects`, and `copy_object` for Access Grants.
53
+
4
54
  1.156.0 (2024-07-02)
5
55
  ------------------
6
56
 
data/VERSION CHANGED
@@ -1 +1 @@
1
- 1.156.0
1
+ 1.166.0
@@ -47,6 +47,8 @@ module Aws
47
47
  @caching = options.delete(:caching) != false
48
48
  @s3_control_clients = {}
49
49
  @bucket_region_cache = Aws::S3.bucket_region_cache
50
+ @head_bucket_mutex = Mutex.new
51
+ @head_bucket_call = false
50
52
  return unless @caching
51
53
 
52
54
  @credentials_cache = Aws::S3.access_grants_credentials_cache
@@ -195,9 +197,16 @@ module Aws
195
197
  end
196
198
 
197
199
  def new_bucket_region_for(bucket)
198
- @s3_client.head_bucket(bucket: bucket).bucket_region
199
- rescue Aws::S3::Errors::Http301Error => e
200
- e.data.region
200
+ @head_bucket_mutex.synchronize do
201
+ begin
202
+ @head_bucket_call = true
203
+ @s3_client.head_bucket(bucket: bucket).bucket_region
204
+ rescue Aws::S3::Errors::Http301Error => e
205
+ e.data.region
206
+ ensure
207
+ @head_bucket_call = false
208
+ end
209
+ end
201
210
  end
202
211
 
203
212
  # returns the account id for the configured credentials
@@ -497,6 +497,7 @@ module Aws::S3
497
497
  # checksum_sha1: "ChecksumSHA1",
498
498
  # checksum_sha256: "ChecksumSHA256",
499
499
  # expires: Time.now,
500
+ # if_none_match: "IfNoneMatch",
500
501
  # grant_full_control: "GrantFullControl",
501
502
  # grant_read: "GrantRead",
502
503
  # grant_read_acp: "GrantReadACP",
@@ -712,6 +713,24 @@ module Aws::S3
712
713
  #
713
714
  #
714
715
  # [1]: https://www.rfc-editor.org/rfc/rfc7234#section-5.3
716
+ # @option options [String] :if_none_match
717
+ # Uploads the object only if the object key name does not already exist
718
+ # in the bucket specified. Otherwise, Amazon S3 returns a `412
719
+ # Precondition Failed` error.
720
+ #
721
+ # If a conflicting operation occurs during the upload S3 returns a `409
722
+ # ConditionalRequestConflict` response. On a 409 failure you should
723
+ # retry the upload.
724
+ #
725
+ # Expects the '*' (asterisk) character.
726
+ #
727
+ # For more information about conditional requests, see [RFC 7232][1], or
728
+ # [Conditional requests][2] in the *Amazon S3 User Guide*.
729
+ #
730
+ #
731
+ #
732
+ # [1]: https://tools.ietf.org/html/rfc7232
733
+ # [2]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/conditional-requests.html
715
734
  # @option options [String] :grant_full_control
716
735
  # Gives the grantee READ, READ\_ACP, and WRITE\_ACP permissions on the
717
736
  # object.
@@ -754,25 +773,65 @@ module Aws::S3
754
773
  # object in Amazon S3 (for example, `AES256`, `aws:kms`,
755
774
  # `aws:kms:dsse`).
756
775
  #
757
- # <b>General purpose buckets </b> - You have four mutually exclusive
758
- # options to protect data using server-side encryption in Amazon S3,
759
- # depending on how you choose to manage the encryption keys.
760
- # Specifically, the encryption key options are Amazon S3 managed keys
761
- # (SSE-S3), Amazon Web Services KMS keys (SSE-KMS or DSSE-KMS), and
762
- # customer-provided keys (SSE-C). Amazon S3 encrypts data with
763
- # server-side encryption by using Amazon S3 managed keys (SSE-S3) by
764
- # default. You can optionally tell Amazon S3 to encrypt data at rest by
765
- # using server-side encryption with other key options. For more
766
- # information, see [Using Server-Side Encryption][1] in the *Amazon S3
767
- # User Guide*.
768
- #
769
- # <b>Directory buckets </b> - For directory buckets, only the
770
- # server-side encryption with Amazon S3 managed keys (SSE-S3) (`AES256`)
771
- # value is supported.
776
+ # * <b>General purpose buckets </b> - You have four mutually exclusive
777
+ # options to protect data using server-side encryption in Amazon S3,
778
+ # depending on how you choose to manage the encryption keys.
779
+ # Specifically, the encryption key options are Amazon S3 managed keys
780
+ # (SSE-S3), Amazon Web Services KMS keys (SSE-KMS or DSSE-KMS), and
781
+ # customer-provided keys (SSE-C). Amazon S3 encrypts data with
782
+ # server-side encryption by using Amazon S3 managed keys (SSE-S3) by
783
+ # default. You can optionally tell Amazon S3 to encrypt data at rest
784
+ # by using server-side encryption with other key options. For more
785
+ # information, see [Using Server-Side Encryption][1] in the *Amazon S3
786
+ # User Guide*.
787
+ #
788
+ # * <b>Directory buckets </b> - For directory buckets, there are only
789
+ # two supported options for server-side encryption: server-side
790
+ # encryption with Amazon S3 managed keys (SSE-S3) (`AES256`) and
791
+ # server-side encryption with KMS keys (SSE-KMS) (`aws:kms`). We
792
+ # recommend that the bucket's default encryption uses the desired
793
+ # encryption configuration and you don't override the bucket default
794
+ # encryption in your `CreateSession` requests or `PUT` object
795
+ # requests. Then, new objects are automatically encrypted with the
796
+ # desired encryption settings. For more information, see [Protecting
797
+ # data with server-side encryption][2] in the *Amazon S3 User Guide*.
798
+ # For more information about the encryption overriding behaviors in
799
+ # directory buckets, see [Specifying server-side encryption with KMS
800
+ # for new object uploads][3].
801
+ #
802
+ # In the Zonal endpoint API calls (except [CopyObject][4] and
803
+ # [UploadPartCopy][5]) using the REST API, the encryption request
804
+ # headers must match the encryption settings that are specified in the
805
+ # `CreateSession` request. You can't override the values of the
806
+ # encryption settings (`x-amz-server-side-encryption`,
807
+ # `x-amz-server-side-encryption-aws-kms-key-id`,
808
+ # `x-amz-server-side-encryption-context`, and
809
+ # `x-amz-server-side-encryption-bucket-key-enabled`) that are
810
+ # specified in the `CreateSession` request. You don't need to
811
+ # explicitly specify these encryption settings values in Zonal
812
+ # endpoint API calls, and Amazon S3 will use the encryption settings
813
+ # values from the `CreateSession` request to protect new objects in
814
+ # the directory bucket.
815
+ #
816
+ # <note markdown="1"> When you use the CLI or the Amazon Web Services SDKs, for
817
+ # `CreateSession`, the session token refreshes automatically to avoid
818
+ # service interruptions when a session expires. The CLI or the Amazon
819
+ # Web Services SDKs use the bucket's default encryption configuration
820
+ # for the `CreateSession` request. It's not supported to override the
821
+ # encryption settings values in the `CreateSession` request. So in the
822
+ # Zonal endpoint API calls (except [CopyObject][4] and
823
+ # [UploadPartCopy][5]), the encryption request headers must match the
824
+ # default encryption configuration of the directory bucket.
825
+ #
826
+ # </note>
772
827
  #
773
828
  #
774
829
  #
775
830
  # [1]: https://docs.aws.amazon.com/AmazonS3/latest/dev/UsingServerSideEncryption.html
831
+ # [2]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-express-serv-side-encryption.html
832
+ # [3]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-express-specifying-kms-encryption.html
833
+ # [4]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_CopyObject.html
834
+ # [5]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_UploadPartCopy.html
776
835
  # @option options [String] :storage_class
777
836
  # By default, Amazon S3 uses the STANDARD Storage Class to store newly
778
837
  # created objects. The STANDARD storage class provides high durability
@@ -846,44 +905,81 @@ module Aws::S3
846
905
  #
847
906
  # </note>
848
907
  # @option options [String] :ssekms_key_id
849
- # If `x-amz-server-side-encryption` has a valid value of `aws:kms` or
850
- # `aws:kms:dsse`, this header specifies the ID (Key ID, Key ARN, or Key
851
- # Alias) of the Key Management Service (KMS) symmetric encryption
852
- # customer managed key that was used for the object. If you specify
853
- # `x-amz-server-side-encryption:aws:kms` or
854
- # `x-amz-server-side-encryption:aws:kms:dsse`, but do not provide`
855
- # x-amz-server-side-encryption-aws-kms-key-id`, Amazon S3 uses the
856
- # Amazon Web Services managed key (`aws/s3`) to protect the data. If the
857
- # KMS key does not exist in the same account that's issuing the
858
- # command, you must use the full ARN and not just the ID.
908
+ # Specifies the KMS key ID (Key ID, Key ARN, or Key Alias) to use for
909
+ # object encryption. If the KMS key doesn't exist in the same account
910
+ # that's issuing the command, you must use the full Key ARN not the Key
911
+ # ID.
912
+ #
913
+ # **General purpose buckets** - If you specify
914
+ # `x-amz-server-side-encryption` with `aws:kms` or `aws:kms:dsse`, this
915
+ # header specifies the ID (Key ID, Key ARN, or Key Alias) of the KMS key
916
+ # to use. If you specify `x-amz-server-side-encryption:aws:kms` or
917
+ # `x-amz-server-side-encryption:aws:kms:dsse`, but do not provide
918
+ # `x-amz-server-side-encryption-aws-kms-key-id`, Amazon S3 uses the
919
+ # Amazon Web Services managed key (`aws/s3`) to protect the data.
920
+ #
921
+ # **Directory buckets** - If you specify `x-amz-server-side-encryption`
922
+ # with `aws:kms`, you must specify the `
923
+ # x-amz-server-side-encryption-aws-kms-key-id` header with the ID (Key
924
+ # ID or Key ARN) of the KMS symmetric encryption customer managed key to
925
+ # use. Otherwise, you get an HTTP `400 Bad Request` error. Only use the
926
+ # key ID or key ARN. The key alias format of the KMS key isn't
927
+ # supported. Your SSE-KMS configuration can only support 1 [customer
928
+ # managed key][1] per directory bucket for the lifetime of the bucket.
929
+ # [Amazon Web Services managed key][2] (`aws/s3`) isn't supported.
930
+ #
931
+ #
932
+ #
933
+ # [1]: https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#customer-cmk
934
+ # [2]: https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#aws-managed-cmk
935
+ # @option options [String] :ssekms_encryption_context
936
+ # Specifies the Amazon Web Services KMS Encryption Context as an
937
+ # additional encryption context to use for object encryption. The value
938
+ # of this header is a Base64-encoded string of a UTF-8 encoded JSON,
939
+ # which contains the encryption context as key-value pairs. This value
940
+ # is stored as object metadata and automatically gets passed on to
941
+ # Amazon Web Services KMS for future `GetObject` operations on this
942
+ # object.
859
943
  #
860
- # <note markdown="1"> This functionality is not supported for directory buckets.
944
+ # **General purpose buckets** - This value must be explicitly added
945
+ # during `CopyObject` operations if you want an additional encryption
946
+ # context for your object. For more information, see [Encryption
947
+ # context][1] in the *Amazon S3 User Guide*.
861
948
  #
862
- # </note>
863
- # @option options [String] :ssekms_encryption_context
864
- # Specifies the Amazon Web Services KMS Encryption Context to use for
865
- # object encryption. The value of this header is a base64-encoded UTF-8
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.
949
+ # **Directory buckets** - You can optionally provide an explicit
950
+ # encryption context value. The value must match the default encryption
951
+ # context - the bucket Amazon Resource Name (ARN). An additional
952
+ # encryption context value is not supported.
871
953
  #
872
- # <note markdown="1"> This functionality is not supported for directory buckets.
873
954
  #
874
- # </note>
955
+ #
956
+ # [1]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/UsingKMSEncryption.html#encryption-context
875
957
  # @option options [Boolean] :bucket_key_enabled
876
958
  # Specifies whether Amazon S3 should use an S3 Bucket Key for object
877
959
  # encryption with server-side encryption using Key Management Service
878
- # (KMS) keys (SSE-KMS). Setting this header to `true` causes Amazon S3
879
- # to use an S3 Bucket Key for object encryption with SSE-KMS.
960
+ # (KMS) keys (SSE-KMS).
880
961
  #
881
- # Specifying this header with a PUT action doesn’t affect bucket-level
882
- # settings for S3 Bucket Key.
962
+ # **General purpose buckets** - Setting this header to `true` causes
963
+ # Amazon S3 to use an S3 Bucket Key for object encryption with SSE-KMS.
964
+ # Also, specifying this header with a PUT action doesn't affect
965
+ # bucket-level settings for S3 Bucket Key.
883
966
  #
884
- # <note markdown="1"> This functionality is not supported for directory buckets.
967
+ # **Directory buckets** - S3 Bucket Keys are always enabled for `GET`
968
+ # and `PUT` operations in a directory bucket and can’t be disabled. S3
969
+ # Bucket Keys aren't supported, when you copy SSE-KMS encrypted objects
970
+ # from general purpose buckets to directory buckets, from directory
971
+ # buckets to general purpose buckets, or between directory buckets,
972
+ # through [CopyObject][1], [UploadPartCopy][2], [the Copy operation in
973
+ # Batch Operations][3], or [the import jobs][4]. In this case, Amazon S3
974
+ # makes a call to KMS every time a copy request is made for a
975
+ # KMS-encrypted object.
885
976
  #
886
- # </note>
977
+ #
978
+ #
979
+ # [1]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_CopyObject.html
980
+ # [2]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_UploadPartCopy.html
981
+ # [3]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/directory-buckets-objects-Batch-Ops
982
+ # [4]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/create-import-job
887
983
  # @option options [String] :request_payer
888
984
  # Confirms that the requester knows that they will be charged for the
889
985
  # request. Bucket owners need not specify this parameter in their
@@ -1018,12 +1114,26 @@ module Aws::S3
1018
1114
  #
1019
1115
  # </note>
1020
1116
  # @option options [String] :encoding_type
1021
- # Requests Amazon S3 to encode the object keys in the response and
1022
- # specifies the encoding method to use. An object key can contain any
1023
- # Unicode character; however, the XML 1.0 parser cannot parse some
1024
- # characters, such as characters with an ASCII value from 0 to 10. For
1025
- # characters that are not supported in XML 1.0, you can add this
1026
- # parameter to request that Amazon S3 encode the keys in the response.
1117
+ # Encoding type used by Amazon S3 to encode the [object keys][1] in the
1118
+ # response. Responses are encoded only in UTF-8. An object key can
1119
+ # contain any Unicode character. However, the XML 1.0 parser can't
1120
+ # parse certain characters, such as characters with an ASCII value from
1121
+ # 0 to 10. For characters that aren't supported in XML 1.0, you can add
1122
+ # this parameter to request that Amazon S3 encode the keys in the
1123
+ # response. For more information about characters to avoid in object key
1124
+ # names, see [Object key naming guidelines][2].
1125
+ #
1126
+ # <note markdown="1"> When using the URL encoding type, non-ASCII characters that are used
1127
+ # in an object's key name will be percent-encoded according to UTF-8
1128
+ # code values. For example, the object `test_file(3).png` will appear as
1129
+ # `test_file%283%29.png`.
1130
+ #
1131
+ # </note>
1132
+ #
1133
+ #
1134
+ #
1135
+ # [1]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/object-keys.html
1136
+ # [2]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/object-keys.html#object-key-guidelines
1027
1137
  # @option options [String] :key_marker
1028
1138
  # Specifies the multipart upload after which listing should begin.
1029
1139
  #
@@ -1156,12 +1266,26 @@ module Aws::S3
1156
1266
  # the `max-keys` limitation. These keys are not returned elsewhere in
1157
1267
  # the response.
1158
1268
  # @option options [String] :encoding_type
1159
- # Requests Amazon S3 to encode the object keys in the response and
1160
- # specifies the encoding method to use. An object key can contain any
1161
- # Unicode character; however, the XML 1.0 parser cannot parse some
1162
- # characters, such as characters with an ASCII value from 0 to 10. For
1163
- # characters that are not supported in XML 1.0, you can add this
1164
- # parameter to request that Amazon S3 encode the keys in the response.
1269
+ # Encoding type used by Amazon S3 to encode the [object keys][1] in the
1270
+ # response. Responses are encoded only in UTF-8. An object key can
1271
+ # contain any Unicode character. However, the XML 1.0 parser can't
1272
+ # parse certain characters, such as characters with an ASCII value from
1273
+ # 0 to 10. For characters that aren't supported in XML 1.0, you can add
1274
+ # this parameter to request that Amazon S3 encode the keys in the
1275
+ # response. For more information about characters to avoid in object key
1276
+ # names, see [Object key naming guidelines][2].
1277
+ #
1278
+ # <note markdown="1"> When using the URL encoding type, non-ASCII characters that are used
1279
+ # in an object's key name will be percent-encoded according to UTF-8
1280
+ # code values. For example, the object `test_file(3).png` will appear as
1281
+ # `test_file%283%29.png`.
1282
+ #
1283
+ # </note>
1284
+ #
1285
+ #
1286
+ #
1287
+ # [1]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/object-keys.html
1288
+ # [2]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/object-keys.html#object-key-guidelines
1165
1289
  # @option options [String] :key_marker
1166
1290
  # Specifies the key to start with when listing objects in a bucket.
1167
1291
  # @option options [String] :prefix
@@ -1252,10 +1376,26 @@ module Aws::S3
1252
1376
  #
1253
1377
  # [1]: https://docs.aws.amazon.com/AmazonS3/latest/dev/mpuoverview.html
1254
1378
  # @option options [String] :encoding_type
1255
- # Encoding type used by Amazon S3 to encode object keys in the response.
1256
- # If using `url`, non-ASCII characters used in an object's key name
1257
- # will be URL encoded. For example, the object `test_file(3).png` will
1258
- # appear as `test_file%283%29.png`.
1379
+ # Encoding type used by Amazon S3 to encode the [object keys][1] in the
1380
+ # response. Responses are encoded only in UTF-8. An object key can
1381
+ # contain any Unicode character. However, the XML 1.0 parser can't
1382
+ # parse certain characters, such as characters with an ASCII value from
1383
+ # 0 to 10. For characters that aren't supported in XML 1.0, you can add
1384
+ # this parameter to request that Amazon S3 encode the keys in the
1385
+ # response. For more information about characters to avoid in object key
1386
+ # names, see [Object key naming guidelines][2].
1387
+ #
1388
+ # <note markdown="1"> When using the URL encoding type, non-ASCII characters that are used
1389
+ # in an object's key name will be percent-encoded according to UTF-8
1390
+ # code values. For example, the object `test_file(3).png` will appear as
1391
+ # `test_file%283%29.png`.
1392
+ #
1393
+ # </note>
1394
+ #
1395
+ #
1396
+ #
1397
+ # [1]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/object-keys.html
1398
+ # [2]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/object-keys.html#object-key-guidelines
1259
1399
  # @option options [String] :prefix
1260
1400
  # Limits the response to keys that begin with the specified prefix.
1261
1401
  #
@@ -1412,3 +1552,6 @@ module Aws::S3
1412
1552
  class Collection < Aws::Resources::Collection; end
1413
1553
  end
1414
1554
  end
1555
+
1556
+ # Load customizations if they exist
1557
+ require 'aws-sdk-s3/customizations/bucket'