aws-sdk-s3 1.36.0 → 1.95.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (98) hide show
  1. checksums.yaml +5 -5
  2. data/CHANGELOG.md +768 -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/object_lambda_arn.rb +69 -0
  7. data/lib/aws-sdk-s3/arn/outpost_access_point_arn.rb +73 -0
  8. data/lib/aws-sdk-s3/bucket.rb +277 -76
  9. data/lib/aws-sdk-s3/bucket_acl.rb +40 -15
  10. data/lib/aws-sdk-s3/bucket_cors.rb +50 -14
  11. data/lib/aws-sdk-s3/bucket_lifecycle.rb +33 -14
  12. data/lib/aws-sdk-s3/bucket_lifecycle_configuration.rb +32 -14
  13. data/lib/aws-sdk-s3/bucket_logging.rb +35 -15
  14. data/lib/aws-sdk-s3/bucket_notification.rb +32 -18
  15. data/lib/aws-sdk-s3/bucket_policy.rb +34 -13
  16. data/lib/aws-sdk-s3/bucket_region_cache.rb +2 -0
  17. data/lib/aws-sdk-s3/bucket_request_payment.rb +34 -12
  18. data/lib/aws-sdk-s3/bucket_tagging.rb +42 -14
  19. data/lib/aws-sdk-s3/bucket_versioning.rb +67 -12
  20. data/lib/aws-sdk-s3/bucket_website.rb +49 -17
  21. data/lib/aws-sdk-s3/client.rb +7494 -618
  22. data/lib/aws-sdk-s3/client_api.rb +417 -2
  23. data/lib/aws-sdk-s3/customizations/bucket.rb +59 -16
  24. data/lib/aws-sdk-s3/customizations/multipart_upload.rb +2 -0
  25. data/lib/aws-sdk-s3/customizations/object.rb +125 -60
  26. data/lib/aws-sdk-s3/customizations/object_summary.rb +5 -0
  27. data/lib/aws-sdk-s3/customizations/types/list_object_versions_output.rb +2 -0
  28. data/lib/aws-sdk-s3/customizations.rb +4 -1
  29. data/lib/aws-sdk-s3/encryption/client.rb +22 -5
  30. data/lib/aws-sdk-s3/encryption/decrypt_handler.rb +72 -26
  31. data/lib/aws-sdk-s3/encryption/default_cipher_provider.rb +43 -5
  32. data/lib/aws-sdk-s3/encryption/default_key_provider.rb +2 -0
  33. data/lib/aws-sdk-s3/encryption/encrypt_handler.rb +13 -2
  34. data/lib/aws-sdk-s3/encryption/errors.rb +2 -0
  35. data/lib/aws-sdk-s3/encryption/io_auth_decrypter.rb +2 -0
  36. data/lib/aws-sdk-s3/encryption/io_decrypter.rb +11 -3
  37. data/lib/aws-sdk-s3/encryption/io_encrypter.rb +2 -0
  38. data/lib/aws-sdk-s3/encryption/key_provider.rb +2 -0
  39. data/lib/aws-sdk-s3/encryption/kms_cipher_provider.rb +34 -3
  40. data/lib/aws-sdk-s3/encryption/materials.rb +8 -6
  41. data/lib/aws-sdk-s3/encryption/utils.rb +25 -0
  42. data/lib/aws-sdk-s3/encryption.rb +4 -0
  43. data/lib/aws-sdk-s3/encryptionV2/client.rb +566 -0
  44. data/lib/aws-sdk-s3/encryptionV2/decrypt_handler.rb +226 -0
  45. data/lib/aws-sdk-s3/encryptionV2/default_cipher_provider.rb +170 -0
  46. data/lib/aws-sdk-s3/encryptionV2/default_key_provider.rb +40 -0
  47. data/lib/aws-sdk-s3/encryptionV2/encrypt_handler.rb +69 -0
  48. data/lib/aws-sdk-s3/encryptionV2/errors.rb +37 -0
  49. data/lib/aws-sdk-s3/encryptionV2/io_auth_decrypter.rb +58 -0
  50. data/lib/aws-sdk-s3/encryptionV2/io_decrypter.rb +37 -0
  51. data/lib/aws-sdk-s3/encryptionV2/io_encrypter.rb +73 -0
  52. data/lib/aws-sdk-s3/encryptionV2/key_provider.rb +31 -0
  53. data/lib/aws-sdk-s3/encryptionV2/kms_cipher_provider.rb +169 -0
  54. data/lib/aws-sdk-s3/encryptionV2/materials.rb +60 -0
  55. data/lib/aws-sdk-s3/encryptionV2/utils.rb +103 -0
  56. data/lib/aws-sdk-s3/encryption_v2.rb +23 -0
  57. data/lib/aws-sdk-s3/errors.rb +123 -1
  58. data/lib/aws-sdk-s3/event_streams.rb +15 -8
  59. data/lib/aws-sdk-s3/file_downloader.rb +10 -8
  60. data/lib/aws-sdk-s3/file_part.rb +11 -6
  61. data/lib/aws-sdk-s3/file_uploader.rb +28 -14
  62. data/lib/aws-sdk-s3/legacy_signer.rb +17 -25
  63. data/lib/aws-sdk-s3/multipart_file_uploader.rb +53 -13
  64. data/lib/aws-sdk-s3/multipart_stream_uploader.rb +20 -7
  65. data/lib/aws-sdk-s3/multipart_upload.rb +64 -29
  66. data/lib/aws-sdk-s3/multipart_upload_error.rb +2 -0
  67. data/lib/aws-sdk-s3/multipart_upload_part.rb +115 -42
  68. data/lib/aws-sdk-s3/object.rb +656 -151
  69. data/lib/aws-sdk-s3/object_acl.rb +64 -21
  70. data/lib/aws-sdk-s3/object_copier.rb +2 -0
  71. data/lib/aws-sdk-s3/object_multipart_copier.rb +2 -0
  72. data/lib/aws-sdk-s3/object_summary.rb +474 -138
  73. data/lib/aws-sdk-s3/object_version.rb +122 -58
  74. data/lib/aws-sdk-s3/plugins/accelerate.rb +32 -38
  75. data/lib/aws-sdk-s3/plugins/arn.rb +228 -0
  76. data/lib/aws-sdk-s3/plugins/bucket_dns.rb +7 -7
  77. data/lib/aws-sdk-s3/plugins/bucket_name_restrictions.rb +25 -3
  78. data/lib/aws-sdk-s3/plugins/dualstack.rb +15 -4
  79. data/lib/aws-sdk-s3/plugins/expect_100_continue.rb +4 -4
  80. data/lib/aws-sdk-s3/plugins/get_bucket_location_fix.rb +2 -0
  81. data/lib/aws-sdk-s3/plugins/http_200_errors.rb +11 -3
  82. data/lib/aws-sdk-s3/plugins/iad_regional_endpoint.rb +67 -0
  83. data/lib/aws-sdk-s3/plugins/location_constraint.rb +2 -0
  84. data/lib/aws-sdk-s3/plugins/md5s.rb +30 -28
  85. data/lib/aws-sdk-s3/plugins/object_lambda_endpoint.rb +25 -0
  86. data/lib/aws-sdk-s3/plugins/redirects.rb +2 -0
  87. data/lib/aws-sdk-s3/plugins/s3_host_id.rb +2 -0
  88. data/lib/aws-sdk-s3/plugins/s3_signer.rb +64 -35
  89. data/lib/aws-sdk-s3/plugins/sse_cpk.rb +3 -1
  90. data/lib/aws-sdk-s3/plugins/streaming_retry.rb +118 -0
  91. data/lib/aws-sdk-s3/plugins/url_encoded_keys.rb +2 -0
  92. data/lib/aws-sdk-s3/presigned_post.rb +72 -32
  93. data/lib/aws-sdk-s3/presigner.rb +162 -66
  94. data/lib/aws-sdk-s3/resource.rb +23 -5
  95. data/lib/aws-sdk-s3/types.rb +6441 -952
  96. data/lib/aws-sdk-s3/waiters.rb +67 -1
  97. data/lib/aws-sdk-s3.rb +12 -6
  98. metadata +35 -12
