aws-sdk-s3 1.17.0 → 1.114.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (100) hide show
  1. checksums.yaml +5 -5
  2. data/CHANGELOG.md +903 -0
  3. data/LICENSE.txt +202 -0
  4. data/VERSION +1 -0
  5. data/lib/aws-sdk-s3/arn/access_point_arn.rb +69 -0
  6. data/lib/aws-sdk-s3/arn/multi_region_access_point_arn.rb +68 -0
  7. data/lib/aws-sdk-s3/arn/object_lambda_arn.rb +69 -0
  8. data/lib/aws-sdk-s3/arn/outpost_access_point_arn.rb +74 -0
  9. data/lib/aws-sdk-s3/bucket.rb +393 -75
  10. data/lib/aws-sdk-s3/bucket_acl.rb +57 -14
  11. data/lib/aws-sdk-s3/bucket_cors.rb +67 -13
  12. data/lib/aws-sdk-s3/bucket_lifecycle.rb +54 -15
  13. data/lib/aws-sdk-s3/bucket_lifecycle_configuration.rb +56 -15
  14. data/lib/aws-sdk-s3/bucket_logging.rb +52 -15
  15. data/lib/aws-sdk-s3/bucket_notification.rb +47 -17
  16. data/lib/aws-sdk-s3/bucket_policy.rb +51 -13
  17. data/lib/aws-sdk-s3/bucket_region_cache.rb +2 -0
  18. data/lib/aws-sdk-s3/bucket_request_payment.rb +51 -12
  19. data/lib/aws-sdk-s3/bucket_tagging.rb +59 -13
  20. data/lib/aws-sdk-s3/bucket_versioning.rb +118 -12
  21. data/lib/aws-sdk-s3/bucket_website.rb +66 -13
  22. data/lib/aws-sdk-s3/client.rb +11474 -2521
  23. data/lib/aws-sdk-s3/client_api.rb +1074 -4
  24. data/lib/aws-sdk-s3/customizations/bucket.rb +60 -17
  25. data/lib/aws-sdk-s3/customizations/multipart_upload.rb +2 -0
  26. data/lib/aws-sdk-s3/customizations/object.rb +200 -62
  27. data/lib/aws-sdk-s3/customizations/object_summary.rb +5 -0
  28. data/lib/aws-sdk-s3/customizations/types/list_object_versions_output.rb +2 -0
  29. data/lib/aws-sdk-s3/customizations.rb +4 -1
  30. data/lib/aws-sdk-s3/encryption/client.rb +23 -6
  31. data/lib/aws-sdk-s3/encryption/decrypt_handler.rb +71 -29
  32. data/lib/aws-sdk-s3/encryption/default_cipher_provider.rb +43 -5
  33. data/lib/aws-sdk-s3/encryption/default_key_provider.rb +2 -0
  34. data/lib/aws-sdk-s3/encryption/encrypt_handler.rb +13 -2
  35. data/lib/aws-sdk-s3/encryption/errors.rb +2 -0
  36. data/lib/aws-sdk-s3/encryption/io_auth_decrypter.rb +11 -3
  37. data/lib/aws-sdk-s3/encryption/io_decrypter.rb +11 -3
  38. data/lib/aws-sdk-s3/encryption/io_encrypter.rb +2 -0
  39. data/lib/aws-sdk-s3/encryption/key_provider.rb +2 -0
  40. data/lib/aws-sdk-s3/encryption/kms_cipher_provider.rb +34 -3
  41. data/lib/aws-sdk-s3/encryption/materials.rb +8 -6
  42. data/lib/aws-sdk-s3/encryption/utils.rb +25 -0
  43. data/lib/aws-sdk-s3/encryption.rb +4 -0
  44. data/lib/aws-sdk-s3/encryptionV2/client.rb +566 -0
  45. data/lib/aws-sdk-s3/encryptionV2/decrypt_handler.rb +222 -0
  46. data/lib/aws-sdk-s3/encryptionV2/default_cipher_provider.rb +170 -0
  47. data/lib/aws-sdk-s3/encryptionV2/default_key_provider.rb +40 -0
  48. data/lib/aws-sdk-s3/encryptionV2/encrypt_handler.rb +65 -0
  49. data/lib/aws-sdk-s3/encryptionV2/errors.rb +37 -0
  50. data/lib/aws-sdk-s3/encryptionV2/io_auth_decrypter.rb +58 -0
  51. data/lib/aws-sdk-s3/encryptionV2/io_decrypter.rb +37 -0
  52. data/lib/aws-sdk-s3/encryptionV2/io_encrypter.rb +73 -0
  53. data/lib/aws-sdk-s3/encryptionV2/key_provider.rb +31 -0
  54. data/lib/aws-sdk-s3/encryptionV2/kms_cipher_provider.rb +169 -0
  55. data/lib/aws-sdk-s3/encryptionV2/materials.rb +60 -0
  56. data/lib/aws-sdk-s3/encryptionV2/utils.rb +103 -0
  57. data/lib/aws-sdk-s3/encryption_v2.rb +23 -0
  58. data/lib/aws-sdk-s3/errors.rb +123 -1
  59. data/lib/aws-sdk-s3/event_streams.rb +20 -7
  60. data/lib/aws-sdk-s3/file_downloader.rb +17 -10
  61. data/lib/aws-sdk-s3/file_part.rb +11 -6
  62. data/lib/aws-sdk-s3/file_uploader.rb +33 -14
  63. data/lib/aws-sdk-s3/legacy_signer.rb +17 -25
  64. data/lib/aws-sdk-s3/multipart_file_uploader.rb +78 -19
  65. data/lib/aws-sdk-s3/multipart_stream_uploader.rb +21 -8
  66. data/lib/aws-sdk-s3/multipart_upload.rb +178 -28
  67. data/lib/aws-sdk-s3/multipart_upload_error.rb +2 -0
  68. data/lib/aws-sdk-s3/multipart_upload_part.rb +237 -44
  69. data/lib/aws-sdk-s3/object.rb +899 -154
  70. data/lib/aws-sdk-s3/object_acl.rb +81 -20
  71. data/lib/aws-sdk-s3/object_copier.rb +2 -0
  72. data/lib/aws-sdk-s3/object_multipart_copier.rb +2 -0
  73. data/lib/aws-sdk-s3/object_summary.rb +651 -139
  74. data/lib/aws-sdk-s3/object_version.rb +167 -65
  75. data/lib/aws-sdk-s3/plugins/accelerate.rb +38 -38
  76. data/lib/aws-sdk-s3/plugins/arn.rb +254 -0
  77. data/lib/aws-sdk-s3/plugins/bucket_dns.rb +8 -8
  78. data/lib/aws-sdk-s3/plugins/bucket_name_restrictions.rb +25 -3
  79. data/lib/aws-sdk-s3/plugins/dualstack.rb +38 -33
  80. data/lib/aws-sdk-s3/plugins/expect_100_continue.rb +4 -4
  81. data/lib/aws-sdk-s3/plugins/get_bucket_location_fix.rb +3 -1
  82. data/lib/aws-sdk-s3/plugins/http_200_errors.rb +11 -3
  83. data/lib/aws-sdk-s3/plugins/iad_regional_endpoint.rb +73 -0
  84. data/lib/aws-sdk-s3/plugins/location_constraint.rb +2 -0
  85. data/lib/aws-sdk-s3/plugins/md5s.rb +34 -27
  86. data/lib/aws-sdk-s3/plugins/object_lambda_endpoint.rb +25 -0
  87. data/lib/aws-sdk-s3/plugins/redirects.rb +2 -0
  88. data/lib/aws-sdk-s3/plugins/s3_host_id.rb +2 -0
  89. data/lib/aws-sdk-s3/plugins/s3_signer.rb +95 -36
  90. data/lib/aws-sdk-s3/plugins/skip_whole_multipart_get_checksums.rb +31 -0
  91. data/lib/aws-sdk-s3/plugins/sse_cpk.rb +3 -1
  92. data/lib/aws-sdk-s3/plugins/streaming_retry.rb +139 -0
  93. data/lib/aws-sdk-s3/plugins/url_encoded_keys.rb +2 -0
  94. data/lib/aws-sdk-s3/presigned_post.rb +110 -51
  95. data/lib/aws-sdk-s3/presigner.rb +169 -63
  96. data/lib/aws-sdk-s3/resource.rb +45 -5
  97. data/lib/aws-sdk-s3/types.rb +9872 -1303
  98. data/lib/aws-sdk-s3/waiters.rb +67 -1
  99. data/lib/aws-sdk-s3.rb +12 -6
  100. metadata +38 -13
