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