aws-sdk-s3 1.31.0 → 1.111.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (99) hide show
  1. checksums.yaml +5 -5
  2. data/CHANGELOG.md +868 -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 +298 -78
  10. data/lib/aws-sdk-s3/bucket_acl.rb +41 -15
  11. data/lib/aws-sdk-s3/bucket_cors.rb +51 -14
  12. data/lib/aws-sdk-s3/bucket_lifecycle.rb +38 -16
  13. data/lib/aws-sdk-s3/bucket_lifecycle_configuration.rb +40 -16
  14. data/lib/aws-sdk-s3/bucket_logging.rb +36 -15
  15. data/lib/aws-sdk-s3/bucket_notification.rb +44 -18
  16. data/lib/aws-sdk-s3/bucket_policy.rb +35 -13
  17. data/lib/aws-sdk-s3/bucket_region_cache.rb +2 -0
  18. data/lib/aws-sdk-s3/bucket_request_payment.rb +35 -12
  19. data/lib/aws-sdk-s3/bucket_tagging.rb +43 -14
  20. data/lib/aws-sdk-s3/bucket_versioning.rb +70 -12
  21. data/lib/aws-sdk-s3/bucket_website.rb +50 -17
  22. data/lib/aws-sdk-s3/client.rb +7851 -628
  23. data/lib/aws-sdk-s3/client_api.rb +436 -2
  24. data/lib/aws-sdk-s3/customizations/bucket.rb +59 -16
  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 +2 -0
  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 +16 -9
  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 +53 -13
  65. data/lib/aws-sdk-s3/multipart_stream_uploader.rb +20 -7
  66. data/lib/aws-sdk-s3/multipart_upload.rb +64 -29
  67. data/lib/aws-sdk-s3/multipart_upload_error.rb +2 -0
  68. data/lib/aws-sdk-s3/multipart_upload_part.rb +116 -42
  69. data/lib/aws-sdk-s3/object.rb +656 -156
  70. data/lib/aws-sdk-s3/object_acl.rb +65 -21
  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 +485 -143
  74. data/lib/aws-sdk-s3/object_version.rb +117 -62
  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 +30 -28
  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 +89 -36
  90. data/lib/aws-sdk-s3/plugins/sse_cpk.rb +3 -1
  91. data/lib/aws-sdk-s3/plugins/streaming_retry.rb +118 -0
  92. data/lib/aws-sdk-s3/plugins/url_encoded_keys.rb +2 -0
  93. data/lib/aws-sdk-s3/presigned_post.rb +72 -32
  94. data/lib/aws-sdk-s3/presigner.rb +168 -66
  95. data/lib/aws-sdk-s3/resource.rb +41 -5
  96. data/lib/aws-sdk-s3/types.rb +6758 -1027
  97. data/lib/aws-sdk-s3/waiters.rb +67 -1
  98. data/lib/aws-sdk-s3.rb +12 -6
  99. metadata +37 -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 Object
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
@@ -46,7 +50,7 @@ module Aws::S3
46
50
  data[:delete_marker]
47
51
  end
48
52
 
49
-
53
+ # Indicates that a range of bytes was specified.
50
54
  # @return [String]
51
55
  def accept_ranges
52
56
  data[:accept_ranges]
@@ -54,21 +58,46 @@ module Aws::S3
54
58
 
55
59
  # If the object expiration is configured (see PUT Bucket lifecycle), the
56
60
  # response includes this header. It includes the expiry-date and rule-id
57
- # key value pairs providing object expiration information. The value of
61
+ # key-value pairs providing object expiration information. The value of
58
62
  # the rule-id is URL encoded.
59
63
  # @return [String]
60
64
  def expiration
61
65
  data[:expiration]
62
66
  end
63
67
 
64
- # Provides information about object restoration operation and expiration
65
- # time of the restored object copy.
68
+ # If the object is an archived object (an object whose storage class is
69
+ # GLACIER), the response includes this header if either the archive
70
+ # restoration is in progress (see [RestoreObject][1] or an archive copy
71
+ # is already restored.
72
+ #
73
+ # If an archive copy is already restored, the header value indicates
74
+ # when Amazon S3 is scheduled to delete the object copy. For example:
75
+ #
76
+ # `x-amz-restore: ongoing-request="false", expiry-date="Fri, 21 Dec 2012
77
+ # 00:00:00 GMT"`
78
+ #
79
+ # If the object restoration is in progress, the header returns the value
80
+ # `ongoing-request="true"`.
81
+ #
82
+ # For more information about archiving objects, see [Transitioning
83
+ # Objects: General Considerations][2].
84
+ #
85
+ #
86
+ #
87
+ # [1]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_RestoreObject.html
88
+ # [2]: https://docs.aws.amazon.com/AmazonS3/latest/dev/object-lifecycle-mgmt.html#lifecycle-transition-general-considerations
66
89
  # @return [String]
67
90
  def restore
68
91
  data[:restore]
69
92
  end
70
93
 
71
- # Last modified date of the object
94
+ # The archive state of the head object.
95
+ # @return [String]
96
+ def archive_status
97
+ data[:archive_status]
98
+ end
99
+
100
+ # Creation date of the object.
72
101
  # @return [Time]
73
102
  def last_modified
74
103
  data[:last_modified]
@@ -81,14 +110,14 @@ module Aws::S3
81
110
  end
82
111
 
83
112
  # An ETag is an opaque identifier assigned by a web server to a specific
84
- # version of a resource found at a URL
113
+ # version of a resource found at a URL.
85
114
  # @return [String]
86
115
  def etag
87
116
  data[:etag]
88
117
  end
89
118
 
90
119
  # This is set to the number of metadata entries not returned in
91
- # x-amz-meta headers. This can happen if you create metadata using an
120
+ # `x-amz-meta` headers. This can happen if you create metadata using an
92
121
  # API like SOAP that supports more flexible metadata than the REST API.
93
122
  # For example, using SOAP, you can create metadata whose values are not
94
123
  # legal HTTP headers.
@@ -154,8 +183,11 @@ module Aws::S3
154
183
  data[:website_redirect_location]
155
184
  end
156
185
 
157
- # The Server-side encryption algorithm used when storing this object in
158
- # S3 (e.g., AES256, aws:kms).
186
+ # If the object is stored using server-side encryption either with an
187
+ # Amazon Web Services KMS key or an Amazon S3-managed encryption key,
188
+ # the response includes this header with the value of the server-side
189
+ # encryption algorithm used when storing this object in Amazon S3 (for
190
+ # example, AES256, aws:kms).
159
191
  # @return [String]
160
192
  def server_side_encryption
161
193
  data[:server_side_encryption]
@@ -176,7 +208,7 @@ module Aws::S3
176
208
  end
177
209
 
178
210
  # If server-side encryption with a customer-provided encryption key was
179
- # requested, the response will include this header to provide round trip
211
+ # requested, the response will include this header to provide round-trip
180
212
  # message integrity verification of the customer-provided encryption
181
213
  # key.
182
214
  # @return [String]
@@ -184,14 +216,30 @@ module Aws::S3
184
216
  data[:sse_customer_key_md5]
185
217
  end
186
218
 
187
- # If present, specifies the ID of the AWS Key Management Service (KMS)
188
- # master encryption key that was used for the object.
219
+ # If present, specifies the ID of the Amazon Web Services Key Management
220
+ # Service (Amazon Web Services KMS) symmetric customer managed key that
221
+ # was used for the object.
189
222
  # @return [String]
190
223
  def ssekms_key_id
191
224
  data[:ssekms_key_id]
192
225
  end
193
226
 
194
-
227
+ # Indicates whether the object uses an S3 Bucket Key for server-side
228
+ # encryption with Amazon Web Services KMS (SSE-KMS).
229
+ # @return [Boolean]
230
+ def bucket_key_enabled
231
+ data[:bucket_key_enabled]
232
+ end
233
+
234
+ # Provides storage class information of the object. Amazon S3 returns
235
+ # this header for all objects except for S3 Standard storage class
236
+ # objects.
237
+ #
238
+ # For more information, see [Storage Classes][1].
239
+ #
240
+ #
241
+ #
242
+ # [1]: https://docs.aws.amazon.com/AmazonS3/latest/dev/storage-class-intro.html
195
243
  # @return [String]
196
244
  def storage_class
197
245
  data[:storage_class]
@@ -204,7 +252,46 @@ module Aws::S3
204
252
  data[:request_charged]
205
253
  end
206
254
 