@@ -1,11 +1,14 @@
1
+ # frozen_string_literal: true
2
+
1
3
  # WARNING ABOUT GENERATED CODE
2
4
  #
3
5
  # This file is generated. See the contributing guide for more information:
4
- # https://github.com/aws/aws-sdk-ruby/blob/master/CONTRIBUTING.md
6
+ # https://github.com/aws/aws-sdk-ruby/blob/version-3/CONTRIBUTING.md
5
7
  #
6
8
  # WARNING ABOUT GENERATED CODE
7
9
 
8
10
  module Aws::S3
11
+
9
12
  class ObjectAcl
10
13
 
11
14
  extend Aws::Deprecations
@@ -24,6 +27,7 @@ module Aws::S3
24
27
  @object_key = extract_object_key(args, options)
25
28
  @data = options.delete(:data)
26
29
  @client = options.delete(:client) || Client.new(options)
30
+ @waiter_block_warned = false
27
31
  end
28
32
 
29
33
  # @!group Read-Only Attributes
@@ -38,6 +42,7 @@ module Aws::S3
38
42
  @object_key
39
43
  end
40
44
 
45
+ # Container for the bucket owner's display name and ID.
41
46
  # @return [Types::Owner]
42
47
  def owner
43
48
  data[:owner]
@@ -99,7 +104,8 @@ module Aws::S3
99
104
  # Waiter polls an API operation until a resource enters a desired
