aws-sdk-s3 1.30.1 → 1.112.0

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 +883 -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 -77
  10. data/lib/aws-sdk-s3/bucket_acl.rb +41 -14
  11. data/lib/aws-sdk-s3/bucket_cors.rb +51 -13
  12. data/lib/aws-sdk-s3/bucket_lifecycle.rb +38 -15
  13. data/lib/aws-sdk-s3/bucket_lifecycle_configuration.rb +40 -15
  14. data/lib/aws-sdk-s3/bucket_logging.rb +36 -15
  15. data/lib/aws-sdk-s3/bucket_notification.rb +44 -15
  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 -13
  20. data/lib/aws-sdk-s3/bucket_versioning.rb +70 -12
  21. data/lib/aws-sdk-s3/bucket_website.rb +50 -13
  22. data/lib/aws-sdk-s3/client.rb +7889 -661
  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 +17 -10
  61. data/lib/aws-sdk-s3/file_part.rb +11 -6
  62. data/lib/aws-sdk-s3/file_uploader.rb +33 -14
  63. data/lib/aws-sdk-s3/legacy_signer.rb +17 -25
  64. data/lib/aws-sdk-s3/multipart_file_uploader.rb +53 -13
  65. data/lib/aws-sdk-s3/multipart_stream_uploader.rb +20 -7
  66. data/lib/aws-sdk-s3/multipart_upload.rb +64 -28
  67. data/lib/aws-sdk-s3/multipart_upload_error.rb +2 -0
  68. data/lib/aws-sdk-s3/multipart_upload_part.rb +117 -43
  69. data/lib/aws-sdk-s3/object.rb +656 -152
  70. data/lib/aws-sdk-s3/object_acl.rb +65 -20
  71. data/lib/aws-sdk-s3/object_copier.rb +2 -0
  72. data/lib/aws-sdk-s3/object_multipart_copier.rb +2 -0
  73. data/lib/aws-sdk-s3/object_summary.rb +485 -138
  74. data/lib/aws-sdk-s3/object_version.rb +117 -60
  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 +101 -49
  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 +6768 -1033
  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,6 +50,7 @@ module Aws::S3
46
50
  data[:delete_marker]
47
51
  end
48
52
 
53
+ # Indicates that a range of bytes was specified.
49
54
  # @return [String]
50
55
  def accept_ranges
51
56
  data[:accept_ranges]
@@ -53,21 +58,46 @@ module Aws::S3
53
58
 
54
59
  # If the object expiration is configured (see PUT Bucket lifecycle), the
55
60
  # response includes this header. It includes the expiry-date and rule-id
56
- # key value pairs providing object expiration information. The value of
61
+ # key-value pairs providing object expiration information. The value of
57
62
  # the rule-id is URL encoded.
58
63
  # @return [String]
59
64
  def expiration
60
65
  data[:expiration]
61
66
  end
62
67
 
63
- # Provides information about object restoration operation and expiration
64
- # 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
65
89
  # @return [String]
66
90
  def restore
67
91
  data[:restore]
68
92
  end
69
93
 
70
- # 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.
71
101
  # @return [Time]
72
102
  def last_modified
73
103
  data[:last_modified]
@@ -80,14 +110,14 @@ module Aws::S3
80
110
  end
81
111
 
82
112
  # An ETag is an opaque identifier assigned by a web server to a specific
83
- # version of a resource found at a URL
113
+ # version of a resource found at a URL.
84
114
  # @return [String]
85
115
  def etag
86
116
  data[:etag]
87
117
  end
88
118
 
89
119
  # This is set to the number of metadata entries not returned in
90
- # 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
91
121
  # API like SOAP that supports more flexible metadata than the REST API.
92
122
  # For example, using SOAP, you can create metadata whose values are not
93
123
  # legal HTTP headers.
@@ -153,8 +183,11 @@ module Aws::S3
153
183
  data[:website_redirect_location]
154
184
  end
155
185
 
156
- # The Server-side encryption algorithm used when storing this object in
157
- # 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).
158
191
  # @return [String]
159
192
  def server_side_encryption
160
193
  data[:server_side_encryption]
@@ -175,7 +208,7 @@ module Aws::S3
175
208
  end
176
209
 
177
210
  # If server-side encryption with a customer-provided encryption key was
178
- # requested, the response will include this header to provide round trip
211
+ # requested, the response will include this header to provide round-trip
179
212
  # message integrity verification of the customer-provided encryption