207
-
255
+ # Amazon S3 can return this header if your request involves a bucket
256
+ # that is either a source or a destination in a replication rule.
257
+ #
258
+ # In replication, you have a source bucket on which you configure
259
+ # replication and destination bucket or buckets where Amazon S3 stores
260
+ # object replicas. When you request an object (`GetObject`) or object
261
+ # metadata (`HeadObject`) from these buckets, Amazon S3 will return the
262
+ # `x-amz-replication-status` header in the response as follows:
263
+ #
264
+ # * If requesting an object from the source bucket — Amazon S3 will
265
+ # return the `x-amz-replication-status` header if the object in your
266
+ # request is eligible for replication.
267
+ #
268
+ # For example, suppose that in your replication configuration, you
269
+ # specify object prefix `TaxDocs` requesting Amazon S3 to replicate
270
+ # objects with key prefix `TaxDocs`. Any objects you upload with this
271
+ # key name prefix, for example `TaxDocs/document1.pdf`, are eligible
272
+ # for replication. For any object request with this key name prefix,
273
+ # Amazon S3 will return the `x-amz-replication-status` header with
274
+ # value PENDING, COMPLETED or FAILED indicating object replication
275
+ # status.
276
+ #
277
+ # * If requesting an object from a destination bucket — Amazon S3 will
278
+ # return the `x-amz-replication-status` header with value REPLICA if
279
+ # the object in your request is a replica that Amazon S3 created and
280
+ # there is no replica modification replication in progress.
281
+ #
282
+ # * When replicating objects to multiple destination buckets the
283
+ # `x-amz-replication-status` header acts differently. The header of
284
+ # the source object will only return a value of COMPLETED when
285
+ # replication is successful to all destinations. The header will
286
+ # remain at value PENDING until replication has completed for all
287
+ # destinations. If one or more destinations fails replication the
288
+ # header will return FAILED.
289
+ #
290
+ # For more information, see [Replication][1].
291
+ #
292
+ #
293
+ #
294
+ # [1]: https://docs.aws.amazon.com/AmazonS3/latest/dev/NotificationHowTo.html
208
295
  # @return [String]
209
296
  def replication_status
210
297
  data[:replication_status]
@@ -216,19 +303,36 @@ module Aws::S3
216
303
  data[:parts_count]
217
304
  end
218
305
 
219
- # The Object Lock mode currently in place for this object.
306
+ # The Object Lock mode, if any, that's in effect for this object. This
307
+ # header is only returned if the requester has the
308
+ # `s3:GetObjectRetention` permission. For more information about S3
309
+ # Object Lock, see [Object Lock][1].
310
+ #
311
+ #
312
+ #
313
+ # [1]: https://docs.aws.amazon.com/AmazonS3/latest/dev/object-lock.html
220
314
  # @return [String]
221
315
  def object_lock_mode
222
316
  data[:object_lock_mode]
223
317
  end
224
318
 
225
- # The date and time when this object's Object Lock will expire.
319
+ # The date and time when the Object Lock retention period expires. This
320
+ # header is only returned if the requester has the
321
+ # `s3:GetObjectRetention` permission.
226
322
  # @return [Time]
227
323
  def object_lock_retain_until_date
228
324
  data[:object_lock_retain_until_date]
229
325
  end
230
326
 
231
- # The Legal Hold status for the specified object.
327
+ # Specifies whether a legal hold is in effect for this object. This
328
+ # header is only returned if the requester has the
329
+ # `s3:GetObjectLegalHold` permission. This header is not returned if the
330
+ # specified version of this object has never had a legal hold applied.
331
+ # For more information about S3 Object Lock, see [Object Lock][1].
332
+ #
333
+ #
334
+ #
335
+ # [1]: https://docs.aws.amazon.com/AmazonS3/latest/dev/object-lock.html
232
336
  # @return [String]
233
337
  def object_lock_legal_hold_status
234
338
  data[:object_lock_legal_hold_status]
@@ -292,10 +396,10 @@ module Aws::S3
292
396
  # @option options [Proc] :before_attempt
293
397
  # @option options [Proc] :before_wait
294
398
  # @return [Object]
295
- def wait_until_exists(options = {})
399
+ def wait_until_exists(options = {}, &block)
296
400
  options, params = separate_params_and_options(options)
297
401
  waiter = Waiters::ObjectExists.new(options)
298
- yield_waiter_and_warn(waiter, &Proc.new) if block_given?
402
+ yield_waiter_and_warn(waiter, &block) if block_given?
299
403
  waiter.wait(params.merge(bucket: @bucket_name,
300
404
  key: @key))