100
105
  # state.
101
106
  #
102
- # @note The waiting operation is performed on a copy. The original resource remains unchanged
107
+ # @note The waiting operation is performed on a copy. The original resource
108
+ # remains unchanged.
103
109
  #
104
110
  # ## Basic Usage
105
111
  #
@@ -112,13 +118,15 @@ module Aws::S3
112
118
  #
113
119
  # ## Example
114
120
  #
115
- # instance.wait_until(max_attempts:10, delay:5) {|instance| instance.state.name == 'running' }
121
+ # instance.wait_until(max_attempts:10, delay:5) do |instance|
122
+ # instance.state.name == 'running'
123
+ # end
116
124
  #
117
125
  # ## Configuration
118
126
  #
119
127
  # You can configure the maximum number of polling attempts, and the
120
- # delay (in seconds) between each polling attempt. The waiting condition is set
121
- # by passing a block to {#wait_until}:
128
+ # delay (in seconds) between each polling attempt. The waiting condition is
129
+ # set by passing a block to {#wait_until}:
122
130
  #
123
131
  # # poll for ~25 seconds
124
132
  # resource.wait_until(max_attempts:5,delay:5) {|resource|...}
@@ -149,17 +157,16 @@ module Aws::S3
149
157
  # # resource did not enter the desired state in time
150
158
  # end
151
159
  #
160
+ # @yieldparam [Resource] resource to be used in the waiting condition.
152
161
  #
153
- # @yield param [Resource] resource to be used in the waiting condition
154
- #
155
- # @raise [Aws::Waiters::Errors::FailureStateError] Raised when the waiter terminates
156
- # because the waiter has entered a state that it will not transition
157
- # out of, preventing success.
162
+ # @raise [Aws::Waiters::Errors::FailureStateError] Raised when the waiter
163
+ # terminates because the waiter has entered a state that it will not
164
+ # transition out of, preventing success.
158
165
  #
159
166
  # yet successful.
160
167
  #
161
- # @raise [Aws::Waiters::Errors::UnexpectedError] Raised when an error is encountered
162
- # while polling for a resource that is not expected.
168
+ # @raise [Aws::Waiters::Errors::UnexpectedError] Raised when an error is
169
+ # encountered while polling for a resource that is not expected.
163
170
  #
164
171
  # @raise [NotImplementedError] Raised when the resource does not
165
172
  #
@@ -214,6 +221,7 @@ module Aws::S3
214
221
  # },
215
222
  # },
216
223
  # content_md5: "ContentMD5",
224
+ # checksum_algorithm: "CRC32", # accepts CRC32, CRC32C, SHA1, SHA256
217
225
  # grant_full_control: "GrantFullControl",
218
226
  # grant_read: "GrantRead",
219
227
  # grant_read_acp: "GrantReadACP",
@@ -221,32 +229,85 @@ module Aws::S3
221
229
  # grant_write_acp: "GrantWriteACP",
222
230
  # request_payer: "requester", # accepts requester
223
231
  # version_id: "ObjectVersionId",
