aws-sdk-s3 1.68.1 → 1.93.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (99) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +748 -0
  3. data/LICENSE.txt +202 -0
  4. data/VERSION +1 -0
  5. data/lib/aws-sdk-s3.rb +6 -3
  6. data/lib/aws-sdk-s3/arn/access_point_arn.rb +64 -0
  7. data/lib/aws-sdk-s3/arn/object_lambda_arn.rb +64 -0
  8. data/lib/aws-sdk-s3/arn/outpost_access_point_arn.rb +73 -0
  9. data/lib/aws-sdk-s3/bucket.rb +71 -10
  10. data/lib/aws-sdk-s3/bucket_acl.rb +11 -1
  11. data/lib/aws-sdk-s3/bucket_cors.rb +20 -4
  12. data/lib/aws-sdk-s3/bucket_lifecycle.rb +17 -2
  13. data/lib/aws-sdk-s3/bucket_lifecycle_configuration.rb +15 -2
  14. data/lib/aws-sdk-s3/bucket_logging.rb +11 -1
  15. data/lib/aws-sdk-s3/bucket_notification.rb +8 -1
  16. data/lib/aws-sdk-s3/bucket_policy.rb +18 -2
  17. data/lib/aws-sdk-s3/bucket_region_cache.rb +2 -0
  18. data/lib/aws-sdk-s3/bucket_request_payment.rb +14 -5
  19. data/lib/aws-sdk-s3/bucket_tagging.rb +18 -2
  20. data/lib/aws-sdk-s3/bucket_versioning.rb +27 -1
  21. data/lib/aws-sdk-s3/bucket_website.rb +18 -2
  22. data/lib/aws-sdk-s3/client.rb +3425 -1183
  23. data/lib/aws-sdk-s3/client_api.rb +361 -21
  24. data/lib/aws-sdk-s3/customizations.rb +4 -1
  25. data/lib/aws-sdk-s3/customizations/bucket.rb +17 -7
  26. data/lib/aws-sdk-s3/customizations/multipart_upload.rb +2 -0
  27. data/lib/aws-sdk-s3/customizations/object.rb +27 -7
  28. data/lib/aws-sdk-s3/customizations/object_summary.rb +2 -0
  29. data/lib/aws-sdk-s3/customizations/types/list_object_versions_output.rb +2 -0
  30. data/lib/aws-sdk-s3/encryption.rb +4 -0
  31. data/lib/aws-sdk-s3/encryption/client.rb +13 -0
  32. data/lib/aws-sdk-s3/encryption/decrypt_handler.rb +72 -26
  33. data/lib/aws-sdk-s3/encryption/default_cipher_provider.rb +43 -5
  34. data/lib/aws-sdk-s3/encryption/default_key_provider.rb +2 -0
  35. data/lib/aws-sdk-s3/encryption/encrypt_handler.rb +13 -2
  36. data/lib/aws-sdk-s3/encryption/errors.rb +2 -0
  37. data/lib/aws-sdk-s3/encryption/io_auth_decrypter.rb +2 -0
  38. data/lib/aws-sdk-s3/encryption/io_decrypter.rb +11 -3
  39. data/lib/aws-sdk-s3/encryption/io_encrypter.rb +2 -0
  40. data/lib/aws-sdk-s3/encryption/key_provider.rb +2 -0
  41. data/lib/aws-sdk-s3/encryption/kms_cipher_provider.rb +34 -3
  42. data/lib/aws-sdk-s3/encryption/materials.rb +2 -0
  43. data/lib/aws-sdk-s3/encryption/utils.rb +25 -0
  44. data/lib/aws-sdk-s3/encryptionV2/client.rb +566 -0
  45. data/lib/aws-sdk-s3/encryptionV2/decrypt_handler.rb +226 -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 +69 -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 +24 -1
  59. data/lib/aws-sdk-s3/event_streams.rb +3 -1
  60. data/lib/aws-sdk-s3/file_downloader.rb +2 -0
  61. data/lib/aws-sdk-s3/file_part.rb +2 -0
  62. data/lib/aws-sdk-s3/file_uploader.rb +16 -3
  63. data/lib/aws-sdk-s3/legacy_signer.rb +17 -25
  64. data/lib/aws-sdk-s3/multipart_file_uploader.rb +39 -2
  65. data/lib/aws-sdk-s3/multipart_stream_uploader.rb +2 -0
  66. data/lib/aws-sdk-s3/multipart_upload.rb +18 -1
  67. data/lib/aws-sdk-s3/multipart_upload_error.rb +2 -0
  68. data/lib/aws-sdk-s3/multipart_upload_part.rb +67 -8
  69. data/lib/aws-sdk-s3/object.rb +310 -34
  70. data/lib/aws-sdk-s3/object_acl.rb +19 -1
  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 +208 -25
  74. data/lib/aws-sdk-s3/object_version.rb +35 -9
  75. data/lib/aws-sdk-s3/plugins/accelerate.rb +32 -38
  76. data/lib/aws-sdk-s3/plugins/arn.rb +228 -0
  77. data/lib/aws-sdk-s3/plugins/bucket_dns.rb +2 -2
  78. data/lib/aws-sdk-s3/plugins/bucket_name_restrictions.rb +3 -1
  79. data/lib/aws-sdk-s3/plugins/dualstack.rb +15 -4
  80. data/lib/aws-sdk-s3/plugins/expect_100_continue.rb +4 -1
  81. data/lib/aws-sdk-s3/plugins/get_bucket_location_fix.rb +2 -0
  82. data/lib/aws-sdk-s3/plugins/http_200_errors.rb +4 -1
  83. data/lib/aws-sdk-s3/plugins/iad_regional_endpoint.rb +14 -7
  84. data/lib/aws-sdk-s3/plugins/location_constraint.rb +2 -0
  85. data/lib/aws-sdk-s3/plugins/md5s.rb +3 -1
  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 +36 -14
  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 +64 -28
  94. data/lib/aws-sdk-s3/presigner.rb +20 -16
  95. data/lib/aws-sdk-s3/resource.rb +4 -2
  96. data/lib/aws-sdk-s3/types.rb +3300 -542
  97. data/lib/aws-sdk-s3/waiters.rb +3 -1
  98. metadata +30 -8
  99. data/lib/aws-sdk-s3/plugins/bucket_arn.rb +0 -210