180
213
  # key.
181
214
  # @return [String]
@@ -183,13 +216,30 @@ module Aws::S3
183
216
  data[:sse_customer_key_md5]
184
217
  end
185
218
 
186
- # If present, specifies the ID of the AWS Key Management Service (KMS)
187
- # 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.
188
222
  # @return [String]
189
223
  def ssekms_key_id
190
224
  data[:ssekms_key_id]
191
225
  end
192
226
 
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
193
243
  # @return [String]
194
244
  def storage_class
195
245
  data[:storage_class]
@@ -202,6 +252,46 @@ module Aws::S3
202
252
  data[:request_charged]
203
253
  end
204
254
 
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
205
295
  # @return [String]
206
296
  def replication_status
207
297
  data[:replication_status]
@@ -213,19 +303,36 @@ module Aws::S3
213
303
  data[:parts_count]
214
304
  end
215
305
 
216
- # 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
217
314
  # @return [String]
218
315
  def object_lock_mode
219
316
  data[:object_lock_mode]
220
317
  end
221
318
 
222
- # 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.
223
322
  # @return [Time]
224
323
  def object_lock_retain_until_date
225
324
  data[:object_lock_retain_until_date]
226
325
  end
227
326
 
228
- # 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
229
336
  # @return [String]
230
337
  def object_lock_legal_hold_status
231
338
  data[:object_lock_legal_hold_status]
@@ -289,10 +396,10 @@ module Aws::S3
289
396
  # @option options [Proc] :before_attempt
290
397
  # @option options [Proc] :before_wait
291
398
  # @return [Object]
292
- def wait_until_exists(options = {})
399
+ def wait_until_exists(options = {}, &block)
293
400
  options, params = separate_params_and_options(options)
294
401
  waiter = Waiters::ObjectExists.new(options)
295
- yield_waiter_and_warn(waiter, &Proc.new) if block_given?
402
+ yield_waiter_and_warn(waiter, &block) if block_given?
296
403
  waiter.wait(params.merge(bucket: @bucket_name,
297
404
  key: @key))