232
+ # expected_bucket_owner: "AccountId",
224
233
  # })
225
234
  # @param [Hash] options ({})
226
235
  # @option options [String] :acl
227
- # The canned ACL to apply to the object.
236
+ # The canned ACL to apply to the object. For more information, see
237
+ # [Canned ACL][1].
238
+ #
239
+ #
240
+ #
241
+ # [1]: https://docs.aws.amazon.com/AmazonS3/latest/dev/acl-overview.html#CannedACL
228
242
  # @option options [Types::AccessControlPolicy] :access_control_policy
243
+ # Contains the elements that set the ACL permissions for an object per
244
+ # grantee.
229
245
  # @option options [String] :content_md5
246
+ # The base64-encoded 128-bit MD5 digest of the data. This header must be
247
+ # used as a message integrity check to verify that the request body was
248
+ # not corrupted in transit. For more information, go to [RFC
249
+ # 1864.>][1]
250
+ #
251
+ # For requests made using the Amazon Web Services Command Line Interface
252
+ # (CLI) or Amazon Web Services SDKs, this field is calculated
253
+ # automatically.
254
+ #
255
+ #
256
+ #
257
+ # [1]: http://www.ietf.org/rfc/rfc1864.txt
258
+ # @option options [String] :checksum_algorithm
259
+ # Indicates the algorithm used to create the checksum for the object
260
+ # when using the SDK. This header will not provide any additional
261
+ # functionality if not using the SDK. When sending this header, there
262
+ # must be a corresponding `x-amz-checksum` or `x-amz-trailer` header
263
+ # sent. Otherwise, Amazon S3 fails the request with the HTTP status code
264
+ # `400 Bad Request`. For more information, see [Checking object
265
+ # integrity][1] in the *Amazon S3 User Guide*.
266
+ #
267
+ # If you provide an individual checksum, Amazon S3 ignores any provided
268
+ # `ChecksumAlgorithm` parameter.
269
+ #
270
+ #
271
+ #
272
+ # [1]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html
230
273
  # @option options [String] :grant_full_control
231
274
  # Allows grantee the read, write, read ACP, and write ACP permissions on
232
275
  # the bucket.
276
+ #
277
+ # This action is not supported by Amazon S3 on Outposts.
233
278
  # @option options [String] :grant_read
234
279
  # Allows grantee to list the objects in the bucket.
280
+ #
281
+ # This action is not supported by Amazon S3 on Outposts.
235
282
  # @option options [String] :grant_read_acp
236
283
  # Allows grantee to read the bucket ACL.
284
+ #
285
+ # This action is not supported by Amazon S3 on Outposts.
237
286
  # @option options [String] :grant_write
238
- # Allows grantee to create, overwrite, and delete any object in the
239
- # bucket.
287
+ # Allows grantee to create new objects in the bucket.
288
+ #
289
+ # For the bucket and object owners of existing objects, also allows
290
+ # deletions and overwrites of those objects.
240
291
  # @option options [String] :grant_write_acp
241
292
  # Allows grantee to write the ACL for the applicable bucket.
293
+ #
294
+ # This action is not supported by Amazon S3 on Outposts.
242
295
  # @option options [String] :request_payer
243
- # Confirms that the requester knows that she or he will be charged for
244
- # the request. Bucket owners need not specify this parameter in their
245
- # requests. Documentation on downloading objects from requester pays
246
- # buckets can be found at
247
- # http://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html
296
+ # Confirms that the requester knows that they will be charged for the
297
+ # request. Bucket owners need not specify this parameter in their
298
+ # requests. For information about downloading objects from Requester
299
+ # Pays buckets, see [Downloading Objects in Requester Pays Buckets][1]
300
+ # in the *Amazon S3 User Guide*.
301
+ #
302
+ #
303
+ #
304
+ # [1]: https://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html
248
305
  # @option options [String] :version_id
249
306
  # VersionId used to reference a specific version of the object.
307
+ # @option options [String] :expected_bucket_owner
308
+ # The account ID of the expected bucket owner. If the bucket is owned by
309
+ # a different account, the request fails with the HTTP status code `403
310
+ # Forbidden` (access denied).
250
311
  # @return [Types::PutObjectAclOutput]
251
312
  def put(options = {})
252
313
  options = options.merge(
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require 'thread'
2
4
 
3
5
  module Aws
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require 'thread'
2
4
  require 'cgi'
3
5