@@ -1,7 +1,9 @@
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
 
@@ -226,6 +228,7 @@ module Aws::S3
226
228
  # grant_write_acp: "GrantWriteACP",
227
229
  # request_payer: "requester", # accepts requester
228
230
  # version_id: "ObjectVersionId",
231
+ # expected_bucket_owner: "AccountId",
229
232
  # })
230
233
  # @param [Hash] options ({})
231
234
  # @option options [String] :acl
@@ -244,21 +247,32 @@ module Aws::S3
244
247
  # not corrupted in transit. For more information, go to [RFC
245
248
  # 1864.>][1]
246
249
  #
250
+ # For requests made using the AWS Command Line Interface (CLI) or AWS
251
+ # SDKs, this field is calculated automatically.
252
+ #
247
253
  #
248
254
  #
249
255
  # [1]: http://www.ietf.org/rfc/rfc1864.txt
250
256
  # @option options [String] :grant_full_control
251
257
  # Allows grantee the read, write, read ACP, and write ACP permissions on
252
258
  # the bucket.
259
+ #
260
+ # This action is not supported by Amazon S3 on Outposts.
253
261
  # @option options [String] :grant_read
254
262
  # Allows grantee to list the objects in the bucket.
263
+ #
264
+ # This action is not supported by Amazon S3 on Outposts.
255
265
  # @option options [String] :grant_read_acp
256
266
  # Allows grantee to read the bucket ACL.
267
+ #
268
+ # This action is not supported by Amazon S3 on Outposts.
257
269
  # @option options [String] :grant_write
258
270
  # Allows grantee to create, overwrite, and delete any object in the
259
271
  # bucket.
260
272
  # @option options [String] :grant_write_acp
261
273
  # Allows grantee to write the ACL for the applicable bucket.
274
+ #
275
+ # This action is not supported by Amazon S3 on Outposts.
262
276
  # @option options [String] :request_payer
263
277
  # Confirms that the requester knows that they will be charged for the
264
278
  # request. Bucket owners need not specify this parameter in their
@@ -271,6 +285,10 @@ module Aws::S3
271
285
  # [1]: https://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html
272
286
  # @option options [String] :version_id
273
287
  # VersionId used to reference a specific version of the object.
288
+ # @option options [String] :expected_bucket_owner
289
+ # The account ID of the expected bucket owner. If the bucket is owned by
290
+ # a different account, the request will fail with an HTTP `403 (Access
291
+ # Denied)` error.
274
292
  # @return [Types::PutObjectAclOutput]
275
293
  def put(options = {})