301
405
  Object.new({
@@ -311,10 +415,10 @@ module Aws::S3
311
415
  # @option options [Proc] :before_attempt
312
416
  # @option options [Proc] :before_wait
313
417
  # @return [Object]
314
- def wait_until_not_exists(options = {})
418
+ def wait_until_not_exists(options = {}, &block)
315
419
  options, params = separate_params_and_options(options)
316
420
  waiter = Waiters::ObjectNotExists.new(options)
317
- yield_waiter_and_warn(waiter, &Proc.new) if block_given?
421
+ yield_waiter_and_warn(waiter, &block) if block_given?
318
422
  waiter.wait(params.merge(bucket: @bucket_name,
319
423
  key: @key))
320
424
  Object.new({
@@ -329,7 +433,8 @@ module Aws::S3
329
433
  # Waiter polls an API operation until a resource enters a desired
330
434
  # state.
331
435
  #
332
- # @note The waiting operation is performed on a copy. The original resource remains unchanged
436
+ # @note The waiting operation is performed on a copy. The original resource
437
+ # remains unchanged.
333
438
  #
334
439
  # ## Basic Usage
335
440
  #
@@ -342,13 +447,15 @@ module Aws::S3
342
447
  #
343
448
  # ## Example
344
449
  #
345
- # instance.wait_until(max_attempts:10, delay:5) {|instance| instance.state.name == 'running' }
450
+ # instance.wait_until(max_attempts:10, delay:5) do |instance|
451
+ # instance.state.name == 'running'
452
+ # end
346
453
  #
347
454
  # ## Configuration
348
455
  #
349
456
  # You can configure the maximum number of polling attempts, and the
350
- # delay (in seconds) between each polling attempt. The waiting condition is set
351
- # by passing a block to {#wait_until}:
457
+ # delay (in seconds) between each polling attempt. The waiting condition is
458
+ # set by passing a block to {#wait_until}:
352
459
  #
353
460
  # # poll for ~25 seconds
354
461
  # resource.wait_until(max_attempts:5,delay:5) {|resource|...}
@@ -379,17 +486,16 @@ module Aws::S3
379
486
  # # resource did not enter the desired state in time
380
487
  # end
381
488
  #
489
+ # @yieldparam [Resource] resource to be used in the waiting condition.
382
490
  #
383
- # @yield param [Resource] resource to be used in the waiting condition
384
- #
385
- # @raise [Aws::Waiters::Errors::FailureStateError] Raised when the waiter terminates
386
- # because the waiter has entered a state that it will not transition
387
- # out of, preventing success.
491
+ # @raise [Aws::Waiters::Errors::FailureStateError] Raised when the waiter
492
+ # terminates because the waiter has entered a state that it will not
493
+ # transition out of, preventing success.
388
494
  #
389
495
  # yet successful.
390
496
  #
391
- # @raise [Aws::Waiters::Errors::UnexpectedError] Raised when an error is encountered
392
- # while polling for a resource that is not expected.
497
+ # @raise [Aws::Waiters::Errors::UnexpectedError] Raised when an error is
498
+ # encountered while polling for a resource that is not expected.
393
499
  #
394
500
  # @raise [NotImplementedError] Raised when the resource does not
395
501
  #
@@ -446,12 +552,14 @@ module Aws::S3
446
552
  # metadata_directive: "COPY", # accepts COPY, REPLACE
447
553
  # tagging_directive: "COPY", # accepts COPY, REPLACE
448
554
  # server_side_encryption: "AES256", # accepts AES256, aws:kms
449
- # storage_class: "STANDARD", # accepts STANDARD, REDUCED_REDUNDANCY, STANDARD_IA, ONEZONE_IA, INTELLIGENT_TIERING, GLACIER
555
+ # storage_class: "STANDARD", # accepts STANDARD, REDUCED_REDUNDANCY, STANDARD_IA, ONEZONE_IA, INTELLIGENT_TIERING, GLACIER, DEEP_ARCHIVE, OUTPOSTS, GLACIER_IR
450
556
  # website_redirect_location: "WebsiteRedirectLocation",
451
557
  # sse_customer_algorithm: "SSECustomerAlgorithm",
452
558
  # sse_customer_key: "SSECustomerKey",
453
559
  # sse_customer_key_md5: "SSECustomerKeyMD5",
454
560
  # ssekms_key_id: "SSEKMSKeyId",
561
+ # ssekms_encryption_context: "SSEKMSEncryptionContext",
562
+ # bucket_key_enabled: false,
455
563
  # copy_source_sse_customer_algorithm: "CopySourceSSECustomerAlgorithm",
456
564
  # copy_source_sse_customer_key: "CopySourceSSECustomerKey",
457
565
  # copy_source_sse_customer_key_md5: "CopySourceSSECustomerKeyMD5",
@@ -460,10 +568,14 @@ module Aws::S3
460
568
  # object_lock_mode: "GOVERNANCE", # accepts GOVERNANCE, COMPLIANCE
461
569
  # object_lock_retain_until_date: Time.now,
462
570
  # object_lock_legal_hold_status: "ON", # accepts ON, OFF
571
+ # expected_bucket_owner: "AccountId",
572
+ # expected_source_bucket_owner: "AccountId",
463
573
  # })
464
574
  # @param [Hash] options ({})
465
575
  # @option options [String] :acl
466
576
  # The canned ACL to apply to the object.
577
+ #
578
+ # This action is not supported by Amazon S3 on Outposts.
467
579
  # @option options [String] :cache_control
468
580
  # Specifies caching behavior along the request/reply chain.
469
581
  # @option options [String] :content_disposition
@@ -477,8 +589,51 @@ module Aws::S3
477
589
  # @option options [String] :content_type
478
590
  # A standard MIME type describing the format of the object data.
479
591
  # @option options [required, String] :copy_source
480
- # The name of the source bucket and key name of the source object,
481
- # separated by a slash (/). Must be URL-encoded.
592
+ # Specifies the source object for the copy operation. You specify the
593
+ # value in one of two formats, depending on whether you want to access
594
+ # the source object through an [access point][1]\:
595
+ #
596
+ # * For objects not accessed through an access point, specify the name
597
+ # of the source bucket and the key of the source object, separated by
598
+ # a slash (/). For example, to copy the object `reports/january.pdf`
599
+ # from the bucket `awsexamplebucket`, use
600
+ # `awsexamplebucket/reports/january.pdf`. The value must be URL
601
+ # encoded.
602
+ #
603
+ # * For objects accessed through access points, specify the Amazon
604
+ # Resource Name (ARN) of the object as accessed through the access
605
+ # point, in the format
606
+ # `arn:aws:s3:<Region>:<account-id>:accesspoint/<access-point-name>/object/<key>`.
607
+ # For example, to copy the object `reports/january.pdf` through access
608
+ # point `my-access-point` owned by account `123456789012` in Region
609
+ # `us-west-2`, use the URL encoding of
610
+ # `arn:aws:s3:us-west-2:123456789012:accesspoint/my-access-point/object/reports/january.pdf`.
611
+ # The value must be URL encoded.
612
+ #
613
+ # <note markdown="1"> Amazon S3 supports copy operations using access points only when the
614
+ # source and destination buckets are in the same Amazon Web Services
615
+ # Region.
616
+ #
617
+ # </note>
618
+ #
619
+ # Alternatively, for objects accessed through Amazon S3 on Outposts,
620
+ # specify the ARN of the object as accessed in the format
621
+ # `arn:aws:s3-outposts:<Region>:<account-id>:outpost/<outpost-id>/object/<key>`.
622
+ # For example, to copy the object `reports/january.pdf` through
623
+ # outpost `my-outpost` owned by account `123456789012` in Region
624
+ # `us-west-2`, use the URL encoding of
625
+ # `arn:aws:s3-outposts:us-west-2:123456789012:outpost/my-outpost/object/reports/january.pdf`.
626
+ # The value must be URL encoded.
627
+ #
628
+ # To copy a specific version of an object, append
629
+ # `?versionId=<version-id>` to the value (for example,
630
+ # `awsexamplebucket/reports/january.pdf?versionId=QUpfdndhfd8438MNFDN93jdnJFkdmqnh893`).
631
+ # If you don't specify a version ID, Amazon S3 copies the latest
632
+ # version of the source object.
633
+ #
634
+ #
635
+ #
636
+ # [1]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/access-points.html
482
637
  # @option options [String] :copy_source_if_match
483
638
  # Copies the object if its entity tag (ETag) matches the specified tag.
484
639
  # @option options [Time,DateTime,Date,Integer,String] :copy_source_if_modified_since
@@ -494,12 +649,20 @@ module Aws::S3
494
649
  # @option options [String] :grant_full_control
495
650
  # Gives the grantee READ, READ\_ACP, and WRITE\_ACP permissions on the
496
651
  # object.
652
+ #
653
+ # This action is not supported by Amazon S3 on Outposts.
497
654
  # @option options [String] :grant_read
498
655
  # Allows grantee to read the object data and its metadata.
656
+ #
657
+ # This action is not supported by Amazon S3 on Outposts.
499
658
  # @option options [String] :grant_read_acp
500
659
  # Allows grantee to read the object ACL.
660
+ #
661
+ # This action is not supported by Amazon S3 on Outposts.
501
662
  # @option options [String] :grant_write_acp
502
663
  # Allows grantee to write the ACL for the applicable object.
664
+ #
665
+ # This action is not supported by Amazon S3 on Outposts.
503
666
  # @option options [Hash<String,String>] :metadata
504
667
  # A map of metadata to store with the object in S3.
505
668
  # @option options [String] :metadata_directive
@@ -509,36 +672,63 @@ module Aws::S3
509
672
  # Specifies whether the object tag-set are copied from the source object
510
673
  # or replaced with tag-set provided in the request.
511
674
  # @option options [String] :server_side_encryption
512
- # The Server-side encryption algorithm used when storing this object in
513
- # S3 (e.g., AES256, aws:kms).
675
+ # The server-side encryption algorithm used when storing this object in
676
+ # Amazon S3 (for example, AES256, aws:kms).
514
677
  # @option options [String] :storage_class
515
- # The type of storage to use for the object. Defaults to 'STANDARD'.
678
+ # By default, Amazon S3 uses the STANDARD Storage Class to store newly
679
+ # created objects. The STANDARD storage class provides high durability
680
+ # and high availability. Depending on performance needs, you can specify
681
+ # a different Storage Class. Amazon S3 on Outposts only uses the
682
+ # OUTPOSTS Storage Class. For more information, see [Storage Classes][1]
683
+ # in the *Amazon S3 User Guide*.
684
+ #
685
+ #
686
+ #
687
+ # [1]: https://docs.aws.amazon.com/AmazonS3/latest/dev/storage-class-intro.html
516
688
  # @option options [String] :website_redirect_location
517
689
  # If the bucket is configured as a website, redirects requests for this
518
690
  # object to another object in the same bucket or to an external URL.
519
691
  # Amazon S3 stores the value of this header in the object metadata.
520
692
  # @option options [String] :sse_customer_algorithm
521
- # Specifies the algorithm to use to when encrypting the object (e.g.,
522
- # AES256).
693
+ # Specifies the algorithm to use to when encrypting the object (for
694
+ # example, AES256).
523
695
  # @option options [String] :sse_customer_key
524
696
  # Specifies the customer-provided encryption key for Amazon S3 to use in
525
697
  # encrypting data. This value is used to store the object and then it is
526
- # discarded; Amazon does not store the encryption key. The key must be
527
- # appropriate for use with the algorithm specified in the
528
- # x-amz-server-side​-encryption​-customer-algorithm header.
698
+ # discarded; Amazon S3 does not store the encryption key. The key must
699
+ # be appropriate for use with the algorithm specified in the
700
+ # `x-amz-server-side-encryption-customer-algorithm` header.
529
701
  # @option options [String] :sse_customer_key_md5
530
702
  # Specifies the 128-bit MD5 digest of the encryption key according to
531
703
  # RFC 1321. Amazon S3 uses this header for a message integrity check to
532
- # ensure the encryption key was transmitted without error.
704
+ # ensure that the encryption key was transmitted without error.
533
705
  # @option options [String] :ssekms_key_id
534
- # Specifies the AWS KMS key ID to use for object encryption. All GET and
535
- # PUT requests for an object protected by AWS KMS will fail if not made
536
- # via SSL or using SigV4. Documentation on configuring any of the
537
- # officially supported AWS SDKs and CLI can be found at
538
- # http://docs.aws.amazon.com/AmazonS3/latest/dev/UsingAWSSDK.html#specify-signature-version
706
+ # Specifies the Amazon Web Services KMS key ID to use for object
707
+ # encryption. All GET and PUT requests for an object protected by Amazon
708
+ # Web Services KMS will fail if not made via SSL or using SigV4. For
709
+ # information about configuring using any of the officially supported
710
+ # Amazon Web Services SDKs and Amazon Web Services CLI, see [Specifying
711
+ # the Signature Version in Request Authentication][1] in the *Amazon S3
712
+ # User Guide*.
713
+ #
714
+ #
715
+ #
716
+ # [1]: https://docs.aws.amazon.com/AmazonS3/latest/dev/UsingAWSSDK.html#specify-signature-version
717
+ # @option options [String] :ssekms_encryption_context
718
+ # Specifies the Amazon Web Services KMS Encryption Context to use for
719
+ # object encryption. The value of this header is a base64-encoded UTF-8
720
+ # string holding JSON with the encryption context key-value pairs.
721
+ # @option options [Boolean] :bucket_key_enabled
722
+ # Specifies whether Amazon S3 should use an S3 Bucket Key for object
723
+ # encryption with server-side encryption using AWS KMS (SSE-KMS).
724
+ # Setting this header to `true` causes Amazon S3 to use an S3 Bucket Key
725
+ # for object encryption with SSE-KMS.
726
+ #
727
+ # Specifying this header with a COPY action doesn’t affect bucket-level
728
+ # settings for S3 Bucket Key.
539
729
  # @option options [String] :copy_source_sse_customer_algorithm
540
- # Specifies the algorithm to use when decrypting the source object
541
- # (e.g., AES256).
730
+ # Specifies the algorithm to use when decrypting the source object (for
731
+ # example, AES256).
542
732
  # @option options [String] :copy_source_sse_customer_key
543
733
  # Specifies the customer-provided encryption key for Amazon S3 to use to
544
734
  # decrypt the source object. The encryption key provided in this header
@@ -546,17 +736,21 @@ module Aws::S3
546
736
  # @option options [String] :copy_source_sse_customer_key_md5
547
737
  # Specifies the 128-bit MD5 digest of the encryption key according to
548
738
  # RFC 1321. Amazon S3 uses this header for a message integrity check to
549
- # ensure the encryption key was transmitted without error.
739
+ # ensure that the encryption key was transmitted without error.
550
740
  # @option options [String] :request_payer
551
- # Confirms that the requester knows that she or he will be charged for
552
- # the request. Bucket owners need not specify this parameter in their
553
- # requests. Documentation on downloading objects from requester pays
554
- # buckets can be found at
555
- # http://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html
741
+ # Confirms that the requester knows that they will be charged for the
742
+ # request. Bucket owners need not specify this parameter in their
743
+ # requests. For information about downloading objects from requester
744
+ # pays buckets, see [Downloading Objects in Requestor Pays Buckets][1]
745
+ # in the *Amazon S3 User Guide*.
746
+ #
747
+ #
748
+ #
749
+ # [1]: https://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html
556
750
  # @option options [String] :tagging
557
751
  # The tag-set for the object destination object this value must be used
558
- # in conjunction with the TaggingDirective. The tag-set must be encoded
559
- # as URL Query parameters
752
+ # in conjunction with the `TaggingDirective`. The tag-set must be
753
+ # encoded as URL Query parameters.
560
754
  # @option options [String] :object_lock_mode
561
755
  # The Object Lock mode that you want to apply to the copied object.
562
756
  # @option options [Time,DateTime,Date,Integer,String] :object_lock_retain_until_date
@@ -564,6 +758,14 @@ module Aws::S3
564
758
  # expire.
565
759
  # @option options [String] :object_lock_legal_hold_status
566
760
  # Specifies whether you want to apply a Legal Hold to the copied object.
761
+ # @option options [String] :expected_bucket_owner
762
+ # The account ID of the expected destination bucket owner. If the
763
+ # destination bucket is owned by a different account, the request will
764
+ # fail with an HTTP `403 (Access Denied)` error.
765
+ # @option options [String] :expected_source_bucket_owner
766
+ # The account ID of the expected source bucket owner. If the source
767
+ # bucket is owned by a different account, the request will fail with an
768
+ # HTTP `403 (Access Denied)` error.
567
769
  # @return [Types::CopyObjectOutput]
568
770
  def copy_from(options = {})
569
771
  options = options.merge(
@@ -581,22 +783,34 @@ module Aws::S3
581
783
  # version_id: "ObjectVersionId",
582
784
  # request_payer: "requester", # accepts requester
583
785
  # bypass_governance_retention: false,
786
+ # expected_bucket_owner: "AccountId",
584
787
  # })
585
788
  # @param [Hash] options ({})
586
789
  # @option options [String] :mfa
587
790
  # The concatenation of the authentication device's serial number, a
588
791
  # space, and the value that is displayed on your authentication device.
792
+ # Required to permanently delete a versioned object if versioning is
793
+ # configured with MFA delete enabled.
589
794
  # @option options [String] :version_id
590
795
  # VersionId used to reference a specific version of the object.
591
796
  # @option options [String] :request_payer
592
- # Confirms that the requester knows that she or he will be charged for
593
- # the request. Bucket owners need not specify this parameter in their
594
- # requests. Documentation on downloading objects from requester pays
595
- # buckets can be found at
596
- # http://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html
797
+ # Confirms that the requester knows that they will be charged for the
798
+ # request. Bucket owners need not specify this parameter in their
799
+ # requests. For information about downloading objects from requester
800
+ # pays buckets, see [Downloading Objects in Requestor Pays Buckets][1]
801
+ # in the *Amazon S3 User Guide*.
802
+ #
803
+ #
804
+ #
805
+ # [1]: https://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html
597
806
  # @option options [Boolean] :bypass_governance_retention
598
807
  # Indicates whether S3 Object Lock should bypass Governance-mode
599
- # restrictions to process this operation.
808
+ # restrictions to process this operation. To use this header, you must
809
+ # have the `s3:PutBucketPublicAccessBlock` permission.
810
+ # @option options [String] :expected_bucket_owner
811
+ # The account ID of the expected bucket owner. If the bucket is owned by
812
+ # a different account, the request will fail with an HTTP `403 (Access
813
+ # Denied)` error.
600
814
  # @return [Types::DeleteObjectOutput]
601
815
  def delete(options = {})
602
816
  options = options.merge(
@@ -627,6 +841,7 @@ module Aws::S3
627
841
  # sse_customer_key_md5: "SSECustomerKeyMD5",
628
842
  # request_payer: "requester", # accepts requester
629
843
  # part_number: 1,
844
+ # expected_bucket_owner: "AccountId",
630
845
  # })
631
846
  # @param [Hash] options ({})
632
847
  # @option options [String] :if_match
@@ -643,46 +858,63 @@ module Aws::S3
643
858
  # time, otherwise return a 412 (precondition failed).
644
859
  # @option options [String] :range
645
860
  # Downloads the specified range bytes of an object. For more information
646
- # about the HTTP Range header, go to
647
- # http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.35.
861
+ # about the HTTP Range header, see
862
+ # [https://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.35][1].
863
+ #
864
+ # <note markdown="1"> Amazon S3 doesn't support retrieving multiple ranges of data per
865
+ # `GET` request.
866
+ #
867
+ # </note>
868
+ #
869
+ #
870
+ #
871
+ # [1]: https://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.35
648
872
  # @option options [String] :response_cache_control
649
- # Sets the Cache-Control header of the response.
873
+ # Sets the `Cache-Control` header of the response.
650
874
  # @option options [String] :response_content_disposition
651
- # Sets the Content-Disposition header of the response
875
+ # Sets the `Content-Disposition` header of the response
652
876
  # @option options [String] :response_content_encoding
653
- # Sets the Content-Encoding header of the response.
877
+ # Sets the `Content-Encoding` header of the response.
654
878
  # @option options [String] :response_content_language
655
- # Sets the Content-Language header of the response.
879
+ # Sets the `Content-Language` header of the response.
656
880
  # @option options [String] :response_content_type
657
- # Sets the Content-Type header of the response.
881
+ # Sets the `Content-Type` header of the response.
658
882
  # @option options [Time,DateTime,Date,Integer,String] :response_expires
659
- # Sets the Expires header of the response.
883
+ # Sets the `Expires` header of the response.
660
884
  # @option options [String] :version_id
661
885
  # VersionId used to reference a specific version of the object.
662
886
  # @option options [String] :sse_customer_algorithm
663
- # Specifies the algorithm to use to when encrypting the object (e.g.,
664
- # AES256).
887
+ # Specifies the algorithm to use to when decrypting the object (for
888
+ # example, AES256).
665
889
  # @option options [String] :sse_customer_key
666
- # Specifies the customer-provided encryption key for Amazon S3 to use in
667
- # encrypting data. This value is used to store the object and then it is
668
- # discarded; Amazon does not store the encryption key. The key must be
669
- # appropriate for use with the algorithm specified in the
670
- # x-amz-server-side​-encryption​-customer-algorithm header.
890
+ # Specifies the customer-provided encryption key for Amazon S3 used to
891
+ # encrypt the data. This value is used to decrypt the object when
892
+ # recovering it and must match the one used when storing the data. The
893
+ # key must be appropriate for use with the algorithm specified in the
894
+ # `x-amz-server-side-encryption-customer-algorithm` header.
671
895
  # @option options [String] :sse_customer_key_md5
672
896
  # Specifies the 128-bit MD5 digest of the encryption key according to
673
897
  # RFC 1321. Amazon S3 uses this header for a message integrity check to
674
- # ensure the encryption key was transmitted without error.
898
+ # ensure that the encryption key was transmitted without error.
675
899
  # @option options [String] :request_payer
676
- # Confirms that the requester knows that she or he will be charged for
677
- # the request. Bucket owners need not specify this parameter in their
678
- # requests. Documentation on downloading objects from requester pays
679
- # buckets can be found at
680
- # http://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html
900
+ # Confirms that the requester knows that they will be charged for the
901
+ # request. Bucket owners need not specify this parameter in their
902
+ # requests. For information about downloading objects from requester
903
+ # pays buckets, see [Downloading Objects in Requestor Pays Buckets][1]
904
+ # in the *Amazon S3 User Guide*.
905
+ #
906
+ #
907
+ #
908
+ # [1]: https://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html
681
909
  # @option options [Integer] :part_number
682
910
  # Part number of the object being read. This is a positive integer
683
911
  # between 1 and 10,000. Effectively performs a 'ranged' GET request
684
912
  # for the part specified. Useful for downloading just a part of an
685
913
  # object.
914
+ # @option options [String] :expected_bucket_owner
915
+ # The account ID of the expected bucket owner. If the bucket is owned by
916
+ # a different account, the request will fail with an HTTP `403 (Access
917
+ # Denied)` error.
686
918
  # @return [Types::GetObjectOutput]
687
919
  def get(options = {}, &block)
688
920
  options = options.merge(
@@ -711,21 +943,26 @@ module Aws::S3
711
943
  # "MetadataKey" => "MetadataValue",
712
944
  # },
713
945
  # server_side_encryption: "AES256", # accepts AES256, aws:kms
714
- # storage_class: "STANDARD", # accepts STANDARD, REDUCED_REDUNDANCY, STANDARD_IA, ONEZONE_IA, INTELLIGENT_TIERING, GLACIER
946
+ # storage_class: "STANDARD", # accepts STANDARD, REDUCED_REDUNDANCY, STANDARD_IA, ONEZONE_IA, INTELLIGENT_TIERING, GLACIER, DEEP_ARCHIVE, OUTPOSTS, GLACIER_IR
715
947
  # website_redirect_location: "WebsiteRedirectLocation",
716
948
  # sse_customer_algorithm: "SSECustomerAlgorithm",
717
949
  # sse_customer_key: "SSECustomerKey",
718
950
  # sse_customer_key_md5: "SSECustomerKeyMD5",
719
951
  # ssekms_key_id: "SSEKMSKeyId",
952
+ # ssekms_encryption_context: "SSEKMSEncryptionContext",
953
+ # bucket_key_enabled: false,
720
954
  # request_payer: "requester", # accepts requester
721
955
  # tagging: "TaggingHeader",
722
956
  # object_lock_mode: "GOVERNANCE", # accepts GOVERNANCE, COMPLIANCE
723
957
  # object_lock_retain_until_date: Time.now,
724
958
  # object_lock_legal_hold_status: "ON", # accepts ON, OFF
959
+ # expected_bucket_owner: "AccountId",
725
960
  # })
726
961
  # @param [Hash] options ({})
727
962
  # @option options [String] :acl
728
963
  # The canned ACL to apply to the object.
964
+ #
965
+ # This action is not supported by Amazon S3 on Outposts.
729
966
  # @option options [String] :cache_control
730
967
  # Specifies caching behavior along the request/reply chain.
731
968
  # @option options [String] :content_disposition
@@ -743,51 +980,90 @@ module Aws::S3
743
980
  # @option options [String] :grant_full_control
744
981
  # Gives the grantee READ, READ\_ACP, and WRITE\_ACP permissions on the
745
982
  # object.
983
+ #
984
+ # This action is not supported by Amazon S3 on Outposts.
746
985
  # @option options [String] :grant_read
747
986
  # Allows grantee to read the object data and its metadata.
987
+ #
988
+ # This action is not supported by Amazon S3 on Outposts.
748
989
  # @option options [String] :grant_read_acp
749
990
  # Allows grantee to read the object ACL.
991
+ #
992
+ # This action is not supported by Amazon S3 on Outposts.
750
993
  # @option options [String] :grant_write_acp
751
994
  # Allows grantee to write the ACL for the applicable object.
995
+ #
996
+ # This action is not supported by Amazon S3 on Outposts.
752
997
  # @option options [Hash<String,String>] :metadata
753
998
  # A map of metadata to store with the object in S3.
754
999
  # @option options [String] :server_side_encryption
755
- # The Server-side encryption algorithm used when storing this object in
756
- # S3 (e.g., AES256, aws:kms).
1000
+ # The server-side encryption algorithm used when storing this object in
1001
+ # Amazon S3 (for example, AES256, aws:kms).
757
1002
  # @option options [String] :storage_class
758
- # The type of storage to use for the object. Defaults to 'STANDARD'.
1003
+ # By default, Amazon S3 uses the STANDARD Storage Class to store newly
1004
+ # created objects. The STANDARD storage class provides high durability
1005
+ # and high availability. Depending on performance needs, you can specify
1006
+ # a different Storage Class. Amazon S3 on Outposts only uses the
1007
+ # OUTPOSTS Storage Class. For more information, see [Storage Classes][1]
1008
+ # in the *Amazon S3 User Guide*.
1009
+ #
1010
+ #
1011
+ #
1012
+ # [1]: https://docs.aws.amazon.com/AmazonS3/latest/dev/storage-class-intro.html
759
1013
  # @option options [String] :website_redirect_location
760
1014
  # If the bucket is configured as a website, redirects requests for this
761
1015
  # object to another object in the same bucket or to an external URL.
762
1016
  # Amazon S3 stores the value of this header in the object metadata.
763
1017
  # @option options [String] :sse_customer_algorithm
764
- # Specifies the algorithm to use to when encrypting the object (e.g.,
765
- # AES256).
1018
+ # Specifies the algorithm to use to when encrypting the object (for
1019
+ # example, AES256).
766
1020
  # @option options [String] :sse_customer_key
767
1021
  # Specifies the customer-provided encryption key for Amazon S3 to use in
768
1022
  # encrypting data. This value is used to store the object and then it is
769
- # discarded; Amazon does not store the encryption key. The key must be
770
- # appropriate for use with the algorithm specified in the
771
- # x-amz-server-side​-encryption​-customer-algorithm header.
1023
+ # discarded; Amazon S3 does not store the encryption key. The key must
1024
+ # be appropriate for use with the algorithm specified in the
1025
+ # `x-amz-server-side-encryption-customer-algorithm` header.
772
1026
  # @option options [String] :sse_customer_key_md5
773
1027
  # Specifies the 128-bit MD5 digest of the encryption key according to
774
1028
  # RFC 1321. Amazon S3 uses this header for a message integrity check to
775
- # ensure the encryption key was transmitted without error.
1029
+ # ensure that the encryption key was transmitted without error.
776
1030
  # @option options [String] :ssekms_key_id
777
- # Specifies the AWS KMS key ID to use for object encryption. All GET and
778
- # PUT requests for an object protected by AWS KMS will fail if not made
779
- # via SSL or using SigV4. Documentation on configuring any of the
780
- # officially supported AWS SDKs and CLI can be found at
781
- # http://docs.aws.amazon.com/AmazonS3/latest/dev/UsingAWSSDK.html#specify-signature-version
1031
+ # Specifies the ID of the symmetric customer managed key to use for
1032
+ # object encryption. All GET and PUT requests for an object protected by
1033
+ # Amazon Web Services KMS will fail if not made via SSL or using SigV4.
1034
+ # For information about configuring using any of the officially
1035
+ # supported Amazon Web Services SDKs and Amazon Web Services CLI, see
1036
+ # [Specifying the Signature Version in Request Authentication][1] in the
1037
+ # *Amazon S3 User Guide*.
1038
+ #
1039
+ #
1040
+ #
1041
+ # [1]: https://docs.aws.amazon.com/AmazonS3/latest/dev/UsingAWSSDK.html#specify-signature-version
1042
+ # @option options [String] :ssekms_encryption_context
1043
+ # Specifies the Amazon Web Services KMS Encryption Context to use for
1044
+ # object encryption. The value of this header is a base64-encoded UTF-8
1045
+ # string holding JSON with the encryption context key-value pairs.
1046
+ # @option options [Boolean] :bucket_key_enabled
1047
+ # Specifies whether Amazon S3 should use an S3 Bucket Key for object
1048
+ # encryption with server-side encryption using AWS KMS (SSE-KMS).
1049
+ # Setting this header to `true` causes Amazon S3 to use an S3 Bucket Key
1050
+ # for object encryption with SSE-KMS.
1051
+ #
1052
+ # Specifying this header with an object action doesn’t affect
1053
+ # bucket-level settings for S3 Bucket Key.
782
1054
  # @option options [String] :request_payer
783
- # Confirms that the requester knows that she or he will be charged for
784
- # the request. Bucket owners need not specify this parameter in their
785
- # requests. Documentation on downloading objects from requester pays
786
- # buckets can be found at
787
- # http://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html
1055
+ # Confirms that the requester knows that they will be charged for the
1056
+ # request. Bucket owners need not specify this parameter in their
1057
+ # requests. For information about downloading objects from requester
1058
+ # pays buckets, see [Downloading Objects in Requestor Pays Buckets][1]
1059
+ # in the *Amazon S3 User Guide*.
1060
+ #
1061
+ #
1062
+ #
1063
+ # [1]: https://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html
788
1064
  # @option options [String] :tagging
789
1065
  # The tag-set for the object. The tag-set must be encoded as URL Query
790
- # parameters
1066
+ # parameters.
791
1067
  # @option options [String] :object_lock_mode
792
1068
  # Specifies the Object Lock mode that you want to apply to the uploaded
793
1069
  # object.
@@ -796,6 +1072,10 @@ module Aws::S3
796
1072
  # @option options [String] :object_lock_legal_hold_status
797
1073
  # Specifies whether you want to apply a Legal Hold to the uploaded
798
1074
  # object.
1075
+ # @option options [String] :expected_bucket_owner
1076
+ # The account ID of the expected bucket owner. If the bucket is owned by
1077
+ # a different account, the request will fail with an HTTP `403 (Access
1078
+ # Denied)` error.
799
1079
  # @return [MultipartUpload]
800
1080
  def initiate_multipart_upload(options = {})
801
1081
  options = options.merge(
@@ -832,88 +1112,199 @@ module Aws::S3
832
1112
  # "MetadataKey" => "MetadataValue",
833
1113
  # },
834
1114
  # server_side_encryption: "AES256", # accepts AES256, aws:kms
835
- # storage_class: "STANDARD", # accepts STANDARD, REDUCED_REDUNDANCY, STANDARD_IA, ONEZONE_IA, INTELLIGENT_TIERING, GLACIER
1115
+ # storage_class: "STANDARD", # accepts STANDARD, REDUCED_REDUNDANCY, STANDARD_IA, ONEZONE_IA, INTELLIGENT_TIERING, GLACIER, DEEP_ARCHIVE, OUTPOSTS, GLACIER_IR
836
1116
  # website_redirect_location: "WebsiteRedirectLocation",
837
1117
  # sse_customer_algorithm: "SSECustomerAlgorithm",
838
1118
  # sse_customer_key: "SSECustomerKey",
839
1119
  # sse_customer_key_md5: "SSECustomerKeyMD5",
840
1120
  # ssekms_key_id: "SSEKMSKeyId",
1121
+ # ssekms_encryption_context: "SSEKMSEncryptionContext",
1122
+ # bucket_key_enabled: false,
841
1123
  # request_payer: "requester", # accepts requester
842
1124
  # tagging: "TaggingHeader",
843
1125
  # object_lock_mode: "GOVERNANCE", # accepts GOVERNANCE, COMPLIANCE
844
1126
  # object_lock_retain_until_date: Time.now,
845
1127
  # object_lock_legal_hold_status: "ON", # accepts ON, OFF
1128
+ # expected_bucket_owner: "AccountId",
846
1129
  # })
847
1130
  # @param [Hash] options ({})
848
1131
  # @option options [String] :acl
849
- # The canned ACL to apply to the object.
850
- # @option options [String, IO] :body
1132
+ # The canned ACL to apply to the object. For more information, see
1133
+ # [Canned ACL][1].
1134
+ #
1135
+ # This action is not supported by Amazon S3 on Outposts.
1136
+ #
1137
+ #
1138
+ #
1139
+ # [1]: https://docs.aws.amazon.com/AmazonS3/latest/dev/acl-overview.html#CannedACL
1140
+ # @option options [String, StringIO, File] :body
851
1141
  # Object data.
852
1142
  # @option options [String] :cache_control
853
- # Specifies caching behavior along the request/reply chain.
1143
+ # Can be used to specify caching behavior along the request/reply chain.
1144
+ # For more information, see
1145
+ # [http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.9][1].
1146
+ #
1147
+ #
1148
+ #
1149
+ # [1]: http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.9
854
1150
  # @option options [String] :content_disposition
855
- # Specifies presentational information for the object.
1151
+ # Specifies presentational information for the object. For more
1152
+ # information, see
1153
+ # [http://www.w3.org/Protocols/rfc2616/rfc2616-sec19.html#sec19.5.1][1].
1154
+ #
1155
+ #
1156
+ #
1157
+ # [1]: http://www.w3.org/Protocols/rfc2616/rfc2616-sec19.html#sec19.5.1
856
1158
  # @option options [String] :content_encoding
857
1159
  # Specifies what content encodings have been applied to the object and
858
1160
  # thus what decoding mechanisms must be applied to obtain the media-type
859
- # referenced by the Content-Type header field.
1161
+ # referenced by the Content-Type header field. For more information, see
1162
+ # [http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.11][1].
1163
+ #
1164
+ #
1165
+ #
1166
+ # [1]: http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.11
860
1167
  # @option options [String] :content_language
861
1168
  # The language the content is in.
862
1169
  # @option options [Integer] :content_length
863
1170
  # Size of the body in bytes. This parameter is useful when the size of
864
- # the body cannot be determined automatically.
1171
+ # the body cannot be determined automatically. For more information, see
1172
+ # [http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.13][1].
1173
+ #
1174
+ #
1175
+ #
1176
+ # [1]: http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.13
865
1177
  # @option options [String] :content_md5
866
- # The base64-encoded 128-bit MD5 digest of the part data. This parameter
867
- # is auto-populated when using the command from the CLI
1178
+ # The base64-encoded 128-bit MD5 digest of the message (without the
1179
+ # headers) according to RFC 1864. This header can be used as a message
1180
+ # integrity check to verify that the data is the same data that was
1181
+ # originally sent. Although it is optional, we recommend using the
1182
+ # Content-MD5 mechanism as an end-to-end integrity check. For more
1183
+ # information about REST request authentication, see [REST
1184
+ # Authentication][1].
1185
+ #
1186
+ #
1187
+ #
1188
+ # [1]: https://docs.aws.amazon.com/AmazonS3/latest/dev/RESTAuthentication.html
868
1189
  # @option options [String] :content_type
869
- # A standard MIME type describing the format of the object data.
1190
+ # A standard MIME type describing the format of the contents. For more
1191
+ # information, see
1192
+ # [http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.17][1].
1193
+ #
1194
+ #
1195
+ #
1196
+ # [1]: http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.17
870
1197
  # @option options [Time,DateTime,Date,Integer,String] :expires
871
- # The date and time at which the object is no longer cacheable.
1198
+ # The date and time at which the object is no longer cacheable. For more
1199
+ # information, see
1200
+ # [http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.21][1].
1201
+ #
1202
+ #
1203
+ #
1204
+ # [1]: http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.21
872
1205
  # @option options [String] :grant_full_control
873
1206
  # Gives the grantee READ, READ\_ACP, and WRITE\_ACP permissions on the
874
1207
  # object.
1208
+ #
1209
+ # This action is not supported by Amazon S3 on Outposts.
875
1210
  # @option options [String] :grant_read
876
1211
  # Allows grantee to read the object data and its metadata.
1212
+ #
1213
+ # This action is not supported by Amazon S3 on Outposts.
877
1214
  # @option options [String] :grant_read_acp
878
1215
  # Allows grantee to read the object ACL.
1216
+ #
1217
+ # This action is not supported by Amazon S3 on Outposts.
879
1218
  # @option options [String] :grant_write_acp
880
1219
  # Allows grantee to write the ACL for the applicable object.
1220
+ #
1221
+ # This action is not supported by Amazon S3 on Outposts.
881
1222
  # @option options [Hash<String,String>] :metadata
882
1223
  # A map of metadata to store with the object in S3.
883
1224
  # @option options [String] :server_side_encryption
884
- # The Server-side encryption algorithm used when storing this object in
885
- # S3 (e.g., AES256, aws:kms).
1225
+ # The server-side encryption algorithm used when storing this object in
1226
+ # Amazon S3 (for example, AES256, aws:kms).
886
1227
  # @option options [String] :storage_class
887
- # The type of storage to use for the object. Defaults to 'STANDARD'.
1228
+ # By default, Amazon S3 uses the STANDARD Storage Class to store newly
1229
+ # created objects. The STANDARD storage class provides high durability
1230
+ # and high availability. Depending on performance needs, you can specify
1231
+ # a different Storage Class. Amazon S3 on Outposts only uses the
1232
+ # OUTPOSTS Storage Class. For more information, see [Storage Classes][1]
1233
+ # in the *Amazon S3 User Guide*.
1234
+ #
1235
+ #
1236
+ #
1237
+ # [1]: https://docs.aws.amazon.com/AmazonS3/latest/dev/storage-class-intro.html
888
1238
  # @option options [String] :website_redirect_location
889
1239
  # If the bucket is configured as a website, redirects requests for this
890
1240
  # object to another object in the same bucket or to an external URL.
891
- # Amazon S3 stores the value of this header in the object metadata.
1241
+ # Amazon S3 stores the value of this header in the object metadata. For
1242
+ # information about object metadata, see [Object Key and Metadata][1].
1243
+ #
1244
+ # In the following example, the request header sets the redirect to an
1245
+ # object (anotherPage.html) in the same bucket:
1246
+ #
1247
+ # `x-amz-website-redirect-location: /anotherPage.html`
1248
+ #
1249
+ # In the following example, the request header sets the object redirect
1250
+ # to another website:
1251
+ #
1252
+ # `x-amz-website-redirect-location: http://www.example.com/`
1253
+ #
1254
+ # For more information about website hosting in Amazon S3, see [Hosting
1255
+ # Websites on Amazon S3][2] and [How to Configure Website Page
1256
+ # Redirects][3].
1257
+ #
1258
+ #
1259
+ #
1260
+ # [1]: https://docs.aws.amazon.com/AmazonS3/latest/dev/UsingMetadata.html
1261
+ # [2]: https://docs.aws.amazon.com/AmazonS3/latest/dev/WebsiteHosting.html
1262
+ # [3]: https://docs.aws.amazon.com/AmazonS3/latest/dev/how-to-page-redirect.html
892
1263
  # @option options [String] :sse_customer_algorithm
893
- # Specifies the algorithm to use to when encrypting the object (e.g.,
894
- # AES256).
1264
+ # Specifies the algorithm to use to when encrypting the object (for
1265
+ # example, AES256).
895
1266
  # @option options [String] :sse_customer_key
896
1267
  # Specifies the customer-provided encryption key for Amazon S3 to use in
897
1268
  # encrypting data. This value is used to store the object and then it is
898
- # discarded; Amazon does not store the encryption key. The key must be
899
- # appropriate for use with the algorithm specified in the
900
- # x-amz-server-side​-encryption​-customer-algorithm header.
1269
+ # discarded; Amazon S3 does not store the encryption key. The key must
1270
+ # be appropriate for use with the algorithm specified in the
1271
+ # `x-amz-server-side-encryption-customer-algorithm` header.
901
1272
  # @option options [String] :sse_customer_key_md5
902
1273
  # Specifies the 128-bit MD5 digest of the encryption key according to
903
1274
  # RFC 1321. Amazon S3 uses this header for a message integrity check to
904
- # ensure the encryption key was transmitted without error.
1275
+ # ensure that the encryption key was transmitted without error.
905
1276
  # @option options [String] :ssekms_key_id
906
- # Specifies the AWS KMS key ID to use for object encryption. All GET and
907
- # PUT requests for an object protected by AWS KMS will fail if not made
908
- # via SSL or using SigV4. Documentation on configuring any of the
909
- # officially supported AWS SDKs and CLI can be found at
910
- # http://docs.aws.amazon.com/AmazonS3/latest/dev/UsingAWSSDK.html#specify-signature-version
1277
+ # If `x-amz-server-side-encryption` is present and has the value of
1278
+ # `aws:kms`, this header specifies the ID of the Amazon Web Services Key
1279
+ # Management Service (Amazon Web Services KMS) symmetrical customer
1280
+ # managed key that was used for the object. If you specify
1281
+ # `x-amz-server-side-encryption:aws:kms`, but do not provide`
1282
+ # x-amz-server-side-encryption-aws-kms-key-id`, Amazon S3 uses the
1283
+ # Amazon Web Services managed key to protect the data. If the KMS key
1284
+ # does not exist in the same account issuing the command, you must use
1285
+ # the full ARN and not just the ID.
1286
+ # @option options [String] :ssekms_encryption_context
1287
+ # Specifies the Amazon Web Services KMS Encryption Context to use for
1288
+ # object encryption. The value of this header is a base64-encoded UTF-8
1289
+ # string holding JSON with the encryption context key-value pairs.
1290
+ # @option options [Boolean] :bucket_key_enabled
1291
+ # Specifies whether Amazon S3 should use an S3 Bucket Key for object
1292
+ # encryption with server-side encryption using AWS KMS (SSE-KMS).
1293
+ # Setting this header to `true` causes Amazon S3 to use an S3 Bucket Key
1294
+ # for object encryption with SSE-KMS.
1295
+ #
1296
+ # Specifying this header with a PUT action doesn’t affect bucket-level
1297
+ # settings for S3 Bucket Key.
911
1298
  # @option options [String] :request_payer
912
- # Confirms that the requester knows that she or he will be charged for
913
- # the request. Bucket owners need not specify this parameter in their
914
- # requests. Documentation on downloading objects from requester pays
915
- # buckets can be found at
916
- # http://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html
1299
+ # Confirms that the requester knows that they will be charged for the
1300
+ # request. Bucket owners need not specify this parameter in their
1301
+ # requests. For information about downloading objects from requester
1302
+ # pays buckets, see [Downloading Objects in Requestor Pays Buckets][1]
1303
+ # in the *Amazon S3 User Guide*.
1304
+ #
1305
+ #
1306
+ #
1307
+ # [1]: https://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html
917
1308
  # @option options [String] :tagging
918
1309
  # The tag-set for the object. The tag-set must be encoded as URL Query
919
1310
  # parameters. (For example, "Key1=Value1")
@@ -921,8 +1312,18 @@ module Aws::S3
921
1312
  # The Object Lock mode that you want to apply to this object.
922
1313
  # @option options [Time,DateTime,Date,Integer,String] :object_lock_retain_until_date
923
1314
  # The date and time when you want this object's Object Lock to expire.
1315
+ # Must be formatted as a timestamp parameter.
924
1316
  # @option options [String] :object_lock_legal_hold_status
925
- # The Legal Hold status that you want to apply to the specified object.
1317
+ # Specifies whether a legal hold will be applied to this object. For
1318
+ # more information about S3 Object Lock, see [Object Lock][1].
1319
+ #
1320
+ #
1321
+ #
1322
+ # [1]: https://docs.aws.amazon.com/AmazonS3/latest/dev/object-lock.html
1323
+ # @option options [String] :expected_bucket_owner
1324
+ # The account ID of the expected bucket owner. If the bucket is owned by
1325
+ # a different account, the request will fail with an HTTP `403 (Access
1326
+ # Denied)` error.
926
1327
  # @return [Types::PutObjectOutput]
927
1328
  def put(options = {})
928
1329
  options = options.merge(
@@ -1014,22 +1415,32 @@ module Aws::S3
1014
1415
  # value: "MetadataValue",
1015
1416
  # },
1016
1417
  # ],
1017
- # storage_class: "STANDARD", # accepts STANDARD, REDUCED_REDUNDANCY, STANDARD_IA, ONEZONE_IA, INTELLIGENT_TIERING, GLACIER
1418
+ # storage_class: "STANDARD", # accepts STANDARD, REDUCED_REDUNDANCY, STANDARD_IA, ONEZONE_IA, INTELLIGENT_TIERING, GLACIER, DEEP_ARCHIVE, OUTPOSTS, GLACIER_IR
1018
1419
  # },
1019
1420
  # },
1020
1421
  # },
1021
1422
  # request_payer: "requester", # accepts requester
1423
+ # expected_bucket_owner: "AccountId",
1022
1424
  # })
1023
1425
  # @param [Hash] options ({})
1024
1426
  # @option options [String] :version_id
1427
+ # VersionId used to reference a specific version of the object.
1025
1428
  # @option options [Types::RestoreRequest] :restore_request
1026
1429
  # Container for restore job parameters.
1027
1430
  # @option options [String] :request_payer
1028
- # Confirms that the requester knows that she or he will be charged for
1029
- # the request. Bucket owners need not specify this parameter in their
1030
- # requests. Documentation on downloading objects from requester pays
1031
- # buckets can be found at
1032
- # http://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html
1431
+ # Confirms that the requester knows that they will be charged for the
1432
+ # request. Bucket owners need not specify this parameter in their
1433
+ # requests. For information about downloading objects from requester
1434
+ # pays buckets, see [Downloading Objects in Requestor Pays Buckets][1]
1435
+ # in the *Amazon S3 User Guide*.
1436
+ #
1437
+ #
1438
+ #
1439
+ # [1]: https://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html
1440
+ # @option options [String] :expected_bucket_owner
1441
+ # The account ID of the expected bucket owner. If the bucket is owned by
1442
+ # a different account, the request will fail with an HTTP `403 (Access
1443
+ # Denied)` error.
1033
1444
  # @return [Types::RestoreObjectOutput]
1034
1445
  def restore_object(options = {})
1035
1446
  options = options.merge(
@@ -1040,6 +1451,82 @@ module Aws::S3
1040
1451
  resp.data
1041
1452
  end
1042
1453
 
1454
+ # @example Request syntax with placeholder values
1455
+ #
1456
+ # object.head({
1457
+ # if_match: "IfMatch",
1458
+ # if_modified_since: Time.now,
1459
+ # if_none_match: "IfNoneMatch",
1460
+ # if_unmodified_since: Time.now,
1461
+ # range: "Range",
1462
+ # version_id: "ObjectVersionId",
1463
+ # sse_customer_algorithm: "SSECustomerAlgorithm",
1464
+ # sse_customer_key: "SSECustomerKey",
1465
+ # sse_customer_key_md5: "SSECustomerKeyMD5",
1466
+ # request_payer: "requester", # accepts requester
1467
+ # part_number: 1,
1468
+ # expected_bucket_owner: "AccountId",
1469
+ # })
1470
+ # @param [Hash] options ({})
1471
+ # @option options [String] :if_match
1472
+ # Return the object only if its entity tag (ETag) is the same as the one
1473
+ # specified, otherwise return a 412 (precondition failed).
1474
+ # @option options [Time,DateTime,Date,Integer,String] :if_modified_since
1475
+ # Return the object only if it has been modified since the specified
1476
+ # time, otherwise return a 304 (not modified).
1477
+ # @option options [String] :if_none_match
1478
+ # Return the object only if its entity tag (ETag) is different from the
1479
+ # one specified, otherwise return a 304 (not modified).
1480
+ # @option options [Time,DateTime,Date,Integer,String] :if_unmodified_since
1481
+ # Return the object only if it has not been modified since the specified
1482
+ # time, otherwise return a 412 (precondition failed).
1483
+ # @option options [String] :range
1484
+ # Because `HeadObject` returns only the metadata for an object, this
1485
+ # parameter has no effect.
1486
+ # @option options [String] :version_id
1487
+ # VersionId used to reference a specific version of the object.
1488
+ # @option options [String] :sse_customer_algorithm
1489
+ # Specifies the algorithm to use to when encrypting the object (for
1490
+ # example, AES256).
1491
+ # @option options [String] :sse_customer_key
1492
+ # Specifies the customer-provided encryption key for Amazon S3 to use in
1493
+ # encrypting data. This value is used to store the object and then it is
1494
+ # discarded; Amazon S3 does not store the encryption key. The key must
1495
+ # be appropriate for use with the algorithm specified in the
1496
+ # `x-amz-server-side-encryption-customer-algorithm` header.
1497
+ # @option options [String] :sse_customer_key_md5
1498
+ # Specifies the 128-bit MD5 digest of the encryption key according to
1499
+ # RFC 1321. Amazon S3 uses this header for a message integrity check to
1500
+ # ensure that the encryption key was transmitted without error.
1501
+ # @option options [String] :request_payer
1502
+ # Confirms that the requester knows that they will be charged for the
1503
+ # request. Bucket owners need not specify this parameter in their
1504
+ # requests. For information about downloading objects from requester
1505
+ # pays buckets, see [Downloading Objects in Requestor Pays Buckets][1]
1506
+ # in the *Amazon S3 User Guide*.
1507
+ #
1508
+ #
1509
+ #
1510
+ # [1]: https://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html
1511
+ # @option options [Integer] :part_number
1512
+ # Part number of the object being read. This is a positive integer
1513
+ # between 1 and 10,000. Effectively performs a 'ranged' HEAD request
1514
+ # for the part specified. Useful querying about the size of the part and
1515
+ # the number of parts in this object.
1516
+ # @option options [String] :expected_bucket_owner
1517
+ # The account ID of the expected bucket owner. If the bucket is owned by
1518
+ # a different account, the request will fail with an HTTP `403 (Access
1519
+ # Denied)` error.
1520
+ # @return [Types::HeadObjectOutput]
1521
+ def head(options = {})
1522
+ options = options.merge(
1523
+ bucket: @bucket_name,
1524
+ key: @key
1525
+ )
1526
+ resp = @client.head_object(options)
1527
+ resp.data
1528
+ end
1529
+
1043
1530
  # @!group Associations
1044
1531
 
1045
1532
  # @return [ObjectAcl]
@@ -1117,8 +1604,8 @@ module Aws::S3
1117
1604
 
1118
1605
  def yield_waiter_and_warn(waiter, &block)
1119
1606
  if !@waiter_block_warned
1120
- msg = "pass options to configure the waiter; "
1121
- msg << "yielding the waiter is deprecated"
1607
+ msg = "pass options to configure the waiter; "\
1608
+ "yielding the waiter is deprecated"
1122
1609
  warn(msg)
1123
1610
  @waiter_block_warned = true
1124
1611
  end
@@ -1126,7 +1613,9 @@ module Aws::S3
1126
1613
  end
1127
1614
 
1128
1615
  def separate_params_and_options(options)
1129
- opts = Set.new([:client, :max_attempts, :delay, :before_attempt, :before_wait])
1616
+ opts = Set.new(
1617
+ [:client, :max_attempts, :delay, :before_attempt, :before_wait]
1618
+ )
1130
1619
  waiter_opts = {}
1131
1620
  waiter_params = {}
1132
1621
  options.each_pair do |key, value|
@@ -1150,21 +1639,32 @@ module Aws::S3
1150
1639
  # mfa: "MFA",
1151
1640
  # request_payer: "requester", # accepts requester
1152
1641
  # bypass_governance_retention: false,
1642
+ # expected_bucket_owner: "AccountId",
1153
1643
  # })
1154
1644
  # @param options ({})
1155
1645
  # @option options [String] :mfa
1156
1646
  # The concatenation of the authentication device's serial number, a
1157
1647
  # space, and the value that is displayed on your authentication device.
1648
+ # Required to permanently delete a versioned object if versioning is
1649
+ # configured with MFA delete enabled.
1158
1650
  # @option options [String] :request_payer
1159
- # Confirms that the requester knows that she or he will be charged for
1160
- # the request. Bucket owners need not specify this parameter in their
1161
- # requests. Documentation on downloading objects from requester pays
1162
- # buckets can be found at
1163
- # http://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html
1651
+ # Confirms that the requester knows that they will be charged for the
1652
+ # request. Bucket owners need not specify this parameter in their
1653
+ # requests. For information about downloading objects from requester
1654
+ # pays buckets, see [Downloading Objects in Requestor Pays Buckets][1]
1655
+ # in the *Amazon S3 User Guide*.
1656
+ #
1657
+ #
1658
+ #
1659
+ # [1]: https://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html
1164
1660
  # @option options [Boolean] :bypass_governance_retention
1165
1661
  # Specifies whether you want to delete this object even if it has a
1166
- # Governance-type Object Lock in place. You must have sufficient
1167
- # permissions to perform this operation.
1662
+ # Governance-type Object Lock in place. To use this header, you must
1663
+ # have the `s3:PutBucketPublicAccessBlock` permission.
1664
+ # @option options [String] :expected_bucket_owner
1665
+ # The account ID of the expected bucket owner. If the bucket is owned by
1666
+ # a different account, the request will fail with an HTTP `403 (Access
1667
+ # Denied)` error.
1168
1668
  # @return [void]
1169
1669
  def batch_delete!(options = {})
1170
1670
  batch_enum.each do |batch|