298
405
  Object.new({
@@ -308,10 +415,10 @@ module Aws::S3
308
415
  # @option options [Proc] :before_attempt
309
416
  # @option options [Proc] :before_wait
310
417
  # @return [Object]
311
- def wait_until_not_exists(options = {})
418
+ def wait_until_not_exists(options = {}, &block)
312
419
  options, params = separate_params_and_options(options)
313
420
  waiter = Waiters::ObjectNotExists.new(options)
314
- yield_waiter_and_warn(waiter, &Proc.new) if block_given?
421
+ yield_waiter_and_warn(waiter, &block) if block_given?
315
422
  waiter.wait(params.merge(bucket: @bucket_name,
316
423
  key: @key))
317
424
  Object.new({
@@ -326,7 +433,8 @@ module Aws::S3
326
433
  # Waiter polls an API operation until a resource enters a desired
327
434
  # state.
328
435
  #
329
- # @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.
330
438
  #
331
439
  # ## Basic Usage
332
440
  #
@@ -339,13 +447,15 @@ module Aws::S3
339
447
  #
340
448
  # ## Example
341
449
  #
342
- # 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
343
453
  #
344
454
  # ## Configuration
345
455
  #
346
456
  # You can configure the maximum number of polling attempts, and the
347
- # delay (in seconds) between each polling attempt. The waiting condition is set
348
- # 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}:
349
459
  #
350
460
  # # poll for ~25 seconds
351
461
  # resource.wait_until(max_attempts:5,delay:5) {|resource|...}
@@ -376,17 +486,16 @@ module Aws::S3
376
486
  # # resource did not enter the desired state in time
377
487
  # end
378
488
  #
489
+ # @yieldparam [Resource] resource to be used in the waiting condition.
379
490
  #
380
- # @yield param [Resource] resource to be used in the waiting condition
381
- #
382
- # @raise [Aws::Waiters::Errors::FailureStateError] Raised when the waiter terminates
383
- # because the waiter has entered a state that it will not transition
384
- # 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.
385
494
  #
386
495
  # yet successful.
387
496
  #
388
- # @raise [Aws::Waiters::Errors::UnexpectedError] Raised when an error is encountered
389
- # 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.
390
499
  #
391
500
  # @raise [NotImplementedError] Raised when the resource does not
392
501
  #
@@ -443,12 +552,14 @@ module Aws::S3
443
552
  # metadata_directive: "COPY", # accepts COPY, REPLACE
444
553
  # tagging_directive: "COPY", # accepts COPY, REPLACE
445
554
  # server_side_encryption: "AES256", # accepts AES256, aws:kms
446
- # 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
447
556
  # website_redirect_location: "WebsiteRedirectLocation",
448
557
  # sse_customer_algorithm: "SSECustomerAlgorithm",
449
558
  # sse_customer_key: "SSECustomerKey",
450
559
  # sse_customer_key_md5: "SSECustomerKeyMD5",
451
560
  # ssekms_key_id: "SSEKMSKeyId",
561
+ # ssekms_encryption_context: "SSEKMSEncryptionContext",
562
+ # bucket_key_enabled: false,
452
563
  # copy_source_sse_customer_algorithm: "CopySourceSSECustomerAlgorithm",
453
564
  # copy_source_sse_customer_key: "CopySourceSSECustomerKey",
454
565
  # copy_source_sse_customer_key_md5: "CopySourceSSECustomerKeyMD5",
@@ -457,10 +568,14 @@ module Aws::S3
457
568
  # object_lock_mode: "GOVERNANCE", # accepts GOVERNANCE, COMPLIANCE
458
569
  # object_lock_retain_until_date: Time.now,
459
570
  # object_lock_legal_hold_status: "ON", # accepts ON, OFF
571
+ # expected_bucket_owner: "AccountId",
572
+ # expected_source_bucket_owner: "AccountId",
460
573
  # })
461
574
  # @param [Hash] options ({})
462
575
  # @option options [String] :acl
463
576
  # The canned ACL to apply to the object.
577
+ #
578
+ # This action is not supported by Amazon S3 on Outposts.
464
579
  # @option options [String] :cache_control
465
580
  # Specifies caching behavior along the request/reply chain.
466
581
  # @option options [String] :content_disposition
@@ -474,8 +589,51 @@ module Aws::S3
474
589
  # @option options [String] :content_type
475
590
  # A standard MIME type describing the format of the object data.
476
591
  # @option options [required, String] :copy_source
477
- # The name of the source bucket and key name of the source object,
478
- # 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
479
637
  # @option options [String] :copy_source_if_match
480
638
  # Copies the object if its entity tag (ETag) matches the specified tag.
481
639
  # @option options [Time,DateTime,Date,Integer,String] :copy_source_if_modified_since
@@ -491,12 +649,20 @@ module Aws::S3
491
649
  # @option options [String] :grant_full_control
492
650
  # Gives the grantee READ, READ\_ACP, and WRITE\_ACP permissions on the
493
651
  # object.
652
+ #
653
+ # This action is not supported by Amazon S3 on Outposts.
494
654
  # @option options [String] :grant_read
495
655
  # Allows grantee to read the object data and its metadata.
656
+ #
657
+ # This action is not supported by Amazon S3 on Outposts.
496
658
  # @option options [String] :grant_read_acp
497
659
  # Allows grantee to read the object ACL.
660
+ #
661
+ # This action is not supported by Amazon S3 on Outposts.
498
662
  # @option options [String] :grant_write_acp
499
663
  # Allows grantee to write the ACL for the applicable object.
664
+ #
665
+ # This action is not supported by Amazon S3 on Outposts.
500
666
  # @option options [Hash<String,String>] :metadata
501
667
  # A map of metadata to store with the object in S3.
502
668
  # @option options [String] :metadata_directive
@@ -506,36 +672,63 @@ module Aws::S3
506
672
  # Specifies whether the object tag-set are copied from the source object
507
673
  # or replaced with tag-set provided in the request.
508
674
  # @option options [String] :server_side_encryption
509
- # The Server-side encryption algorithm used when storing this object in
510
- # 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).
511
677
  # @option options [String] :storage_class
512
- # 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
513
688
  # @option options [String] :website_redirect_location
514
689
  # If the bucket is configured as a website, redirects requests for this
515
690
  # object to another object in the same bucket or to an external URL.
516
691
  # Amazon S3 stores the value of this header in the object metadata.
517
692
  # @option options [String] :sse_customer_algorithm
518
- # Specifies the algorithm to use to when encrypting the object (e.g.,
519
- # AES256).
693
+ # Specifies the algorithm to use to when encrypting the object (for
694
+ # example, AES256).
520
695
  # @option options [String] :sse_customer_key
521
696
  # Specifies the customer-provided encryption key for Amazon S3 to use in
522
697
  # encrypting data. This value is used to store the object and then it is
523
- # discarded; Amazon does not store the encryption key. The key must be
524
- # appropriate for use with the algorithm specified in the
525
- # 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.
526
701
  # @option options [String] :sse_customer_key_md5
527
702
  # Specifies the 128-bit MD5 digest of the encryption key according to
528
703
  # RFC 1321. Amazon S3 uses this header for a message integrity check to
529
- # ensure the encryption key was transmitted without error.
704
+ # ensure that the encryption key was transmitted without error.
530
705
  # @option options [String] :ssekms_key_id
531
- # Specifies the AWS KMS key ID to use for object encryption. All GET and
532
- # PUT requests for an object protected by AWS KMS will fail if not made
533
- # via SSL or using SigV4. Documentation on configuring any of the
534
- # officially supported AWS SDKs and CLI can be found at
535
- # 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.
536
729
  # @option options [String] :copy_source_sse_customer_algorithm
537
- # Specifies the algorithm to use when decrypting the source object
538
- # (e.g., AES256).
730
+ # Specifies the algorithm to use when decrypting the source object (for
731
+ # example, AES256).
539
732
  # @option options [String] :copy_source_sse_customer_key
540
733
  # Specifies the customer-provided encryption key for Amazon S3 to use to
541
734
  # decrypt the source object. The encryption key provided in this header
@@ -543,17 +736,21 @@ module Aws::S3
543
736
  # @option options [String] :copy_source_sse_customer_key_md5
544
737
  # Specifies the 128-bit MD5 digest of the encryption key according to
545
738
  # RFC 1321. Amazon S3 uses this header for a message integrity check to
546
- # ensure the encryption key was transmitted without error.
739
+ # ensure that the encryption key was transmitted without error.
547
740
  # @option options [String] :request_payer
548
- # Confirms that the requester knows that she or he will be charged for
549
- # the request. Bucket owners need not specify this parameter in their
550
- # requests. Documentation on downloading objects from requester pays
551
- # buckets can be found at
552
- # 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
553
750
  # @option options [String] :tagging
554
751
  # The tag-set for the object destination object this value must be used
555
- # in conjunction with the TaggingDirective. The tag-set must be encoded
556
- # as URL Query parameters
752
+ # in conjunction with the `TaggingDirective`. The tag-set must be
753
+ # encoded as URL Query parameters.
557
754
  # @option options [String] :object_lock_mode
558
755
  # The Object Lock mode that you want to apply to the copied object.
559
756
  # @option options [Time,DateTime,Date,Integer,String] :object_lock_retain_until_date
@@ -561,6 +758,14 @@ module Aws::S3
561
758
  # expire.
562
759
  # @option options [String] :object_lock_legal_hold_status
563
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.
564
769
  # @return [Types::CopyObjectOutput]
565
770
  def copy_from(options = {})
566
771
  options = options.merge(
@@ -578,22 +783,34 @@ module Aws::S3
578
783
  # version_id: "ObjectVersionId",
579
784
  # request_payer: "requester", # accepts requester
580
785
  # bypass_governance_retention: false,
786
+ # expected_bucket_owner: "AccountId",
581
787
  # })
582
788
  # @param [Hash] options ({})
583
789
  # @option options [String] :mfa
584
790
  # The concatenation of the authentication device's serial number, a
585
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.
586
794
  # @option options [String] :version_id
587
795
  # VersionId used to reference a specific version of the object.
588
796
  # @option options [String] :request_payer
589
- # Confirms that the requester knows that she or he will be charged for
590
- # the request. Bucket owners need not specify this parameter in their
591
- # requests. Documentation on downloading objects from requester pays
592
- # buckets can be found at
593
- # 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
594
806
  # @option options [Boolean] :bypass_governance_retention
595
807
  # Indicates whether S3 Object Lock should bypass Governance-mode
596
- # 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.
597
814
  # @return [Types::DeleteObjectOutput]
598
815
  def delete(options = {})
599
816
  options = options.merge(
@@ -624,6 +841,7 @@ module Aws::S3
624
841
  # sse_customer_key_md5: "SSECustomerKeyMD5",
625
842
  # request_payer: "requester", # accepts requester
626
843
  # part_number: 1,
844
+ # expected_bucket_owner: "AccountId",
627
845
  # })
628
846
  # @param [Hash] options ({})
629
847
  # @option options [String] :if_match
@@ -640,46 +858,63 @@ module Aws::S3
640
858
  # time, otherwise return a 412 (precondition failed).
641
859
  # @option options [String] :range
642
860
  # Downloads the specified range bytes of an object. For more information
643
- # about the HTTP Range header, go to
644
- # 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
645
872
  # @option options [String] :response_cache_control
646
- # Sets the Cache-Control header of the response.
873
+ # Sets the `Cache-Control` header of the response.
647
874
  # @option options [String] :response_content_disposition
648
- # Sets the Content-Disposition header of the response
875
+ # Sets the `Content-Disposition` header of the response
649
876
  # @option options [String] :response_content_encoding
650
- # Sets the Content-Encoding header of the response.
877
+ # Sets the `Content-Encoding` header of the response.
651
878
  # @option options [String] :response_content_language
652
- # Sets the Content-Language header of the response.
879
+ # Sets the `Content-Language` header of the response.
653
880
  # @option options [String] :response_content_type
654
- # Sets the Content-Type header of the response.
881
+ # Sets the `Content-Type` header of the response.
655
882
  # @option options [Time,DateTime,Date,Integer,String] :response_expires
656
- # Sets the Expires header of the response.
883
+ # Sets the `Expires` header of the response.
657
884
  # @option options [String] :version_id
658
885
  # VersionId used to reference a specific version of the object.
659
886
  # @option options [String] :sse_customer_algorithm
660
- # Specifies the algorithm to use to when encrypting the object (e.g.,
661
- # AES256).
887
+ # Specifies the algorithm to use to when decrypting the object (for
888
+ # example, AES256).
662
889
  # @option options [String] :sse_customer_key
663
- # Specifies the customer-provided encryption key for Amazon S3 to use in
664
- # encrypting data. This value is used to store the object and then it is
665
- # discarded; Amazon does not store the encryption key. The key must be
666
- # appropriate for use with the algorithm specified in the
667
- # 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.
668
895
  # @option options [String] :sse_customer_key_md5
669
896
  # Specifies the 128-bit MD5 digest of the encryption key according to
670
897
  # RFC 1321. Amazon S3 uses this header for a message integrity check to
671
- # ensure the encryption key was transmitted without error.
898
+ # ensure that the encryption key was transmitted without error.
672
899
  # @option options [String] :request_payer
673
- # Confirms that the requester knows that she or he will be charged for
674
- # the request. Bucket owners need not specify this parameter in their
675
- # requests. Documentation on downloading objects from requester pays
676
- # buckets can be found at
677
- # 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
678
909
  # @option options [Integer] :part_number
679
910
  # Part number of the object being read. This is a positive integer
680
911
  # between 1 and 10,000. Effectively performs a 'ranged' GET request
681
912
  # for the part specified. Useful for downloading just a part of an
682
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.
683
918
  # @return [Types::GetObjectOutput]
684
919
  def get(options = {}, &block)
685
920
  options = options.merge(
@@ -708,21 +943,26 @@ module Aws::S3
708
943
  # "MetadataKey" => "MetadataValue",
709
944
  # },
710
945
  # server_side_encryption: "AES256", # accepts AES256, aws:kms
711
- # 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
712
947
  # website_redirect_location: "WebsiteRedirectLocation",
713
948
  # sse_customer_algorithm: "SSECustomerAlgorithm",
714
949
  # sse_customer_key: "SSECustomerKey",
715
950
  # sse_customer_key_md5: "SSECustomerKeyMD5",
716
951
  # ssekms_key_id: "SSEKMSKeyId",
952
+ # ssekms_encryption_context: "SSEKMSEncryptionContext",
953
+ # bucket_key_enabled: false,
717
954
  # request_payer: "requester", # accepts requester
718
955
  # tagging: "TaggingHeader",
719
956
  # object_lock_mode: "GOVERNANCE", # accepts GOVERNANCE, COMPLIANCE
720
957
  # object_lock_retain_until_date: Time.now,
721
958
  # object_lock_legal_hold_status: "ON", # accepts ON, OFF
959
+ # expected_bucket_owner: "AccountId",
722
960
  # })
723
961
  # @param [Hash] options ({})
724
962
  # @option options [String] :acl
725
963
  # The canned ACL to apply to the object.
964
+ #
965
+ # This action is not supported by Amazon S3 on Outposts.
726
966
  # @option options [String] :cache_control
727
967
  # Specifies caching behavior along the request/reply chain.
728
968
  # @option options [String] :content_disposition
@@ -740,51 +980,90 @@ module Aws::S3
740
980
  # @option options [String] :grant_full_control
741
981
  # Gives the grantee READ, READ\_ACP, and WRITE\_ACP permissions on the
742
982
  # object.
983
+ #
984
+ # This action is not supported by Amazon S3 on Outposts.
743
985
  # @option options [String] :grant_read
744
986
  # Allows grantee to read the object data and its metadata.
987
+ #
988
+ # This action is not supported by Amazon S3 on Outposts.
745
989
  # @option options [String] :grant_read_acp
746
990
  # Allows grantee to read the object ACL.
991
+ #
992
+ # This action is not supported by Amazon S3 on Outposts.
747
993
  # @option options [String] :grant_write_acp
748
994
  # Allows grantee to write the ACL for the applicable object.
995
+ #
996
+ # This action is not supported by Amazon S3 on Outposts.
749
997
  # @option options [Hash<String,String>] :metadata
750
998
  # A map of metadata to store with the object in S3.
751
999
  # @option options [String] :server_side_encryption
752
- # The Server-side encryption algorithm used when storing this object in
753
- # 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).
754
1002
  # @option options [String] :storage_class
755
- # 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
756
1013
  # @option options [String] :website_redirect_location
757
1014
  # If the bucket is configured as a website, redirects requests for this
758
1015
  # object to another object in the same bucket or to an external URL.
759
1016
  # Amazon S3 stores the value of this header in the object metadata.
760
1017
  # @option options [String] :sse_customer_algorithm
761
- # Specifies the algorithm to use to when encrypting the object (e.g.,
762
- # AES256).
1018
+ # Specifies the algorithm to use to when encrypting the object (for
1019
+ # example, AES256).
763
1020
  # @option options [String] :sse_customer_key
764
1021
  # Specifies the customer-provided encryption key for Amazon S3 to use in
765
1022
  # encrypting data. This value is used to store the object and then it is
766
- # discarded; Amazon does not store the encryption key. The key must be
767
- # appropriate for use with the algorithm specified in the
768
- # 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.
769
1026
  # @option options [String] :sse_customer_key_md5
770
1027
  # Specifies the 128-bit MD5 digest of the encryption key according to
771
1028
  # RFC 1321. Amazon S3 uses this header for a message integrity check to
772
- # ensure the encryption key was transmitted without error.
1029
+ # ensure that the encryption key was transmitted without error.
773
1030
  # @option options [String] :ssekms_key_id
774
- # Specifies the AWS KMS key ID to use for object encryption. All GET and
775
- # PUT requests for an object protected by AWS KMS will fail if not made
776
- # via SSL or using SigV4. Documentation on configuring any of the
777
- # officially supported AWS SDKs and CLI can be found at
778
- # 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.
779
1054
  # @option options [String] :request_payer
780
- # Confirms that the requester knows that she or he will be charged for
781
- # the request. Bucket owners need not specify this parameter in their
782
- # requests. Documentation on downloading objects from requester pays
783
- # buckets can be found at
784
- # 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
785
1064
  # @option options [String] :tagging
786
1065
  # The tag-set for the object. The tag-set must be encoded as URL Query
787
- # parameters
1066
+ # parameters.
788
1067
  # @option options [String] :object_lock_mode
789
1068
  # Specifies the Object Lock mode that you want to apply to the uploaded
790
1069
  # object.
@@ -793,6 +1072,10 @@ module Aws::S3
793
1072
  # @option options [String] :object_lock_legal_hold_status
794
1073
  # Specifies whether you want to apply a Legal Hold to the uploaded
795
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.
796
1079
  # @return [MultipartUpload]
797
1080
  def initiate_multipart_upload(options = {})
798
1081
  options = options.merge(
@@ -829,87 +1112,199 @@ module Aws::S3
829
1112
  # "MetadataKey" => "MetadataValue",
830
1113
  # },
831
1114
  # server_side_encryption: "AES256", # accepts AES256, aws:kms
832
- # 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
833
1116
  # website_redirect_location: "WebsiteRedirectLocation",
834
1117
  # sse_customer_algorithm: "SSECustomerAlgorithm",
835
1118
  # sse_customer_key: "SSECustomerKey",
836
1119
  # sse_customer_key_md5: "SSECustomerKeyMD5",
837
1120
  # ssekms_key_id: "SSEKMSKeyId",
1121
+ # ssekms_encryption_context: "SSEKMSEncryptionContext",
1122
+ # bucket_key_enabled: false,
838
1123
  # request_payer: "requester", # accepts requester
839
1124
  # tagging: "TaggingHeader",
840
1125
  # object_lock_mode: "GOVERNANCE", # accepts GOVERNANCE, COMPLIANCE
841
1126
  # object_lock_retain_until_date: Time.now,
842
1127
  # object_lock_legal_hold_status: "ON", # accepts ON, OFF
1128
+ # expected_bucket_owner: "AccountId",
843
1129
  # })
844
1130
  # @param [Hash] options ({})
845
1131
  # @option options [String] :acl
846
- # The canned ACL to apply to the object.
847
- # @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
848
1141
  # Object data.
849
1142
  # @option options [String] :cache_control
850
- # 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
851
1150
  # @option options [String] :content_disposition
852
- # 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
853
1158
  # @option options [String] :content_encoding
854
1159
  # Specifies what content encodings have been applied to the object and
855
1160
  # thus what decoding mechanisms must be applied to obtain the media-type
856
- # 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
857
1167
  # @option options [String] :content_language
858
1168
  # The language the content is in.
859
1169
  # @option options [Integer] :content_length
860
1170
  # Size of the body in bytes. This parameter is useful when the size of
861
- # 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
862
1177
  # @option options [String] :content_md5
863
- # The base64-encoded 128-bit MD5 digest of the part data.
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
864
1189
  # @option options [String] :content_type
865
- # 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
866
1197
  # @option options [Time,DateTime,Date,Integer,String] :expires
867
- # 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
868
1205
  # @option options [String] :grant_full_control
869
1206
  # Gives the grantee READ, READ\_ACP, and WRITE\_ACP permissions on the
870
1207
  # object.
1208
+ #
1209
+ # This action is not supported by Amazon S3 on Outposts.
871
1210
  # @option options [String] :grant_read
872
1211
  # Allows grantee to read the object data and its metadata.
1212
+ #
1213
+ # This action is not supported by Amazon S3 on Outposts.
873
1214
  # @option options [String] :grant_read_acp
874
1215
  # Allows grantee to read the object ACL.
1216
+ #
1217
+ # This action is not supported by Amazon S3 on Outposts.
875
1218
  # @option options [String] :grant_write_acp
876
1219
  # Allows grantee to write the ACL for the applicable object.
1220
+ #
1221
+ # This action is not supported by Amazon S3 on Outposts.
877
1222
  # @option options [Hash<String,String>] :metadata
878
1223
  # A map of metadata to store with the object in S3.
879
1224
  # @option options [String] :server_side_encryption
880
- # The Server-side encryption algorithm used when storing this object in
881
- # 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).
882
1227
  # @option options [String] :storage_class
883
- # 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
884
1238
  # @option options [String] :website_redirect_location
885
1239
  # If the bucket is configured as a website, redirects requests for this
886
1240
  # object to another object in the same bucket or to an external URL.
887
- # 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
888
1263
  # @option options [String] :sse_customer_algorithm
889
- # Specifies the algorithm to use to when encrypting the object (e.g.,
890
- # AES256).
1264
+ # Specifies the algorithm to use to when encrypting the object (for
1265
+ # example, AES256).
891
1266
  # @option options [String] :sse_customer_key
892
1267
  # Specifies the customer-provided encryption key for Amazon S3 to use in
893
1268
  # encrypting data. This value is used to store the object and then it is
894
- # discarded; Amazon does not store the encryption key. The key must be
895
- # appropriate for use with the algorithm specified in the
896
- # 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.
897
1272
  # @option options [String] :sse_customer_key_md5
898
1273
  # Specifies the 128-bit MD5 digest of the encryption key according to
899
1274
  # RFC 1321. Amazon S3 uses this header for a message integrity check to
900
- # ensure the encryption key was transmitted without error.
1275
+ # ensure that the encryption key was transmitted without error.
901
1276
  # @option options [String] :ssekms_key_id
902
- # Specifies the AWS KMS key ID to use for object encryption. All GET and
903
- # PUT requests for an object protected by AWS KMS will fail if not made
904
- # via SSL or using SigV4. Documentation on configuring any of the
905
- # officially supported AWS SDKs and CLI can be found at
906
- # 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.
907
1298
  # @option options [String] :request_payer
908
- # Confirms that the requester knows that she or he will be charged for
909
- # the request. Bucket owners need not specify this parameter in their
910
- # requests. Documentation on downloading objects from requester pays
911
- # buckets can be found at
912
- # 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
913
1308
  # @option options [String] :tagging
914
1309
  # The tag-set for the object. The tag-set must be encoded as URL Query
915
1310
  # parameters. (For example, "Key1=Value1")
@@ -917,8 +1312,18 @@ module Aws::S3
917
1312
  # The Object Lock mode that you want to apply to this object.
918
1313
  # @option options [Time,DateTime,Date,Integer,String] :object_lock_retain_until_date
919
1314
  # The date and time when you want this object's Object Lock to expire.
1315
+ # Must be formatted as a timestamp parameter.
920
1316
  # @option options [String] :object_lock_legal_hold_status
921
- # 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.
922
1327
  # @return [Types::PutObjectOutput]
923
1328
  def put(options = {})
924
1329
  options = options.merge(
@@ -1010,22 +1415,32 @@ module Aws::S3
1010
1415
  # value: "MetadataValue",
1011
1416
  # },
1012
1417
  # ],
1013
- # 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
1014
1419
  # },
1015
1420
  # },
1016
1421
  # },
1017
1422
  # request_payer: "requester", # accepts requester
1423
+ # expected_bucket_owner: "AccountId",
1018
1424
  # })
1019
1425
  # @param [Hash] options ({})
1020
1426
  # @option options [String] :version_id
1427
+ # VersionId used to reference a specific version of the object.
1021
1428
  # @option options [Types::RestoreRequest] :restore_request
1022
1429
  # Container for restore job parameters.
1023
1430
  # @option options [String] :request_payer
1024
- # Confirms that the requester knows that she or he will be charged for
1025
- # the request. Bucket owners need not specify this parameter in their
1026
- # requests. Documentation on downloading objects from requester pays
1027
- # buckets can be found at
1028
- # 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.
1029
1444
  # @return [Types::RestoreObjectOutput]
1030
1445
  def restore_object(options = {})
1031
1446
  options = options.merge(
@@ -1036,6 +1451,82 @@ module Aws::S3
1036
1451
  resp.data
1037
1452
  end
1038
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
+
1039
1530
  # @!group Associations
1040
1531
 
1041
1532
  # @return [ObjectAcl]
@@ -1113,8 +1604,8 @@ module Aws::S3
1113
1604
 
1114
1605
  def yield_waiter_and_warn(waiter, &block)
1115
1606
  if !@waiter_block_warned
1116
- msg = "pass options to configure the waiter; "
1117
- msg << "yielding the waiter is deprecated"
1607
+ msg = "pass options to configure the waiter; "\
1608
+ "yielding the waiter is deprecated"
1118
1609
  warn(msg)
1119
1610
  @waiter_block_warned = true
1120
1611
  end
@@ -1122,7 +1613,9 @@ module Aws::S3
1122
1613
  end
1123
1614
 
1124
1615
  def separate_params_and_options(options)
1125
- 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
+ )
1126
1619
  waiter_opts = {}
1127
1620
  waiter_params = {}
1128
1621
  options.each_pair do |key, value|
@@ -1146,21 +1639,32 @@ module Aws::S3
1146
1639
  # mfa: "MFA",
1147
1640
  # request_payer: "requester", # accepts requester
1148
1641
  # bypass_governance_retention: false,
1642
+ # expected_bucket_owner: "AccountId",
1149
1643
  # })
1150
1644
  # @param options ({})
1151
1645
  # @option options [String] :mfa
1152
1646
  # The concatenation of the authentication device's serial number, a
1153
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.
1154
1650
  # @option options [String] :request_payer
1155
- # Confirms that the requester knows that she or he will be charged for
1156
- # the request. Bucket owners need not specify this parameter in their
1157
- # requests. Documentation on downloading objects from requester pays
1158
- # buckets can be found at
1159
- # 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
1160
1660
  # @option options [Boolean] :bypass_governance_retention
1161
1661
  # Specifies whether you want to delete this object even if it has a
1162
- # Governance-type Object Lock in place. You must have sufficient
1163
- # 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.
1164
1668
  # @return [void]
1165
1669
  def batch_delete!(options = {})
1166
1670
  batch_enum.each do |batch|