@@ -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 ObjectSummary
10
13
 
11
14
  extend Aws::Deprecations
@@ -24,6 +27,7 @@ module Aws::S3
24
27
  @key = extract_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,19 +42,36 @@ module Aws::S3
38
42
  @key
39
43
  end
40
44
 
41
-
45
+ # Creation date of the object.
42
46
  # @return [Time]
43
47
  def last_modified
44
48
  data[:last_modified]
45
49
  end
46
50
 
47
-
51
+ # The entity tag is a hash of the object. The ETag reflects changes only
52
+ # to the contents of an object, not its metadata. The ETag may or may
53
+ # not be an MD5 digest of the object data. Whether or not it is depends
54
+ # on how the object was created and how it is encrypted as described
55
+ # below:
56
+ #
57
+ # * Objects created by the PUT Object, POST Object, or Copy operation,
58
+ # or through the AWS Management Console, and are encrypted by SSE-S3
59
+ # or plaintext, have ETags that are an MD5 digest of their object
60
+ # data.
61
+ #
62
+ # * Objects created by the PUT Object, POST Object, or Copy operation,
63
+ # or through the AWS Management Console, and are encrypted by SSE-C or
64
+ # SSE-KMS, have ETags that are not an MD5 digest of their object data.
65
+ #
66
+ # * If an object is created by either the Multipart Upload or Part Copy
67
+ # operation, the ETag is not an MD5 digest, regardless of the method
68
+ # of encryption.
48
69
  # @return [String]
49
70
  def etag
50
71
  data[:etag]
51
72
  end
52
73
 
53
-
74
+ # Size in bytes of the object
54
75
  # @return [Integer]
55
76
  def size
56
77
  data[:size]
@@ -62,7 +83,7 @@ module Aws::S3
62
83
  data[:storage_class]
63
84
  end
64
85
 
65
-
86
+ # The owner of the object
66
87
  # @return [Types::Owner]
67
88
  def owner
68
89
  data[:owner]
@@ -118,10 +139,10 @@ module Aws::S3
118
139
  # @option options [Proc] :before_attempt
119
140
  # @option options [Proc] :before_wait
120
141
  # @return [ObjectSummary]
121
- def wait_until_exists(options = {})
142
+ def wait_until_exists(options = {}, &block)
122
143
  options, params = separate_params_and_options(options)
123
144
  waiter = Waiters::ObjectExists.new(options)
124
- yield_waiter_and_warn(waiter, &Proc.new) if block_given?
145
+ yield_waiter_and_warn(waiter, &block) if block_given?
125
146
  waiter.wait(params.merge(bucket: @bucket_name,
126
147
  key: @key))