276
294
  options = options.merge(
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require 'thread'
2
4
 
3
5
  module Aws
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require 'thread'
2
4
  require 'cgi'
3
5
 
@@ -1,7 +1,9 @@
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
 
@@ -40,14 +42,30 @@ module Aws::S3
40
42
  @key
41
43
  end
42
44
 
43
- # The date the Object was Last Modified
45
+ # Creation date of the object.
44
46
  # @return [Time]
45
47
  def last_modified
46
48
  data[:last_modified]
47
49
  end
48
50
 
49
- # The entity tag is an MD5 hash of the object. ETag reflects only
50
- # changes to the contents of an object, not its metadata.
51
+ # The entity tag is a hash of the object. The ETag reflects changes only
52
+ # to the contents of an object, not its metadata. The ETag may or may
53
+ # not be an MD5 digest of the object data. Whether or not it is depends
54
+ # on how the object was created and how it is encrypted as described
55
+ # below:
56
+ #
57
+ # * Objects created by the PUT Object, POST Object, or Copy operation,
58
+ # or through the AWS Management Console, and are encrypted by SSE-S3
59
+ # or plaintext, have ETags that are an MD5 digest of their object
60
+ # data.
61
+ #
62
+ # * Objects created by the PUT Object, POST Object, or Copy operation,
63
+ # or through the AWS Management Console, and are encrypted by SSE-C or
64
+ # SSE-KMS, have ETags that are not an MD5 digest of their object data.
65
+ #
66
+ # * If an object is created by either the Multipart Upload or Part Copy
67
+ # operation, the ETag is not an MD5 digest, regardless of the method
68
+ # of encryption.
51
69
  # @return [String]
52
70
  def etag
53
71
  data[:etag]
@@ -277,13 +295,14 @@ module Aws::S3
277
295
  # metadata_directive: "COPY", # accepts COPY, REPLACE
278
296
  # tagging_directive: "COPY", # accepts COPY, REPLACE
279
297
  # server_side_encryption: "AES256", # accepts AES256, aws:kms
280
- # storage_class: "STANDARD", # accepts STANDARD, REDUCED_REDUNDANCY, STANDARD_IA, ONEZONE_IA, INTELLIGENT_TIERING, GLACIER, DEEP_ARCHIVE
298
+ # storage_class: "STANDARD", # accepts STANDARD, REDUCED_REDUNDANCY, STANDARD_IA, ONEZONE_IA, INTELLIGENT_TIERING, GLACIER, DEEP_ARCHIVE, OUTPOSTS
281
299
  # website_redirect_location: "WebsiteRedirectLocation",
282
300
  # sse_customer_algorithm: "SSECustomerAlgorithm",
283
301
  # sse_customer_key: "SSECustomerKey",
284
302
  # sse_customer_key_md5: "SSECustomerKeyMD5",
285
303
  # ssekms_key_id: "SSEKMSKeyId",
286
304
  # ssekms_encryption_context: "SSEKMSEncryptionContext",
305
+ # bucket_key_enabled: false,
287
306
  # copy_source_sse_customer_algorithm: "CopySourceSSECustomerAlgorithm",
288
307
  # copy_source_sse_customer_key: "CopySourceSSECustomerKey",
289
308
  # copy_source_sse_customer_key_md5: "CopySourceSSECustomerKeyMD5",
@@ -292,10 +311,14 @@ module Aws::S3
292
311
  # object_lock_mode: "GOVERNANCE", # accepts GOVERNANCE, COMPLIANCE
293
312
  # object_lock_retain_until_date: Time.now,
294
313
  # object_lock_legal_hold_status: "ON", # accepts ON, OFF
314
+ # expected_bucket_owner: "AccountId",
315
+ # expected_source_bucket_owner: "AccountId",
295
316
  # })
296
317
  # @param [Hash] options ({})
297
318
  # @option options [String] :acl
298
319
  # The canned ACL to apply to the object.
320
+ #
321
+ # This action is not supported by Amazon S3 on Outposts.
299
322
  # @option options [String] :cache_control
300
323
  # Specifies caching behavior along the request/reply chain.
301
324
  # @option options [String] :content_disposition
@@ -309,8 +332,50 @@ module Aws::S3
309
332
  # @option options [String] :content_type
310
333
  # A standard MIME type describing the format of the object data.
311
334
  # @option options [required, String] :copy_source
312
- # The name of the source bucket and key name of the source object,
313
- # separated by a slash (/). Must be URL-encoded.
335
+ # Specifies the source object for the copy operation. You specify the
336
+ # value in one of two formats, depending on whether you want to access
337
+ # the source object through an [access point][1]\:
338
+ #
339
+ # * For objects not accessed through an access point, specify the name
340
+ # of the source bucket and the key of the source object, separated by
341
+ # a slash (/). For example, to copy the object `reports/january.pdf`
342
+ # from the bucket `awsexamplebucket`, use
343
+ # `awsexamplebucket/reports/january.pdf`. The value must be URL
344
+ # encoded.
345
+ #
346
+ # * For objects accessed through access points, specify the Amazon
347
+ # Resource Name (ARN) of the object as accessed through the access
348
+ # point, in the format
349
+ # `arn:aws:s3:<Region>:<account-id>:accesspoint/<access-point-name>/object/<key>`.
350
+ # For example, to copy the object `reports/january.pdf` through access
351
+ # point `my-access-point` owned by account `123456789012` in Region
352
+ # `us-west-2`, use the URL encoding of
353
+ # `arn:aws:s3:us-west-2:123456789012:accesspoint/my-access-point/object/reports/january.pdf`.
354
+ # The value must be URL encoded.
355
+ #
356
+ # <note markdown="1"> Amazon S3 supports copy operations using access points only when the
357
+ # source and destination buckets are in the same AWS Region.
358
+ #
359
+ # </note>
360
+ #
361
+ # Alternatively, for objects accessed through Amazon S3 on Outposts,
362
+ # specify the ARN of the object as accessed in the format
363
+ # `arn:aws:s3-outposts:<Region>:<account-id>:outpost/<outpost-id>/object/<key>`.
364
+ # For example, to copy the object `reports/january.pdf` through
365
+ # outpost `my-outpost` owned by account `123456789012` in Region
366
+ # `us-west-2`, use the URL encoding of
367
+ # `arn:aws:s3-outposts:us-west-2:123456789012:outpost/my-outpost/object/reports/january.pdf`.
368
+ # The value must be URL encoded.
369
+ #
370
+ # To copy a specific version of an object, append
371
+ # `?versionId=<version-id>` to the value (for example,
372
+ # `awsexamplebucket/reports/january.pdf?versionId=QUpfdndhfd8438MNFDN93jdnJFkdmqnh893`).
373
+ # If you don't specify a version ID, Amazon S3 copies the latest
374
+ # version of the source object.
375
+ #
376
+ #
377
+ #
378
+ # [1]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/access-points.html
314
379
  # @option options [String] :copy_source_if_match
315
380
  # Copies the object if its entity tag (ETag) matches the specified tag.
316
381
  # @option options [Time,DateTime,Date,Integer,String] :copy_source_if_modified_since
@@ -326,12 +391,20 @@ module Aws::S3
326
391
  # @option options [String] :grant_full_control
327
392
  # Gives the grantee READ, READ\_ACP, and WRITE\_ACP permissions on the
328
393
  # object.
394
+ #
395
+ # This action is not supported by Amazon S3 on Outposts.
329
396
  # @option options [String] :grant_read
330
397
  # Allows grantee to read the object data and its metadata.
398
+ #
399
+ # This action is not supported by Amazon S3 on Outposts.
331
400
  # @option options [String] :grant_read_acp
332
401
  # Allows grantee to read the object ACL.
402
+ #
403
+ # This action is not supported by Amazon S3 on Outposts.
333
404
  # @option options [String] :grant_write_acp
334
405
  # Allows grantee to write the ACL for the applicable object.
406
+ #
407
+ # This action is not supported by Amazon S3 on Outposts.
335
408
  # @option options [Hash<String,String>] :metadata
336
409
  # A map of metadata to store with the object in S3.
337
410
  # @option options [String] :metadata_directive
@@ -344,7 +417,16 @@ module Aws::S3
344
417
  # The server-side encryption algorithm used when storing this object in
345
418
  # Amazon S3 (for example, AES256, aws:kms).
346
419
  # @option options [String] :storage_class
347
- # The type of storage to use for the object. Defaults to 'STANDARD'.
420
+ # By default, Amazon S3 uses the STANDARD Storage Class to store newly
421
+ # created objects. The STANDARD storage class provides high durability
422
+ # and high availability. Depending on performance needs, you can specify
423
+ # a different Storage Class. Amazon S3 on Outposts only uses the
424
+ # OUTPOSTS Storage Class. For more information, see [Storage Classes][1]
425
+ # in the *Amazon S3 Service Developer Guide*.
426
+ #
427
+ #
428
+ #
429
+ # [1]: https://docs.aws.amazon.com/AmazonS3/latest/dev/storage-class-intro.html
348
430
  # @option options [String] :website_redirect_location
349
431
  # If the bucket is configured as a website, redirects requests for this
350
432
  # object to another object in the same bucket or to an external URL.
@@ -357,7 +439,7 @@ module Aws::S3
357
439
  # encrypting data. This value is used to store the object and then it is
358
440
  # discarded; Amazon S3 does not store the encryption key. The key must
359
441
  # be appropriate for use with the algorithm specified in the
360
- # `x-amz-server-side​-encryption​-customer-algorithm` header.
442
+ # `x-amz-server-side-encryption-customer-algorithm` header.
361
443
  # @option options [String] :sse_customer_key_md5
362
444
  # Specifies the 128-bit MD5 digest of the encryption key according to
363
445
  # RFC 1321. Amazon S3 uses this header for a message integrity check to
@@ -377,6 +459,14 @@ module Aws::S3
377
459
  # Specifies the AWS KMS Encryption Context to use for object encryption.
378
460
  # The value of this header is a base64-encoded UTF-8 string holding JSON
379
461
  # with the encryption context key-value pairs.
462
+ # @option options [Boolean] :bucket_key_enabled
463
+ # Specifies whether Amazon S3 should use an S3 Bucket Key for object
464
+ # encryption with server-side encryption using AWS KMS (SSE-KMS).
465
+ # Setting this header to `true` causes Amazon S3 to use an S3 Bucket Key
466
+ # for object encryption with SSE-KMS.
467
+ #
468
+ # Specifying this header with a COPY action doesn’t affect bucket-level
469
+ # settings for S3 Bucket Key.
380
470
  # @option options [String] :copy_source_sse_customer_algorithm
381
471
  # Specifies the algorithm to use when decrypting the source object (for
382
472
  # example, AES256).
@@ -409,6 +499,14 @@ module Aws::S3
409
499
  # expire.
410
500
  # @option options [String] :object_lock_legal_hold_status
411
501
  # Specifies whether you want to apply a Legal Hold to the copied object.
502
+ # @option options [String] :expected_bucket_owner
503
+ # The account ID of the expected destination bucket owner. If the
504
+ # destination bucket is owned by a different account, the request will
505
+ # fail with an HTTP `403 (Access Denied)` error.
506
+ # @option options [String] :expected_source_bucket_owner
507
+ # The account ID of the expected source bucket owner. If the source
508
+ # bucket is owned by a different account, the request will fail with an
509
+ # HTTP `403 (Access Denied)` error.
412
510
  # @return [Types::CopyObjectOutput]
413
511
  def copy_from(options = {})
414
512
  options = options.merge(
@@ -426,6 +524,7 @@ module Aws::S3
426
524
  # version_id: "ObjectVersionId",
427
525
  # request_payer: "requester", # accepts requester
428
526
  # bypass_governance_retention: false,
527
+ # expected_bucket_owner: "AccountId",
429
528
  # })
430
529
  # @param [Hash] options ({})
431
530
  # @option options [String] :mfa
@@ -448,6 +547,10 @@ module Aws::S3
448
547
  # @option options [Boolean] :bypass_governance_retention
449
548
  # Indicates whether S3 Object Lock should bypass Governance-mode
450
549
  # restrictions to process this operation.
550
+ # @option options [String] :expected_bucket_owner
551
+ # The account ID of the expected bucket owner. If the bucket is owned by
552
+ # a different account, the request will fail with an HTTP `403 (Access
553
+ # Denied)` error.
451
554
  # @return [Types::DeleteObjectOutput]
452
555
  def delete(options = {})
453
556
  options = options.merge(
@@ -478,6 +581,7 @@ module Aws::S3
478
581
  # sse_customer_key_md5: "SSECustomerKeyMD5",
479
582
  # request_payer: "requester", # accepts requester
480
583
  # part_number: 1,
584
+ # expected_bucket_owner: "AccountId",
481
585
  # })
482
586
  # @param [Hash] options ({})
483
587
  # @option options [String] :if_match
@@ -520,14 +624,14 @@ module Aws::S3
520
624
  # @option options [String] :version_id
521
625
  # VersionId used to reference a specific version of the object.
522
626
  # @option options [String] :sse_customer_algorithm
523
- # Specifies the algorithm to use to when encrypting the object (for
627
+ # Specifies the algorithm to use to when decrypting the object (for
524
628
  # example, AES256).
525
629
  # @option options [String] :sse_customer_key
526
- # Specifies the customer-provided encryption key for Amazon S3 to use in
527
- # encrypting data. This value is used to store the object and then it is
528
- # discarded; Amazon S3 does not store the encryption key. The key must
529
- # be appropriate for use with the algorithm specified in the
530
- # `x-amz-server-side​-encryption​-customer-algorithm` header.
630
+ # Specifies the customer-provided encryption key for Amazon S3 used to
631
+ # encrypt the data. This value is used to decrypt the object when
632
+ # recovering it and must match the one used when storing the data. The
633
+ # key must be appropriate for use with the algorithm specified in the
634
+ # `x-amz-server-side-encryption-customer-algorithm` header.
531
635
  # @option options [String] :sse_customer_key_md5
532
636
  # Specifies the 128-bit MD5 digest of the encryption key according to
533
637
  # RFC 1321. Amazon S3 uses this header for a message integrity check to
@@ -547,6 +651,10 @@ module Aws::S3
547
651
  # between 1 and 10,000. Effectively performs a 'ranged' GET request
548
652
  # for the part specified. Useful for downloading just a part of an
549
653
  # object.
654
+ # @option options [String] :expected_bucket_owner
655
+ # The account ID of the expected bucket owner. If the bucket is owned by
656
+ # a different account, the request will fail with an HTTP `403 (Access
657
+ # Denied)` error.
550
658
  # @return [Types::GetObjectOutput]
551
659
  def get(options = {}, &block)
552
660
  options = options.merge(
@@ -575,22 +683,26 @@ module Aws::S3
575
683
  # "MetadataKey" => "MetadataValue",
576
684
  # },
577
685
  # server_side_encryption: "AES256", # accepts AES256, aws:kms
578
- # storage_class: "STANDARD", # accepts STANDARD, REDUCED_REDUNDANCY, STANDARD_IA, ONEZONE_IA, INTELLIGENT_TIERING, GLACIER, DEEP_ARCHIVE
686
+ # storage_class: "STANDARD", # accepts STANDARD, REDUCED_REDUNDANCY, STANDARD_IA, ONEZONE_IA, INTELLIGENT_TIERING, GLACIER, DEEP_ARCHIVE, OUTPOSTS
579
687
  # website_redirect_location: "WebsiteRedirectLocation",
580
688
  # sse_customer_algorithm: "SSECustomerAlgorithm",
581
689
  # sse_customer_key: "SSECustomerKey",
582
690
  # sse_customer_key_md5: "SSECustomerKeyMD5",
583
691
  # ssekms_key_id: "SSEKMSKeyId",
584
692
  # ssekms_encryption_context: "SSEKMSEncryptionContext",
693
+ # bucket_key_enabled: false,
585
694
  # request_payer: "requester", # accepts requester
586
695
  # tagging: "TaggingHeader",
587
696
  # object_lock_mode: "GOVERNANCE", # accepts GOVERNANCE, COMPLIANCE
588
697
  # object_lock_retain_until_date: Time.now,
589
698
  # object_lock_legal_hold_status: "ON", # accepts ON, OFF
699
+ # expected_bucket_owner: "AccountId",
590
700
  # })
591
701
  # @param [Hash] options ({})
592
702
  # @option options [String] :acl
593
703
  # The canned ACL to apply to the object.
704
+ #
705
+ # This action is not supported by Amazon S3 on Outposts.
594
706
  # @option options [String] :cache_control
595
707
  # Specifies caching behavior along the request/reply chain.
596
708
  # @option options [String] :content_disposition
@@ -608,19 +720,36 @@ module Aws::S3
608
720
  # @option options [String] :grant_full_control
609
721
  # Gives the grantee READ, READ\_ACP, and WRITE\_ACP permissions on the
610
722
  # object.
723
+ #
724
+ # This action is not supported by Amazon S3 on Outposts.
611
725
  # @option options [String] :grant_read
612
726
  # Allows grantee to read the object data and its metadata.
727
+ #
728
+ # This action is not supported by Amazon S3 on Outposts.
613
729
  # @option options [String] :grant_read_acp
614
730
  # Allows grantee to read the object ACL.
731
+ #
732
+ # This action is not supported by Amazon S3 on Outposts.
615
733
  # @option options [String] :grant_write_acp
616
734
  # Allows grantee to write the ACL for the applicable object.
735
+ #
736
+ # This action is not supported by Amazon S3 on Outposts.
617
737
  # @option options [Hash<String,String>] :metadata
618
738
  # A map of metadata to store with the object in S3.
619
739
  # @option options [String] :server_side_encryption
620
740
  # The server-side encryption algorithm used when storing this object in
621
741
  # Amazon S3 (for example, AES256, aws:kms).
622
742
  # @option options [String] :storage_class
623
- # The type of storage to use for the object. Defaults to 'STANDARD'.
743
+ # By default, Amazon S3 uses the STANDARD Storage Class to store newly
744
+ # created objects. The STANDARD storage class provides high durability
745
+ # and high availability. Depending on performance needs, you can specify
746
+ # a different Storage Class. Amazon S3 on Outposts only uses the
747
+ # OUTPOSTS Storage Class. For more information, see [Storage Classes][1]
748
+ # in the *Amazon S3 Service Developer Guide*.
749
+ #
750
+ #
751
+ #
752
+ # [1]: https://docs.aws.amazon.com/AmazonS3/latest/dev/storage-class-intro.html
624
753
  # @option options [String] :website_redirect_location
625
754
  # If the bucket is configured as a website, redirects requests for this
626
755
  # object to another object in the same bucket or to an external URL.
@@ -633,7 +762,7 @@ module Aws::S3
633
762
  # encrypting data. This value is used to store the object and then it is
634
763
  # discarded; Amazon S3 does not store the encryption key. The key must
635
764
  # be appropriate for use with the algorithm specified in the
636
- # `x-amz-server-side​-encryption​-customer-algorithm` header.
765
+ # `x-amz-server-side-encryption-customer-algorithm` header.
637
766
  # @option options [String] :sse_customer_key_md5
638
767
  # Specifies the 128-bit MD5 digest of the encryption key according to
639
768
  # RFC 1321. Amazon S3 uses this header for a message integrity check to
@@ -648,11 +777,19 @@ module Aws::S3
648
777
  #
649
778
  #
650
779
  #
651
- # [1]: https://docs.aws.amazon.com/http:/docs.aws.amazon.com/AmazonS3/latest/dev/UsingAWSSDK.html#specify-signature-version
780
+ # [1]: https://docs.aws.amazon.com/AmazonS3/latest/dev/UsingAWSSDK.html#specify-signature-version
652
781
  # @option options [String] :ssekms_encryption_context
653
782
  # Specifies the AWS KMS Encryption Context to use for object encryption.
654
783
  # The value of this header is a base64-encoded UTF-8 string holding JSON
655
784
  # with the encryption context key-value pairs.
785
+ # @option options [Boolean] :bucket_key_enabled
786
+ # Specifies whether Amazon S3 should use an S3 Bucket Key for object
787
+ # encryption with server-side encryption using AWS KMS (SSE-KMS).
788
+ # Setting this header to `true` causes Amazon S3 to use an S3 Bucket Key
789
+ # for object encryption with SSE-KMS.
790
+ #
791
+ # Specifying this header with an object action doesn’t affect
792
+ # bucket-level settings for S3 Bucket Key.
656
793
  # @option options [String] :request_payer
657
794
  # Confirms that the requester knows that they will be charged for the
658
795
  # request. Bucket owners need not specify this parameter in their
@@ -674,6 +811,10 @@ module Aws::S3
674
811
  # @option options [String] :object_lock_legal_hold_status
675
812
  # Specifies whether you want to apply a Legal Hold to the uploaded
676
813
  # object.
814
+ # @option options [String] :expected_bucket_owner
815
+ # The account ID of the expected bucket owner. If the bucket is owned by
816
+ # a different account, the request will fail with an HTTP `403 (Access
817
+ # Denied)` error.
677
818
  # @return [MultipartUpload]
678
819
  def initiate_multipart_upload(options = {})
679
820
  options = options.merge(
@@ -710,28 +851,32 @@ module Aws::S3
710
851
  # "MetadataKey" => "MetadataValue",
711
852
  # },
712
853
  # server_side_encryption: "AES256", # accepts AES256, aws:kms
713
- # storage_class: "STANDARD", # accepts STANDARD, REDUCED_REDUNDANCY, STANDARD_IA, ONEZONE_IA, INTELLIGENT_TIERING, GLACIER, DEEP_ARCHIVE
854
+ # storage_class: "STANDARD", # accepts STANDARD, REDUCED_REDUNDANCY, STANDARD_IA, ONEZONE_IA, INTELLIGENT_TIERING, GLACIER, DEEP_ARCHIVE, OUTPOSTS
714
855
  # website_redirect_location: "WebsiteRedirectLocation",
715
856
  # sse_customer_algorithm: "SSECustomerAlgorithm",
716
857
  # sse_customer_key: "SSECustomerKey",
717
858
  # sse_customer_key_md5: "SSECustomerKeyMD5",
718
859
  # ssekms_key_id: "SSEKMSKeyId",
719
860
  # ssekms_encryption_context: "SSEKMSEncryptionContext",
861
+ # bucket_key_enabled: false,
720
862
  # request_payer: "requester", # accepts requester
721
863
  # tagging: "TaggingHeader",
722
864
  # object_lock_mode: "GOVERNANCE", # accepts GOVERNANCE, COMPLIANCE
723
865
  # object_lock_retain_until_date: Time.now,
724
866
  # object_lock_legal_hold_status: "ON", # accepts ON, OFF
867
+ # expected_bucket_owner: "AccountId",
725
868
  # })
726
869
  # @param [Hash] options ({})
727
870
  # @option options [String] :acl
728
871
  # The canned ACL to apply to the object. For more information, see
729
872
  # [Canned ACL][1].
730
873
  #
874
+ # This action is not supported by Amazon S3 on Outposts.
875
+ #
731
876
  #
732
877
  #
733
878
  # [1]: https://docs.aws.amazon.com/AmazonS3/latest/dev/acl-overview.html#CannedACL
734
- # @option options [String, IO] :body
879
+ # @option options [String, StringIO, File] :body
735
880
  # Object data.
736
881
  # @option options [String] :cache_control
737
882
  # Can be used to specify caching behavior along the request/reply chain.
@@ -799,20 +944,36 @@ module Aws::S3
799
944
  # @option options [String] :grant_full_control
800
945
  # Gives the grantee READ, READ\_ACP, and WRITE\_ACP permissions on the
801
946
  # object.
947
+ #
948
+ # This action is not supported by Amazon S3 on Outposts.
802
949
  # @option options [String] :grant_read
803
950
  # Allows grantee to read the object data and its metadata.
951
+ #
952
+ # This action is not supported by Amazon S3 on Outposts.
804
953
  # @option options [String] :grant_read_acp
805
954
  # Allows grantee to read the object ACL.
955
+ #
956
+ # This action is not supported by Amazon S3 on Outposts.
806
957
  # @option options [String] :grant_write_acp
807
958
  # Allows grantee to write the ACL for the applicable object.
959
+ #
960
+ # This action is not supported by Amazon S3 on Outposts.
808
961
  # @option options [Hash<String,String>] :metadata
809
962
  # A map of metadata to store with the object in S3.
810
963
  # @option options [String] :server_side_encryption
811
964
  # The server-side encryption algorithm used when storing this object in
812
965
  # Amazon S3 (for example, AES256, aws:kms).
813
966
  # @option options [String] :storage_class
814
- # If you don't specify, S3 Standard is the default storage class.
815
- # Amazon S3 supports other storage classes.
967
+ # By default, Amazon S3 uses the STANDARD Storage Class to store newly
968
+ # created objects. The STANDARD storage class provides high durability
969
+ # and high availability. Depending on performance needs, you can specify
970
+ # a different Storage Class. Amazon S3 on Outposts only uses the
971
+ # OUTPOSTS Storage Class. For more information, see [Storage Classes][1]
972
+ # in the *Amazon S3 Service Developer Guide*.
973
+ #
974
+ #
975
+ #
976
+ # [1]: https://docs.aws.amazon.com/AmazonS3/latest/dev/storage-class-intro.html
816
977
  # @option options [String] :website_redirect_location
817
978
  # If the bucket is configured as a website, redirects requests for this
818
979
  # object to another object in the same bucket or to an external URL.
@@ -846,7 +1007,7 @@ module Aws::S3
846
1007
  # encrypting data. This value is used to store the object and then it is
847
1008
  # discarded; Amazon S3 does not store the encryption key. The key must
848
1009
  # be appropriate for use with the algorithm specified in the
849
- # `x-amz-server-side​-encryption​-customer-algorithm` header.
1010
+ # `x-amz-server-side-encryption-customer-algorithm` header.
850
1011
  # @option options [String] :sse_customer_key_md5
851
1012
  # Specifies the 128-bit MD5 digest of the encryption key according to
852
1013
  # RFC 1321. Amazon S3 uses this header for a message integrity check to
@@ -867,6 +1028,14 @@ module Aws::S3
867
1028
  # Specifies the AWS KMS Encryption Context to use for object encryption.
868
1029
  # The value of this header is a base64-encoded UTF-8 string holding JSON
869
1030
  # with the encryption context key-value pairs.
1031
+ # @option options [Boolean] :bucket_key_enabled
1032
+ # Specifies whether Amazon S3 should use an S3 Bucket Key for object
1033
+ # encryption with server-side encryption using AWS KMS (SSE-KMS).
1034
+ # Setting this header to `true` causes Amazon S3 to use an S3 Bucket Key
1035
+ # for object encryption with SSE-KMS.
1036
+ #
1037
+ # Specifying this header with a PUT action doesn’t affect bucket-level
1038
+ # settings for S3 Bucket Key.
870
1039
  # @option options [String] :request_payer
871
1040
  # Confirms that the requester knows that they will be charged for the
872
1041
  # request. Bucket owners need not specify this parameter in their
@@ -891,6 +1060,10 @@ module Aws::S3
891
1060
  #
892
1061
  #
893
1062
  # [1]: https://docs.aws.amazon.com/AmazonS3/latest/dev/object-lock.html
1063
+ # @option options [String] :expected_bucket_owner
1064
+ # The account ID of the expected bucket owner. If the bucket is owned by
1065
+ # a different account, the request will fail with an HTTP `403 (Access
1066
+ # Denied)` error.
894
1067
  # @return [Types::PutObjectOutput]
895
1068
  def put(options = {})
896
1069
  options = options.merge(
@@ -982,11 +1155,12 @@ module Aws::S3
982
1155
  # value: "MetadataValue",
983
1156
  # },
984
1157
  # ],
985
- # storage_class: "STANDARD", # accepts STANDARD, REDUCED_REDUNDANCY, STANDARD_IA, ONEZONE_IA, INTELLIGENT_TIERING, GLACIER, DEEP_ARCHIVE
1158
+ # storage_class: "STANDARD", # accepts STANDARD, REDUCED_REDUNDANCY, STANDARD_IA, ONEZONE_IA, INTELLIGENT_TIERING, GLACIER, DEEP_ARCHIVE, OUTPOSTS
986
1159
  # },
987
1160
  # },
988
1161
  # },
989
1162
  # request_payer: "requester", # accepts requester
1163
+ # expected_bucket_owner: "AccountId",
990
1164
  # })
991
1165
  # @param [Hash] options ({})
992
1166
  # @option options [String] :version_id
@@ -1003,6 +1177,10 @@ module Aws::S3
1003
1177
  #
1004
1178
  #
1005
1179
  # [1]: https://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html
1180
+ # @option options [String] :expected_bucket_owner
1181
+ # The account ID of the expected bucket owner. If the bucket is owned by
1182
+ # a different account, the request will fail with an HTTP `403 (Access
1183
+ # Denied)` error.
1006
1184
  # @return [Types::RestoreObjectOutput]
1007
1185
  def restore_object(options = {})
1008
1186
  options = options.merge(
@@ -1134,6 +1312,7 @@ module Aws::S3
1134
1312
  # mfa: "MFA",
1135
1313
  # request_payer: "requester", # accepts requester
1136
1314
  # bypass_governance_retention: false,
1315
+ # expected_bucket_owner: "AccountId",
1137
1316
  # })
1138
1317
  # @param options ({})
1139
1318
  # @option options [String] :mfa
@@ -1155,6 +1334,10 @@ module Aws::S3
1155
1334
  # Specifies whether you want to delete this object even if it has a
1156
1335
  # Governance-type Object Lock in place. You must have sufficient
1157
1336
  # permissions to perform this operation.
1337
+ # @option options [String] :expected_bucket_owner
1338
+ # The account ID of the expected bucket owner. If the bucket is owned by
1339
+ # a different account, the request will fail with an HTTP `403 (Access
1340
+ # Denied)` error.
1158
1341
  # @return [void]
1159
1342
  def batch_delete!(options = {})
1160
1343
  batch_enum.each do |batch|