127
148
  ObjectSummary.new({
@@ -137,10 +158,10 @@ module Aws::S3
137
158
  # @option options [Proc] :before_attempt
138
159
  # @option options [Proc] :before_wait
139
160
  # @return [ObjectSummary]
140
- def wait_until_not_exists(options = {})
161
+ def wait_until_not_exists(options = {}, &block)
141
162
  options, params = separate_params_and_options(options)
142
163
  waiter = Waiters::ObjectNotExists.new(options)
143
- yield_waiter_and_warn(waiter, &Proc.new) if block_given?
164
+ yield_waiter_and_warn(waiter, &block) if block_given?
144
165
  waiter.wait(params.merge(bucket: @bucket_name,
145
166
  key: @key))
146
167
  ObjectSummary.new({
@@ -155,7 +176,8 @@ module Aws::S3
155
176
  # Waiter polls an API operation until a resource enters a desired
156
177
  # state.
157
178
  #
158
- # @note The waiting operation is performed on a copy. The original resource remains unchanged
179
+ # @note The waiting operation is performed on a copy. The original resource
180
+ # remains unchanged.
159
181
  #
160
182
  # ## Basic Usage
161
183
  #
@@ -168,13 +190,15 @@ module Aws::S3
168
190
  #
169
191
  # ## Example
170
192
  #
171
- # instance.wait_until(max_attempts:10, delay:5) {|instance| instance.state.name == 'running' }
193
+ # instance.wait_until(max_attempts:10, delay:5) do |instance|
194
+ # instance.state.name == 'running'
195
+ # end
172
196
  #
173
197
  # ## Configuration
174
198
  #
175
199
  # You can configure the maximum number of polling attempts, and the
176
- # delay (in seconds) between each polling attempt. The waiting condition is set
177
- # by passing a block to {#wait_until}:
200
+ # delay (in seconds) between each polling attempt. The waiting condition is
201
+ # set by passing a block to {#wait_until}:
178
202
  #
179
203
  # # poll for ~25 seconds
180
204
  # resource.wait_until(max_attempts:5,delay:5) {|resource|...}
@@ -205,17 +229,16 @@ module Aws::S3
205
229
  # # resource did not enter the desired state in time
206
230
  # end
207
231
  #
232
+ # @yieldparam [Resource] resource to be used in the waiting condition.
208
233
  #
209
- # @yield param [Resource] resource to be used in the waiting condition
210
- #
211
- # @raise [Aws::Waiters::Errors::FailureStateError] Raised when the waiter terminates
212
- # because the waiter has entered a state that it will not transition
213
- # out of, preventing success.
234
+ # @raise [Aws::Waiters::Errors::FailureStateError] Raised when the waiter
235
+ # terminates because the waiter has entered a state that it will not
236
+ # transition out of, preventing success.
214
237
  #
215
238
  # yet successful.
216
239
  #
217
- # @raise [Aws::Waiters::Errors::UnexpectedError] Raised when an error is encountered
218
- # while polling for a resource that is not expected.
240
+ # @raise [Aws::Waiters::Errors::UnexpectedError] Raised when an error is
241
+ # encountered while polling for a resource that is not expected.
219
242
  #
220
243
  # @raise [NotImplementedError] Raised when the resource does not
221
244
  #
@@ -272,12 +295,14 @@ module Aws::S3
272
295
  # metadata_directive: "COPY", # accepts COPY, REPLACE
273
296
  # tagging_directive: "COPY", # accepts COPY, REPLACE
274
297
  # server_side_encryption: "AES256", # accepts AES256, aws:kms
275
- # storage_class: "STANDARD", # accepts STANDARD, REDUCED_REDUNDANCY, STANDARD_IA, ONEZONE_IA, INTELLIGENT_TIERING, GLACIER, DEEP_ARCHIVE
298
+ # storage_class: "STANDARD", # accepts STANDARD, REDUCED_REDUNDANCY, STANDARD_IA, ONEZONE_IA, INTELLIGENT_TIERING, GLACIER, DEEP_ARCHIVE, OUTPOSTS
276
299
  # website_redirect_location: "WebsiteRedirectLocation",
277
300
  # sse_customer_algorithm: "SSECustomerAlgorithm",
278
301
  # sse_customer_key: "SSECustomerKey",
279
302
  # sse_customer_key_md5: "SSECustomerKeyMD5",
280
303
  # ssekms_key_id: "SSEKMSKeyId",
304
+ # ssekms_encryption_context: "SSEKMSEncryptionContext",
305
+ # bucket_key_enabled: false,
281
306
  # copy_source_sse_customer_algorithm: "CopySourceSSECustomerAlgorithm",
282
307
  # copy_source_sse_customer_key: "CopySourceSSECustomerKey",
283
308
  # copy_source_sse_customer_key_md5: "CopySourceSSECustomerKeyMD5",
@@ -286,10 +311,14 @@ module Aws::S3
286
311
  # object_lock_mode: "GOVERNANCE", # accepts GOVERNANCE, COMPLIANCE
287
312
  # object_lock_retain_until_date: Time.now,
288
313
  # object_lock_legal_hold_status: "ON", # accepts ON, OFF
314
+ # expected_bucket_owner: "AccountId",
315
+ # expected_source_bucket_owner: "AccountId",
289
316
  # })
290
317
  # @param [Hash] options ({})
291
318
  # @option options [String] :acl
292
319
  # The canned ACL to apply to the object.
320
+ #
321
+ # This action is not supported by Amazon S3 on Outposts.
293
322
  # @option options [String] :cache_control
294
323
  # Specifies caching behavior along the request/reply chain.
295
324
  # @option options [String] :content_disposition
@@ -303,8 +332,50 @@ module Aws::S3
303
332
  # @option options [String] :content_type
304
333
  # A standard MIME type describing the format of the object data.
305
334
  # @option options [required, String] :copy_source
306
- # The name of the source bucket and key name of the source object,
307
- # separated by a slash (/). Must be URL-encoded.
335
+ # Specifies the source object for the copy operation. You specify the
336
+ # value in one of two formats, depending on whether you want to access
337
+ # the source object through an [access point][1]\:
338
+ #
339
+ # * For objects not accessed through an access point, specify the name
340
+ # of the source bucket and the key of the source object, separated by
341
+ # a slash (/). For example, to copy the object `reports/january.pdf`
342
+ # from the bucket `awsexamplebucket`, use
343
+ # `awsexamplebucket/reports/january.pdf`. The value must be URL
344
+ # encoded.
345
+ #
346
+ # * For objects accessed through access points, specify the Amazon
347
+ # Resource Name (ARN) of the object as accessed through the access
348
+ # point, in the format
349
+ # `arn:aws:s3:<Region>:<account-id>:accesspoint/<access-point-name>/object/<key>`.
350
+ # For example, to copy the object `reports/january.pdf` through access
351
+ # point `my-access-point` owned by account `123456789012` in Region
352
+ # `us-west-2`, use the URL encoding of
353
+ # `arn:aws:s3:us-west-2:123456789012:accesspoint/my-access-point/object/reports/january.pdf`.
354
+ # The value must be URL encoded.
355
+ #
356
+ # <note markdown="1"> Amazon S3 supports copy operations using access points only when the
357
+ # source and destination buckets are in the same AWS Region.
358
+ #
359
+ # </note>
360
+ #
361
+ # Alternatively, for objects accessed through Amazon S3 on Outposts,
362
+ # specify the ARN of the object as accessed in the format
363
+ # `arn:aws:s3-outposts:<Region>:<account-id>:outpost/<outpost-id>/object/<key>`.
364
+ # For example, to copy the object `reports/january.pdf` through
365
+ # outpost `my-outpost` owned by account `123456789012` in Region
366
+ # `us-west-2`, use the URL encoding of
367
+ # `arn:aws:s3-outposts:us-west-2:123456789012:outpost/my-outpost/object/reports/january.pdf`.
368
+ # The value must be URL encoded.
369
+ #
370
+ # To copy a specific version of an object, append
371
+ # `?versionId=<version-id>` to the value (for example,
372
+ # `awsexamplebucket/reports/january.pdf?versionId=QUpfdndhfd8438MNFDN93jdnJFkdmqnh893`).
373
+ # If you don't specify a version ID, Amazon S3 copies the latest
374
+ # version of the source object.
375
+ #
376
+ #
377
+ #
378
+ # [1]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/access-points.html
308
379
  # @option options [String] :copy_source_if_match
309
380
  # Copies the object if its entity tag (ETag) matches the specified tag.
310
381
  # @option options [Time,DateTime,Date,Integer,String] :copy_source_if_modified_since
@@ -320,12 +391,20 @@ module Aws::S3
320
391
  # @option options [String] :grant_full_control
321
392
  # Gives the grantee READ, READ\_ACP, and WRITE\_ACP permissions on the
322
393
  # object.
394
+ #
395
+ # This action is not supported by Amazon S3 on Outposts.
323
396
  # @option options [String] :grant_read
324
397
  # Allows grantee to read the object data and its metadata.
398
+ #
399
+ # This action is not supported by Amazon S3 on Outposts.
325
400
  # @option options [String] :grant_read_acp
326
401
  # Allows grantee to read the object ACL.
402
+ #
403
+ # This action is not supported by Amazon S3 on Outposts.
327
404
  # @option options [String] :grant_write_acp
328
405
  # Allows grantee to write the ACL for the applicable object.
406
+ #
407
+ # This action is not supported by Amazon S3 on Outposts.
329
408
  # @option options [Hash<String,String>] :metadata
330
409
  # A map of metadata to store with the object in S3.
331
410
  # @option options [String] :metadata_directive
@@ -335,36 +414,62 @@ module Aws::S3
335
414
  # Specifies whether the object tag-set are copied from the source object
336
415
  # or replaced with tag-set provided in the request.
337
416
  # @option options [String] :server_side_encryption
338
- # The Server-side encryption algorithm used when storing this object in
339
- # S3 (e.g., AES256, aws:kms).
417
+ # The server-side encryption algorithm used when storing this object in
418
+ # Amazon S3 (for example, AES256, aws:kms).
340
419
  # @option options [String] :storage_class
341
- # The type of storage to use for the object. Defaults to 'STANDARD'.
420
+ # By default, Amazon S3 uses the STANDARD Storage Class to store newly
421
+ # created objects. The STANDARD storage class provides high durability
422
+ # and high availability. Depending on performance needs, you can specify
423
+ # a different Storage Class. Amazon S3 on Outposts only uses the
424
+ # OUTPOSTS Storage Class. For more information, see [Storage Classes][1]
425
+ # in the *Amazon S3 User Guide*.
426
+ #
427
+ #
428
+ #
429
+ # [1]: https://docs.aws.amazon.com/AmazonS3/latest/dev/storage-class-intro.html
342
430
  # @option options [String] :website_redirect_location
343
431
  # If the bucket is configured as a website, redirects requests for this
344
432
  # object to another object in the same bucket or to an external URL.
345
433
  # Amazon S3 stores the value of this header in the object metadata.
346
434
  # @option options [String] :sse_customer_algorithm
347
- # Specifies the algorithm to use to when encrypting the object (e.g.,
348
- # AES256).
435
+ # Specifies the algorithm to use to when encrypting the object (for
436
+ # example, AES256).
349
437
  # @option options [String] :sse_customer_key
350
438
  # Specifies the customer-provided encryption key for Amazon S3 to use in
351
439
  # encrypting data. This value is used to store the object and then it is
352
- # discarded; Amazon does not store the encryption key. The key must be
353
- # appropriate for use with the algorithm specified in the
354
- # x-amz-server-side​-encryption​-customer-algorithm header.
440
+ # discarded; Amazon S3 does not store the encryption key. The key must
441
+ # be appropriate for use with the algorithm specified in the
442
+ # `x-amz-server-side-encryption-customer-algorithm` header.
355
443
  # @option options [String] :sse_customer_key_md5
356
444
  # Specifies the 128-bit MD5 digest of the encryption key according to
357
445
  # RFC 1321. Amazon S3 uses this header for a message integrity check to
358
- # ensure the encryption key was transmitted without error.
446
+ # ensure that the encryption key was transmitted without error.
359
447
  # @option options [String] :ssekms_key_id
360
448
  # Specifies the AWS KMS key ID to use for object encryption. All GET and
361
449
  # PUT requests for an object protected by AWS KMS will fail if not made
362
- # via SSL or using SigV4. Documentation on configuring any of the
363
- # officially supported AWS SDKs and CLI can be found at
364
- # http://docs.aws.amazon.com/AmazonS3/latest/dev/UsingAWSSDK.html#specify-signature-version
450
+ # via SSL or using SigV4. For information about configuring using any of
451
+ # the officially supported AWS SDKs and AWS CLI, see [Specifying the
452
+ # Signature Version in Request Authentication][1] in the *Amazon S3 User
453
+ # Guide*.
454
+ #
455
+ #
456
+ #
457
+ # [1]: https://docs.aws.amazon.com/AmazonS3/latest/dev/UsingAWSSDK.html#specify-signature-version
458
+ # @option options [String] :ssekms_encryption_context
459
+ # Specifies the AWS KMS Encryption Context to use for object encryption.
460
+ # The value of this header is a base64-encoded UTF-8 string holding JSON
461
+ # with the encryption context key-value pairs.
462
+ # @option options [Boolean] :bucket_key_enabled
463
+ # Specifies whether Amazon S3 should use an S3 Bucket Key for object
464
+ # encryption with server-side encryption using AWS KMS (SSE-KMS).
465
+ # Setting this header to `true` causes Amazon S3 to use an S3 Bucket Key
466
+ # for object encryption with SSE-KMS.
467
+ #
468
+ # Specifying this header with a COPY action doesn’t affect bucket-level
469
+ # settings for S3 Bucket Key.
365
470
  # @option options [String] :copy_source_sse_customer_algorithm
366
- # Specifies the algorithm to use when decrypting the source object
367
- # (e.g., AES256).
471
+ # Specifies the algorithm to use when decrypting the source object (for
472
+ # example, AES256).
368
473
  # @option options [String] :copy_source_sse_customer_key
369
474
  # Specifies the customer-provided encryption key for Amazon S3 to use to
370
475
  # decrypt the source object. The encryption key provided in this header
@@ -372,17 +477,21 @@ module Aws::S3
372
477
  # @option options [String] :copy_source_sse_customer_key_md5
373
478
  # Specifies the 128-bit MD5 digest of the encryption key according to
374
479
  # RFC 1321. Amazon S3 uses this header for a message integrity check to
375
- # ensure the encryption key was transmitted without error.
480
+ # ensure that the encryption key was transmitted without error.
376
481
  # @option options [String] :request_payer
377
- # Confirms that the requester knows that she or he will be charged for
378
- # the request. Bucket owners need not specify this parameter in their
379
- # requests. Documentation on downloading objects from requester pays
380
- # buckets can be found at
381
- # http://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html
482
+ # Confirms that the requester knows that they will be charged for the
483
+ # request. Bucket owners need not specify this parameter in their
484
+ # requests. For information about downloading objects from requester
485
+ # pays buckets, see [Downloading Objects in Requestor Pays Buckets][1]
486
+ # in the *Amazon S3 User Guide*.
487
+ #
488
+ #
489
+ #
490
+ # [1]: https://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html
382
491
  # @option options [String] :tagging
383
492
  # The tag-set for the object destination object this value must be used
384
- # in conjunction with the TaggingDirective. The tag-set must be encoded
385
- # as URL Query parameters
493
+ # in conjunction with the `TaggingDirective`. The tag-set must be
494
+ # encoded as URL Query parameters.
386
495
  # @option options [String] :object_lock_mode
387
496
  # The Object Lock mode that you want to apply to the copied object.
388
497
  # @option options [Time,DateTime,Date,Integer,String] :object_lock_retain_until_date
@@ -390,6 +499,14 @@ module Aws::S3
390
499
  # expire.
391
500
  # @option options [String] :object_lock_legal_hold_status
392
501
  # Specifies whether you want to apply a Legal Hold to the copied object.
502
+ # @option options [String] :expected_bucket_owner
503
+ # The account ID of the expected destination bucket owner. If the
504
+ # destination bucket is owned by a different account, the request will
505
+ # fail with an HTTP `403 (Access Denied)` error.
506
+ # @option options [String] :expected_source_bucket_owner
507
+ # The account ID of the expected source bucket owner. If the source
508
+ # bucket is owned by a different account, the request will fail with an
509
+ # HTTP `403 (Access Denied)` error.
393
510
  # @return [Types::CopyObjectOutput]
394
511
  def copy_from(options = {})
395
512
  options = options.merge(
@@ -407,22 +524,33 @@ module Aws::S3
407
524
  # version_id: "ObjectVersionId",
408
525
  # request_payer: "requester", # accepts requester
409
526
  # bypass_governance_retention: false,
527
+ # expected_bucket_owner: "AccountId",
410
528
  # })
411
529
  # @param [Hash] options ({})
412
530
  # @option options [String] :mfa
413
531
  # The concatenation of the authentication device's serial number, a
414
532
  # space, and the value that is displayed on your authentication device.
533
+ # Required to permanently delete a versioned object if versioning is
534
+ # configured with MFA delete enabled.
415
535
  # @option options [String] :version_id
416
536
  # VersionId used to reference a specific version of the object.
417
537
  # @option options [String] :request_payer
418
- # Confirms that the requester knows that she or he will be charged for
419
- # the request. Bucket owners need not specify this parameter in their
420
- # requests. Documentation on downloading objects from requester pays
421
- # buckets can be found at
422
- # http://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html
538
+ # Confirms that the requester knows that they will be charged for the
539
+ # request. Bucket owners need not specify this parameter in their
540
+ # requests. For information about downloading objects from requester
541
+ # pays buckets, see [Downloading Objects in Requestor Pays Buckets][1]
542
+ # in the *Amazon S3 User Guide*.
543
+ #
544
+ #
545
+ #
546
+ # [1]: https://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html
423
547
  # @option options [Boolean] :bypass_governance_retention
424
548
  # Indicates whether S3 Object Lock should bypass Governance-mode
425
549
  # restrictions to process this operation.
550
+ # @option options [String] :expected_bucket_owner
551
+ # The account ID of the expected bucket owner. If the bucket is owned by
552
+ # a different account, the request will fail with an HTTP `403 (Access
553
+ # Denied)` error.
426
554
  # @return [Types::DeleteObjectOutput]
427
555
  def delete(options = {})
428
556
  options = options.merge(
@@ -453,6 +581,7 @@ module Aws::S3
453
581
  # sse_customer_key_md5: "SSECustomerKeyMD5",
454
582
  # request_payer: "requester", # accepts requester
455
583
  # part_number: 1,
584
+ # expected_bucket_owner: "AccountId",
456
585
  # })
457
586
  # @param [Hash] options ({})
458
587
  # @option options [String] :if_match
@@ -469,46 +598,63 @@ module Aws::S3
469
598
  # time, otherwise return a 412 (precondition failed).
470
599
  # @option options [String] :range
471
600
  # Downloads the specified range bytes of an object. For more information
472
- # about the HTTP Range header, go to
473
- # http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.35.
601
+ # about the HTTP Range header, see
602
+ # [https://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.35][1].
603
+ #
604
+ # <note markdown="1"> Amazon S3 doesn't support retrieving multiple ranges of data per
605
+ # `GET` request.
606
+ #
607
+ # </note>
608
+ #
609
+ #
610
+ #
611
+ # [1]: https://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.35
474
612
  # @option options [String] :response_cache_control
475
- # Sets the Cache-Control header of the response.
613
+ # Sets the `Cache-Control` header of the response.
476
614
  # @option options [String] :response_content_disposition
477
- # Sets the Content-Disposition header of the response
615
+ # Sets the `Content-Disposition` header of the response
478
616
  # @option options [String] :response_content_encoding
479
- # Sets the Content-Encoding header of the response.
617
+ # Sets the `Content-Encoding` header of the response.
480
618
  # @option options [String] :response_content_language
481
- # Sets the Content-Language header of the response.
619
+ # Sets the `Content-Language` header of the response.
482
620
  # @option options [String] :response_content_type
483
- # Sets the Content-Type header of the response.
621
+ # Sets the `Content-Type` header of the response.
484
622
  # @option options [Time,DateTime,Date,Integer,String] :response_expires
485
- # Sets the Expires header of the response.
623
+ # Sets the `Expires` header of the response.
486
624
  # @option options [String] :version_id
487
625
  # VersionId used to reference a specific version of the object.
488
626
  # @option options [String] :sse_customer_algorithm
489
- # Specifies the algorithm to use to when encrypting the object (e.g.,
490
- # AES256).
627
+ # Specifies the algorithm to use to when decrypting the object (for
628
+ # example, AES256).
491
629
  # @option options [String] :sse_customer_key
492
- # Specifies the customer-provided encryption key for Amazon S3 to use in
493
- # encrypting data. This value is used to store the object and then it is
494
- # discarded; Amazon does not store the encryption key. The key must be
495
- # appropriate for use with the algorithm specified in the
496
- # x-amz-server-side​-encryption​-customer-algorithm header.
630
+ # Specifies the customer-provided encryption key for Amazon S3 used to
631
+ # encrypt the data. This value is used to decrypt the object when
632
+ # recovering it and must match the one used when storing the data. The
633
+ # key must be appropriate for use with the algorithm specified in the
634
+ # `x-amz-server-side-encryption-customer-algorithm` header.
497
635
  # @option options [String] :sse_customer_key_md5
498
636
  # Specifies the 128-bit MD5 digest of the encryption key according to
499
637
  # RFC 1321. Amazon S3 uses this header for a message integrity check to
500
- # ensure the encryption key was transmitted without error.
638
+ # ensure that the encryption key was transmitted without error.
501
639
  # @option options [String] :request_payer
502
- # Confirms that the requester knows that she or he will be charged for
503
- # the request. Bucket owners need not specify this parameter in their
504
- # requests. Documentation on downloading objects from requester pays
505
- # buckets can be found at
506
- # http://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html
640
+ # Confirms that the requester knows that they will be charged for the
641
+ # request. Bucket owners need not specify this parameter in their
642
+ # requests. For information about downloading objects from requester
643
+ # pays buckets, see [Downloading Objects in Requestor Pays Buckets][1]
644
+ # in the *Amazon S3 User Guide*.
645
+ #
646
+ #
647
+ #
648
+ # [1]: https://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html
507
649
  # @option options [Integer] :part_number
508
650
  # Part number of the object being read. This is a positive integer
509
651
  # between 1 and 10,000. Effectively performs a 'ranged' GET request
510
652
  # for the part specified. Useful for downloading just a part of an
511
653
  # object.
654
+ # @option options [String] :expected_bucket_owner
655
+ # The account ID of the expected bucket owner. If the bucket is owned by
656
+ # a different account, the request will fail with an HTTP `403 (Access
657
+ # Denied)` error.
512
658
  # @return [Types::GetObjectOutput]
513
659
  def get(options = {}, &block)
514
660
  options = options.merge(
@@ -537,21 +683,26 @@ module Aws::S3
537
683
  # "MetadataKey" => "MetadataValue",
538
684
  # },
539
685
  # server_side_encryption: "AES256", # accepts AES256, aws:kms
540
- # storage_class: "STANDARD", # accepts STANDARD, REDUCED_REDUNDANCY, STANDARD_IA, ONEZONE_IA, INTELLIGENT_TIERING, GLACIER, DEEP_ARCHIVE
686
+ # storage_class: "STANDARD", # accepts STANDARD, REDUCED_REDUNDANCY, STANDARD_IA, ONEZONE_IA, INTELLIGENT_TIERING, GLACIER, DEEP_ARCHIVE, OUTPOSTS
541
687
  # website_redirect_location: "WebsiteRedirectLocation",
542
688
  # sse_customer_algorithm: "SSECustomerAlgorithm",
543
689
  # sse_customer_key: "SSECustomerKey",
544
690
  # sse_customer_key_md5: "SSECustomerKeyMD5",
545
691
  # ssekms_key_id: "SSEKMSKeyId",
692
+ # ssekms_encryption_context: "SSEKMSEncryptionContext",
693
+ # bucket_key_enabled: false,
546
694
  # request_payer: "requester", # accepts requester
547
695
  # tagging: "TaggingHeader",
548
696
  # object_lock_mode: "GOVERNANCE", # accepts GOVERNANCE, COMPLIANCE
549
697
  # object_lock_retain_until_date: Time.now,
550
698
  # object_lock_legal_hold_status: "ON", # accepts ON, OFF
699
+ # expected_bucket_owner: "AccountId",
551
700
  # })
552
701
  # @param [Hash] options ({})
553
702
  # @option options [String] :acl
554
703
  # The canned ACL to apply to the object.
704
+ #
705
+ # This action is not supported by Amazon S3 on Outposts.
555
706
  # @option options [String] :cache_control
556
707
  # Specifies caching behavior along the request/reply chain.
557
708
  # @option options [String] :content_disposition
@@ -569,51 +720,89 @@ module Aws::S3
569
720
  # @option options [String] :grant_full_control
570
721
  # Gives the grantee READ, READ\_ACP, and WRITE\_ACP permissions on the
571
722
  # object.
723
+ #
724
+ # This action is not supported by Amazon S3 on Outposts.
572
725
  # @option options [String] :grant_read
573
726
  # Allows grantee to read the object data and its metadata.
727
+ #
728
+ # This action is not supported by Amazon S3 on Outposts.
574
729
  # @option options [String] :grant_read_acp
575
730
  # Allows grantee to read the object ACL.
731
+ #
732
+ # This action is not supported by Amazon S3 on Outposts.
576
733
  # @option options [String] :grant_write_acp
577
734
  # Allows grantee to write the ACL for the applicable object.
735
+ #
736
+ # This action is not supported by Amazon S3 on Outposts.
578
737
  # @option options [Hash<String,String>] :metadata
579
738
  # A map of metadata to store with the object in S3.
580
739
  # @option options [String] :server_side_encryption
581
- # The Server-side encryption algorithm used when storing this object in
582
- # S3 (e.g., AES256, aws:kms).
740
+ # The server-side encryption algorithm used when storing this object in
741
+ # Amazon S3 (for example, AES256, aws:kms).
583
742
  # @option options [String] :storage_class
584
- # The type of storage to use for the object. Defaults to 'STANDARD'.
743
+ # By default, Amazon S3 uses the STANDARD Storage Class to store newly
744
+ # created objects. The STANDARD storage class provides high durability
745
+ # and high availability. Depending on performance needs, you can specify
746
+ # a different Storage Class. Amazon S3 on Outposts only uses the
747
+ # OUTPOSTS Storage Class. For more information, see [Storage Classes][1]
748
+ # in the *Amazon S3 User Guide*.
749
+ #
750
+ #
751
+ #
752
+ # [1]: https://docs.aws.amazon.com/AmazonS3/latest/dev/storage-class-intro.html
585
753
  # @option options [String] :website_redirect_location
586
754
  # If the bucket is configured as a website, redirects requests for this
587
755
  # object to another object in the same bucket or to an external URL.
588
756
  # Amazon S3 stores the value of this header in the object metadata.
589
757
  # @option options [String] :sse_customer_algorithm
590
- # Specifies the algorithm to use to when encrypting the object (e.g.,
591
- # AES256).
758
+ # Specifies the algorithm to use to when encrypting the object (for
759
+ # example, AES256).
592
760
  # @option options [String] :sse_customer_key
593
761
  # Specifies the customer-provided encryption key for Amazon S3 to use in
594
762
  # encrypting data. This value is used to store the object and then it is
595
- # discarded; Amazon does not store the encryption key. The key must be
596
- # appropriate for use with the algorithm specified in the
597
- # x-amz-server-side​-encryption​-customer-algorithm header.
763
+ # discarded; Amazon S3 does not store the encryption key. The key must
764
+ # be appropriate for use with the algorithm specified in the
765
+ # `x-amz-server-side-encryption-customer-algorithm` header.
598
766
  # @option options [String] :sse_customer_key_md5
599
767
  # Specifies the 128-bit MD5 digest of the encryption key according to
600
768
  # RFC 1321. Amazon S3 uses this header for a message integrity check to
601
- # ensure the encryption key was transmitted without error.
769
+ # ensure that the encryption key was transmitted without error.
602
770
  # @option options [String] :ssekms_key_id
603
- # Specifies the AWS KMS key ID to use for object encryption. All GET and
604
- # PUT requests for an object protected by AWS KMS will fail if not made
605
- # via SSL or using SigV4. Documentation on configuring any of the
606
- # officially supported AWS SDKs and CLI can be found at
607
- # http://docs.aws.amazon.com/AmazonS3/latest/dev/UsingAWSSDK.html#specify-signature-version
771
+ # Specifies the ID of the symmetric customer managed AWS KMS CMK to use
772
+ # for object encryption. All GET and PUT requests for an object
773
+ # protected by AWS KMS will fail if not made via SSL or using SigV4. For
774
+ # information about configuring using any of the officially supported
775
+ # AWS SDKs and AWS CLI, see [Specifying the Signature Version in Request
776
+ # Authentication][1] in the *Amazon S3 User Guide*.
777
+ #
778
+ #
779
+ #
780
+ # [1]: https://docs.aws.amazon.com/AmazonS3/latest/dev/UsingAWSSDK.html#specify-signature-version
781
+ # @option options [String] :ssekms_encryption_context
782
+ # Specifies the AWS KMS Encryption Context to use for object encryption.
783
+ # The value of this header is a base64-encoded UTF-8 string holding JSON
784
+ # with the encryption context key-value pairs.
785
+ # @option options [Boolean] :bucket_key_enabled
786
+ # Specifies whether Amazon S3 should use an S3 Bucket Key for object
787
+ # encryption with server-side encryption using AWS KMS (SSE-KMS).
788
+ # Setting this header to `true` causes Amazon S3 to use an S3 Bucket Key
789
+ # for object encryption with SSE-KMS.
790
+ #
791
+ # Specifying this header with an object action doesn’t affect
792
+ # bucket-level settings for S3 Bucket Key.
608
793
  # @option options [String] :request_payer
609
- # Confirms that the requester knows that she or he will be charged for
610
- # the request. Bucket owners need not specify this parameter in their
611
- # requests. Documentation on downloading objects from requester pays
612
- # buckets can be found at
613
- # http://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html
794
+ # Confirms that the requester knows that they will be charged for the
795
+ # request. Bucket owners need not specify this parameter in their
796
+ # requests. For information about downloading objects from requester
797
+ # pays buckets, see [Downloading Objects in Requestor Pays Buckets][1]
798
+ # in the *Amazon S3 User Guide*.
799
+ #
800
+ #
801
+ #
802
+ # [1]: https://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html
614
803
  # @option options [String] :tagging
615
804
  # The tag-set for the object. The tag-set must be encoded as URL Query
616
- # parameters
805
+ # parameters.
617
806
  # @option options [String] :object_lock_mode
618
807
  # Specifies the Object Lock mode that you want to apply to the uploaded
619
808
  # object.
@@ -622,6 +811,10 @@ module Aws::S3
622
811
  # @option options [String] :object_lock_legal_hold_status
623
812
  # Specifies whether you want to apply a Legal Hold to the uploaded
624
813
  # object.
814
+ # @option options [String] :expected_bucket_owner
815
+ # The account ID of the expected bucket owner. If the bucket is owned by
816
+ # a different account, the request will fail with an HTTP `403 (Access
817
+ # Denied)` error.
625
818
  # @return [MultipartUpload]
626
819
  def initiate_multipart_upload(options = {})
627
820
  options = options.merge(
@@ -658,88 +851,199 @@ module Aws::S3
658
851
  # "MetadataKey" => "MetadataValue",
659
852
  # },
660
853
  # server_side_encryption: "AES256", # accepts AES256, aws:kms
661
- # storage_class: "STANDARD", # accepts STANDARD, REDUCED_REDUNDANCY, STANDARD_IA, ONEZONE_IA, INTELLIGENT_TIERING, GLACIER, DEEP_ARCHIVE
854
+ # storage_class: "STANDARD", # accepts STANDARD, REDUCED_REDUNDANCY, STANDARD_IA, ONEZONE_IA, INTELLIGENT_TIERING, GLACIER, DEEP_ARCHIVE, OUTPOSTS
662
855
  # website_redirect_location: "WebsiteRedirectLocation",
663
856
  # sse_customer_algorithm: "SSECustomerAlgorithm",
664
857
  # sse_customer_key: "SSECustomerKey",
665
858
  # sse_customer_key_md5: "SSECustomerKeyMD5",
666
859
  # ssekms_key_id: "SSEKMSKeyId",
860
+ # ssekms_encryption_context: "SSEKMSEncryptionContext",
861
+ # bucket_key_enabled: false,
667
862
  # request_payer: "requester", # accepts requester
668
863
  # tagging: "TaggingHeader",
669
864
  # object_lock_mode: "GOVERNANCE", # accepts GOVERNANCE, COMPLIANCE
670
865
  # object_lock_retain_until_date: Time.now,
671
866
  # object_lock_legal_hold_status: "ON", # accepts ON, OFF
867
+ # expected_bucket_owner: "AccountId",
672
868
  # })
673
869
  # @param [Hash] options ({})
674
870
  # @option options [String] :acl
675
- # The canned ACL to apply to the object.
676
- # @option options [String, IO] :body
871
+ # The canned ACL to apply to the object. For more information, see
872
+ # [Canned ACL][1].
873
+ #
874
+ # This action is not supported by Amazon S3 on Outposts.
875
+ #
876
+ #
877
+ #
878
+ # [1]: https://docs.aws.amazon.com/AmazonS3/latest/dev/acl-overview.html#CannedACL
879
+ # @option options [String, StringIO, File] :body
677
880
  # Object data.
678
881
  # @option options [String] :cache_control
679
- # Specifies caching behavior along the request/reply chain.
882
+ # Can be used to specify caching behavior along the request/reply chain.
883
+ # For more information, see
884
+ # [http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.9][1].
885
+ #
886
+ #
887
+ #
888
+ # [1]: http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.9
680
889
  # @option options [String] :content_disposition
681
- # Specifies presentational information for the object.
890
+ # Specifies presentational information for the object. For more
891
+ # information, see
892
+ # [http://www.w3.org/Protocols/rfc2616/rfc2616-sec19.html#sec19.5.1][1].
893
+ #
894
+ #
895
+ #
896
+ # [1]: http://www.w3.org/Protocols/rfc2616/rfc2616-sec19.html#sec19.5.1
682
897
  # @option options [String] :content_encoding
683
898
  # Specifies what content encodings have been applied to the object and
684
899
  # thus what decoding mechanisms must be applied to obtain the media-type
685
- # referenced by the Content-Type header field.
900
+ # referenced by the Content-Type header field. For more information, see
901
+ # [http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.11][1].
902
+ #
903
+ #
904
+ #
905
+ # [1]: http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.11
686
906
  # @option options [String] :content_language
687
907
  # The language the content is in.
688
908
  # @option options [Integer] :content_length
689
909
  # Size of the body in bytes. This parameter is useful when the size of
690
- # the body cannot be determined automatically.
910
+ # the body cannot be determined automatically. For more information, see
911
+ # [http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.13][1].
912
+ #
913
+ #
914
+ #
915
+ # [1]: http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.13
691
916
  # @option options [String] :content_md5
692
- # The base64-encoded 128-bit MD5 digest of the part data. This parameter
693
- # is auto-populated when using the command from the CLI
917
+ # The base64-encoded 128-bit MD5 digest of the message (without the
918
+ # headers) according to RFC 1864. This header can be used as a message
919
+ # integrity check to verify that the data is the same data that was
920
+ # originally sent. Although it is optional, we recommend using the
921
+ # Content-MD5 mechanism as an end-to-end integrity check. For more
922
+ # information about REST request authentication, see [REST
923
+ # Authentication][1].
924
+ #
925
+ #
926
+ #
927
+ # [1]: https://docs.aws.amazon.com/AmazonS3/latest/dev/RESTAuthentication.html
694
928
  # @option options [String] :content_type
695
- # A standard MIME type describing the format of the object data.
929
+ # A standard MIME type describing the format of the contents. For more
930
+ # information, see
931
+ # [http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.17][1].
932
+ #
933
+ #
934
+ #
935
+ # [1]: http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.17
696
936
  # @option options [Time,DateTime,Date,Integer,String] :expires
697
- # The date and time at which the object is no longer cacheable.
937
+ # The date and time at which the object is no longer cacheable. For more
938
+ # information, see
939
+ # [http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.21][1].
940
+ #
941
+ #
942
+ #
943
+ # [1]: http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.21
698
944
  # @option options [String] :grant_full_control
699
945
  # Gives the grantee READ, READ\_ACP, and WRITE\_ACP permissions on the
700
946
  # object.
947
+ #
948
+ # This action is not supported by Amazon S3 on Outposts.
701
949
  # @option options [String] :grant_read
702
950
  # Allows grantee to read the object data and its metadata.
951
+ #
952
+ # This action is not supported by Amazon S3 on Outposts.
703
953
  # @option options [String] :grant_read_acp
704
954
  # Allows grantee to read the object ACL.
955
+ #
956
+ # This action is not supported by Amazon S3 on Outposts.
705
957
  # @option options [String] :grant_write_acp
706
958
  # Allows grantee to write the ACL for the applicable object.
959
+ #
960
+ # This action is not supported by Amazon S3 on Outposts.
707
961
  # @option options [Hash<String,String>] :metadata
708
962
  # A map of metadata to store with the object in S3.
709
963
  # @option options [String] :server_side_encryption
710
- # The Server-side encryption algorithm used when storing this object in
711
- # S3 (e.g., AES256, aws:kms).
964
+ # The server-side encryption algorithm used when storing this object in
965
+ # Amazon S3 (for example, AES256, aws:kms).
712
966
  # @option options [String] :storage_class
713
- # The type of storage to use for the object. Defaults to 'STANDARD'.
967
+ # By default, Amazon S3 uses the STANDARD Storage Class to store newly
968
+ # created objects. The STANDARD storage class provides high durability
969
+ # and high availability. Depending on performance needs, you can specify
970
+ # a different Storage Class. Amazon S3 on Outposts only uses the
971
+ # OUTPOSTS Storage Class. For more information, see [Storage Classes][1]
972
+ # in the *Amazon S3 User Guide*.
973
+ #
974
+ #
975
+ #
976
+ # [1]: https://docs.aws.amazon.com/AmazonS3/latest/dev/storage-class-intro.html
714
977
  # @option options [String] :website_redirect_location
715
978
  # If the bucket is configured as a website, redirects requests for this
716
979
  # object to another object in the same bucket or to an external URL.
717
- # Amazon S3 stores the value of this header in the object metadata.
980
+ # Amazon S3 stores the value of this header in the object metadata. For
981
+ # information about object metadata, see [Object Key and Metadata][1].
982
+ #
983
+ # In the following example, the request header sets the redirect to an
984
+ # object (anotherPage.html) in the same bucket:
985
+ #
986
+ # `x-amz-website-redirect-location: /anotherPage.html`
987
+ #
988
+ # In the following example, the request header sets the object redirect
989
+ # to another website:
990
+ #
991
+ # `x-amz-website-redirect-location: http://www.example.com/`
992
+ #
993
+ # For more information about website hosting in Amazon S3, see [Hosting
994
+ # Websites on Amazon S3][2] and [How to Configure Website Page
995
+ # Redirects][3].
996
+ #
997
+ #
998
+ #
999
+ # [1]: https://docs.aws.amazon.com/AmazonS3/latest/dev/UsingMetadata.html
1000
+ # [2]: https://docs.aws.amazon.com/AmazonS3/latest/dev/WebsiteHosting.html
1001
+ # [3]: https://docs.aws.amazon.com/AmazonS3/latest/dev/how-to-page-redirect.html
718
1002
  # @option options [String] :sse_customer_algorithm
719
- # Specifies the algorithm to use to when encrypting the object (e.g.,
720
- # AES256).
1003
+ # Specifies the algorithm to use to when encrypting the object (for
1004
+ # example, AES256).
721
1005
  # @option options [String] :sse_customer_key
722
1006
  # Specifies the customer-provided encryption key for Amazon S3 to use in
723
1007
  # encrypting data. This value is used to store the object and then it is
724
- # discarded; Amazon does not store the encryption key. The key must be
725
- # appropriate for use with the algorithm specified in the
726
- # x-amz-server-side​-encryption​-customer-algorithm header.
1008
+ # discarded; Amazon S3 does not store the encryption key. The key must
1009
+ # be appropriate for use with the algorithm specified in the
1010
+ # `x-amz-server-side-encryption-customer-algorithm` header.
727
1011
  # @option options [String] :sse_customer_key_md5
728
1012
  # Specifies the 128-bit MD5 digest of the encryption key according to
729
1013
  # RFC 1321. Amazon S3 uses this header for a message integrity check to
730
- # ensure the encryption key was transmitted without error.
1014
+ # ensure that the encryption key was transmitted without error.
731
1015
  # @option options [String] :ssekms_key_id
732
- # Specifies the AWS KMS key ID to use for object encryption. All GET and
733
- # PUT requests for an object protected by AWS KMS will fail if not made
734
- # via SSL or using SigV4. Documentation on configuring any of the
735
- # officially supported AWS SDKs and CLI can be found at
736
- # http://docs.aws.amazon.com/AmazonS3/latest/dev/UsingAWSSDK.html#specify-signature-version
1016
+ # If `x-amz-server-side-encryption` is present and has the value of
1017
+ # `aws:kms`, this header specifies the ID of the AWS Key Management
1018
+ # Service (AWS KMS) symmetrical customer managed customer master key
1019
+ # (CMK) that was used for the object. If you specify
1020
+ # `x-amz-server-side-encryption:aws:kms`, but do not provide`
1021
+ # x-amz-server-side-encryption-aws-kms-key-id`, Amazon S3 uses the AWS
1022
+ # managed CMK in AWS to protect the data. If the KMS key does not exist
1023
+ # in the same account issuing the command, you must use the full ARN and
1024
+ # not just the ID.
1025
+ # @option options [String] :ssekms_encryption_context
1026
+ # Specifies the AWS KMS Encryption Context to use for object encryption.
1027
+ # The value of this header is a base64-encoded UTF-8 string holding JSON
1028
+ # with the encryption context key-value pairs.
1029
+ # @option options [Boolean] :bucket_key_enabled
1030
+ # Specifies whether Amazon S3 should use an S3 Bucket Key for object
1031
+ # encryption with server-side encryption using AWS KMS (SSE-KMS).
1032
+ # Setting this header to `true` causes Amazon S3 to use an S3 Bucket Key
1033
+ # for object encryption with SSE-KMS.
1034
+ #
1035
+ # Specifying this header with a PUT action doesn’t affect bucket-level
1036
+ # settings for S3 Bucket Key.
737
1037
  # @option options [String] :request_payer
738
- # Confirms that the requester knows that she or he will be charged for
739
- # the request. Bucket owners need not specify this parameter in their
740
- # requests. Documentation on downloading objects from requester pays
741
- # buckets can be found at
742
- # http://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html
1038
+ # Confirms that the requester knows that they will be charged for the
1039
+ # request. Bucket owners need not specify this parameter in their
1040
+ # requests. For information about downloading objects from requester
1041
+ # pays buckets, see [Downloading Objects in Requestor Pays Buckets][1]
1042
+ # in the *Amazon S3 User Guide*.
1043
+ #
1044
+ #
1045
+ #
1046
+ # [1]: https://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html
743
1047
  # @option options [String] :tagging
744
1048
  # The tag-set for the object. The tag-set must be encoded as URL Query
745
1049
  # parameters. (For example, "Key1=Value1")
@@ -748,7 +1052,16 @@ module Aws::S3
748
1052
  # @option options [Time,DateTime,Date,Integer,String] :object_lock_retain_until_date
749
1053
  # The date and time when you want this object's Object Lock to expire.
750
1054
  # @option options [String] :object_lock_legal_hold_status
751
- # The Legal Hold status that you want to apply to the specified object.
1055
+ # Specifies whether a legal hold will be applied to this object. For
1056
+ # more information about S3 Object Lock, see [Object Lock][1].
1057
+ #
1058
+ #
1059
+ #
1060
+ # [1]: https://docs.aws.amazon.com/AmazonS3/latest/dev/object-lock.html
1061
+ # @option options [String] :expected_bucket_owner
1062
+ # The account ID of the expected bucket owner. If the bucket is owned by
1063
+ # a different account, the request will fail with an HTTP `403 (Access
1064
+ # Denied)` error.
752
1065
  # @return [Types::PutObjectOutput]
753
1066
  def put(options = {})
754
1067
  options = options.merge(
@@ -840,22 +1153,32 @@ module Aws::S3
840
1153
  # value: "MetadataValue",
841
1154
  # },
842
1155
  # ],
843
- # storage_class: "STANDARD", # accepts STANDARD, REDUCED_REDUNDANCY, STANDARD_IA, ONEZONE_IA, INTELLIGENT_TIERING, GLACIER, DEEP_ARCHIVE
1156
+ # storage_class: "STANDARD", # accepts STANDARD, REDUCED_REDUNDANCY, STANDARD_IA, ONEZONE_IA, INTELLIGENT_TIERING, GLACIER, DEEP_ARCHIVE, OUTPOSTS
844
1157
  # },
845
1158
  # },
846
1159
  # },
847
1160
  # request_payer: "requester", # accepts requester
1161
+ # expected_bucket_owner: "AccountId",
848
1162
  # })
849
1163
  # @param [Hash] options ({})
850
1164
  # @option options [String] :version_id
1165
+ # VersionId used to reference a specific version of the object.
851
1166
  # @option options [Types::RestoreRequest] :restore_request
852
1167
  # Container for restore job parameters.
853
1168
  # @option options [String] :request_payer
854
- # Confirms that the requester knows that she or he will be charged for
855
- # the request. Bucket owners need not specify this parameter in their
856
- # requests. Documentation on downloading objects from requester pays
857
- # buckets can be found at
858
- # http://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html
1169
+ # Confirms that the requester knows that they will be charged for the
1170
+ # request. Bucket owners need not specify this parameter in their
1171
+ # requests. For information about downloading objects from requester
1172
+ # pays buckets, see [Downloading Objects in Requestor Pays Buckets][1]
1173
+ # in the *Amazon S3 User Guide*.
1174
+ #
1175
+ #
1176
+ #
1177
+ # [1]: https://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html
1178
+ # @option options [String] :expected_bucket_owner
1179
+ # The account ID of the expected bucket owner. If the bucket is owned by
1180
+ # a different account, the request will fail with an HTTP `403 (Access
1181
+ # Denied)` error.
859
1182
  # @return [Types::RestoreObjectOutput]
860
1183
  def restore_object(options = {})
861
1184
  options = options.merge(
@@ -952,8 +1275,8 @@ module Aws::S3
952
1275
 
953
1276
  def yield_waiter_and_warn(waiter, &block)
954
1277
  if !@waiter_block_warned
955
- msg = "pass options to configure the waiter; "
956
- msg << "yielding the waiter is deprecated"
1278
+ msg = "pass options to configure the waiter; "\
1279
+ "yielding the waiter is deprecated"
957
1280
  warn(msg)
958
1281
  @waiter_block_warned = true
959
1282
  end
@@ -961,7 +1284,9 @@ module Aws::S3
961
1284
  end
962
1285
 
963
1286
  def separate_params_and_options(options)
964
- opts = Set.new([:client, :max_attempts, :delay, :before_attempt, :before_wait])
1287
+ opts = Set.new(
1288
+ [:client, :max_attempts, :delay, :before_attempt, :before_wait]
1289
+ )
965
1290
  waiter_opts = {}
966
1291
  waiter_params = {}
967
1292
  options.each_pair do |key, value|
@@ -985,21 +1310,32 @@ module Aws::S3
985
1310
  # mfa: "MFA",
986
1311
  # request_payer: "requester", # accepts requester
987
1312
  # bypass_governance_retention: false,
1313
+ # expected_bucket_owner: "AccountId",
988
1314
  # })
989
1315
  # @param options ({})
990
1316
  # @option options [String] :mfa
991
1317
  # The concatenation of the authentication device's serial number, a
992
1318
  # space, and the value that is displayed on your authentication device.
1319
+ # Required to permanently delete a versioned object if versioning is
1320
+ # configured with MFA delete enabled.
993
1321
  # @option options [String] :request_payer
994
- # Confirms that the requester knows that she or he will be charged for
995
- # the request. Bucket owners need not specify this parameter in their
996
- # requests. Documentation on downloading objects from requester pays
997
- # buckets can be found at
998
- # http://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html
1322
+ # Confirms that the requester knows that they will be charged for the
1323
+ # request. Bucket owners need not specify this parameter in their
1324
+ # requests. For information about downloading objects from requester
1325
+ # pays buckets, see [Downloading Objects in Requestor Pays Buckets][1]
1326
+ # in the *Amazon S3 User Guide*.
1327
+ #
1328
+ #
1329
+ #
1330
+ # [1]: https://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html
999
1331
  # @option options [Boolean] :bypass_governance_retention
1000
1332
  # Specifies whether you want to delete this object even if it has a
1001
1333
  # Governance-type Object Lock in place. You must have sufficient
1002
1334
  # permissions to perform this operation.
1335
+ # @option options [String] :expected_bucket_owner
1336
+ # The account ID of the expected bucket owner. If the bucket is owned by
1337
+ # a different account, the request will fail with an HTTP `403 (Access
1338
+ # Denied)` error.
1003
1339
  # @return [void]
1004
1340
  def batch_delete!(options = {})
1005
1341
  batch_enum.each do |batch|