aws-sdk-s3 1.68.1 → 1.83.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (94) hide show
  1. checksums.yaml +4 -4
  2. data/lib/aws-sdk-s3.rb +5 -2
  3. data/lib/aws-sdk-s3/arn/access_point_arn.rb +62 -0
  4. data/lib/aws-sdk-s3/arn/outpost_access_point_arn.rb +71 -0
  5. data/lib/aws-sdk-s3/bucket.rb +58 -7
  6. data/lib/aws-sdk-s3/bucket_acl.rb +7 -0
  7. data/lib/aws-sdk-s3/bucket_cors.rb +14 -1
  8. data/lib/aws-sdk-s3/bucket_lifecycle.rb +14 -1
  9. data/lib/aws-sdk-s3/bucket_lifecycle_configuration.rb +14 -1
  10. data/lib/aws-sdk-s3/bucket_logging.rb +7 -0
  11. data/lib/aws-sdk-s3/bucket_notification.rb +7 -0
  12. data/lib/aws-sdk-s3/bucket_policy.rb +14 -1
  13. data/lib/aws-sdk-s3/bucket_region_cache.rb +2 -0
  14. data/lib/aws-sdk-s3/bucket_request_payment.rb +7 -0
  15. data/lib/aws-sdk-s3/bucket_tagging.rb +14 -1
  16. data/lib/aws-sdk-s3/bucket_versioning.rb +17 -0
  17. data/lib/aws-sdk-s3/bucket_website.rb +14 -1
  18. data/lib/aws-sdk-s3/client.rb +2133 -678
  19. data/lib/aws-sdk-s3/client_api.rb +150 -0
  20. data/lib/aws-sdk-s3/customizations.rb +3 -0
  21. data/lib/aws-sdk-s3/customizations/bucket.rb +9 -4
  22. data/lib/aws-sdk-s3/customizations/multipart_upload.rb +2 -0
  23. data/lib/aws-sdk-s3/customizations/object.rb +14 -1
  24. data/lib/aws-sdk-s3/customizations/object_summary.rb +2 -0
  25. data/lib/aws-sdk-s3/customizations/types/list_object_versions_output.rb +2 -0
  26. data/lib/aws-sdk-s3/encryption.rb +4 -0
  27. data/lib/aws-sdk-s3/encryption/client.rb +13 -0
  28. data/lib/aws-sdk-s3/encryption/decrypt_handler.rb +72 -26
  29. data/lib/aws-sdk-s3/encryption/default_cipher_provider.rb +43 -5
  30. data/lib/aws-sdk-s3/encryption/default_key_provider.rb +2 -0
  31. data/lib/aws-sdk-s3/encryption/encrypt_handler.rb +13 -2
  32. data/lib/aws-sdk-s3/encryption/errors.rb +2 -0
  33. data/lib/aws-sdk-s3/encryption/io_auth_decrypter.rb +2 -0
  34. data/lib/aws-sdk-s3/encryption/io_decrypter.rb +11 -3
  35. data/lib/aws-sdk-s3/encryption/io_encrypter.rb +2 -0
  36. data/lib/aws-sdk-s3/encryption/key_provider.rb +2 -0
  37. data/lib/aws-sdk-s3/encryption/kms_cipher_provider.rb +34 -3
  38. data/lib/aws-sdk-s3/encryption/materials.rb +2 -0
  39. data/lib/aws-sdk-s3/encryption/utils.rb +25 -0
  40. data/lib/aws-sdk-s3/encryptionV2/client.rb +566 -0
  41. data/lib/aws-sdk-s3/encryptionV2/decrypt_handler.rb +226 -0
  42. data/lib/aws-sdk-s3/encryptionV2/default_cipher_provider.rb +170 -0
  43. data/lib/aws-sdk-s3/encryptionV2/default_key_provider.rb +40 -0
  44. data/lib/aws-sdk-s3/encryptionV2/encrypt_handler.rb +69 -0
  45. data/lib/aws-sdk-s3/encryptionV2/errors.rb +37 -0
  46. data/lib/aws-sdk-s3/encryptionV2/io_auth_decrypter.rb +58 -0
  47. data/lib/aws-sdk-s3/encryptionV2/io_decrypter.rb +37 -0
  48. data/lib/aws-sdk-s3/encryptionV2/io_encrypter.rb +73 -0
  49. data/lib/aws-sdk-s3/encryptionV2/key_provider.rb +31 -0
  50. data/lib/aws-sdk-s3/encryptionV2/kms_cipher_provider.rb +169 -0
  51. data/lib/aws-sdk-s3/encryptionV2/materials.rb +60 -0
  52. data/lib/aws-sdk-s3/encryptionV2/utils.rb +103 -0
  53. data/lib/aws-sdk-s3/encryption_v2.rb +23 -0
  54. data/lib/aws-sdk-s3/errors.rb +2 -0
  55. data/lib/aws-sdk-s3/event_streams.rb +2 -0
  56. data/lib/aws-sdk-s3/file_downloader.rb +2 -0
  57. data/lib/aws-sdk-s3/file_part.rb +2 -0
  58. data/lib/aws-sdk-s3/file_uploader.rb +13 -0
  59. data/lib/aws-sdk-s3/legacy_signer.rb +2 -0
  60. data/lib/aws-sdk-s3/multipart_file_uploader.rb +39 -2
  61. data/lib/aws-sdk-s3/multipart_stream_uploader.rb +2 -0
  62. data/lib/aws-sdk-s3/multipart_upload.rb +17 -0
  63. data/lib/aws-sdk-s3/multipart_upload_error.rb +2 -0
  64. data/lib/aws-sdk-s3/multipart_upload_part.rb +66 -7
  65. data/lib/aws-sdk-s3/object.rb +160 -19
  66. data/lib/aws-sdk-s3/object_acl.rb +15 -0
  67. data/lib/aws-sdk-s3/object_copier.rb +2 -0
  68. data/lib/aws-sdk-s3/object_multipart_copier.rb +2 -0
  69. data/lib/aws-sdk-s3/object_summary.rb +173 -17
  70. data/lib/aws-sdk-s3/object_version.rb +29 -3
  71. data/lib/aws-sdk-s3/plugins/accelerate.rb +29 -38
  72. data/lib/aws-sdk-s3/plugins/arn.rb +187 -0
  73. data/lib/aws-sdk-s3/plugins/bucket_dns.rb +2 -2
  74. data/lib/aws-sdk-s3/plugins/bucket_name_restrictions.rb +3 -1
  75. data/lib/aws-sdk-s3/plugins/dualstack.rb +5 -1
  76. data/lib/aws-sdk-s3/plugins/expect_100_continue.rb +2 -0
  77. data/lib/aws-sdk-s3/plugins/get_bucket_location_fix.rb +2 -0
  78. data/lib/aws-sdk-s3/plugins/http_200_errors.rb +4 -1
  79. data/lib/aws-sdk-s3/plugins/iad_regional_endpoint.rb +2 -0
  80. data/lib/aws-sdk-s3/plugins/location_constraint.rb +2 -0
  81. data/lib/aws-sdk-s3/plugins/md5s.rb +2 -0
  82. data/lib/aws-sdk-s3/plugins/redirects.rb +2 -0
  83. data/lib/aws-sdk-s3/plugins/s3_host_id.rb +2 -0
  84. data/lib/aws-sdk-s3/plugins/s3_signer.rb +31 -7
  85. data/lib/aws-sdk-s3/plugins/sse_cpk.rb +3 -1
  86. data/lib/aws-sdk-s3/plugins/streaming_retry.rb +118 -0
  87. data/lib/aws-sdk-s3/plugins/url_encoded_keys.rb +2 -0
  88. data/lib/aws-sdk-s3/presigned_post.rb +64 -28
  89. data/lib/aws-sdk-s3/presigner.rb +5 -2
  90. data/lib/aws-sdk-s3/resource.rb +3 -1
  91. data/lib/aws-sdk-s3/types.rb +1881 -222
  92. data/lib/aws-sdk-s3/waiters.rb +2 -0
  93. metadata +22 -5
  94. data/lib/aws-sdk-s3/plugins/bucket_arn.rb +0 -210
@@ -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,3 +1,5 @@
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:
@@ -46,8 +48,24 @@ module Aws::S3
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,7 +295,7 @@ 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",
@@ -292,10 +310,14 @@ module Aws::S3
292
310
  # object_lock_mode: "GOVERNANCE", # accepts GOVERNANCE, COMPLIANCE
293
311
  # object_lock_retain_until_date: Time.now,
294
312
  # object_lock_legal_hold_status: "ON", # accepts ON, OFF
313
+ # expected_bucket_owner: "AccountId",
314
+ # expected_source_bucket_owner: "AccountId",
295
315
  # })
296
316
  # @param [Hash] options ({})
297
317
  # @option options [String] :acl
298
318
  # The canned ACL to apply to the object.
319
+ #
320
+ # This action is not supported by Amazon S3 on Outposts.
299
321
  # @option options [String] :cache_control
300
322
  # Specifies caching behavior along the request/reply chain.
301
323
  # @option options [String] :content_disposition
@@ -309,8 +331,50 @@ module Aws::S3
309
331
  # @option options [String] :content_type
310
332
  # A standard MIME type describing the format of the object data.
311
333
  # @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.
334
+ # Specifies the source object for the copy operation. You specify the
335
+ # value in one of two formats, depending on whether you want to access
336
+ # the source object through an [access point][1]\:
337
+ #
338
+ # * For objects not accessed through an access point, specify the name
339
+ # of the source bucket and the key of the source object, separated by
340
+ # a slash (/). For example, to copy the object `reports/january.pdf`
341
+ # from the bucket `awsexamplebucket`, use
342
+ # `awsexamplebucket/reports/january.pdf`. The value must be URL
343
+ # encoded.
344
+ #
345
+ # * For objects accessed through access points, specify the Amazon
346
+ # Resource Name (ARN) of the object as accessed through the access
347
+ # point, in the format
348
+ # `arn:aws:s3:<Region>:<account-id>:accesspoint/<access-point-name>/object/<key>`.
349
+ # For example, to copy the object `reports/january.pdf` through access
350
+ # point `my-access-point` owned by account `123456789012` in Region
351
+ # `us-west-2`, use the URL encoding of
352
+ # `arn:aws:s3:us-west-2:123456789012:accesspoint/my-access-point/object/reports/january.pdf`.
353
+ # The value must be URL encoded.
354
+ #
355
+ # <note markdown="1"> Amazon S3 supports copy operations using access points only when the
356
+ # source and destination buckets are in the same AWS Region.
357
+ #
358
+ # </note>
359
+ #
360
+ # Alternatively, for objects accessed through Amazon S3 on Outposts,
361
+ # specify the ARN of the object as accessed in the format
362
+ # `arn:aws:s3-outposts:<Region>:<account-id>:outpost/<outpost-id>/object/<key>`.
363
+ # For example, to copy the object `reports/january.pdf` through
364
+ # outpost `my-outpost` owned by account `123456789012` in Region
365
+ # `us-west-2`, use the URL encoding of
366
+ # `arn:aws:s3-outposts:us-west-2:123456789012:outpost/my-outpost/object/reports/january.pdf`.
367
+ # The value must be URL encoded.
368
+ #
369
+ # To copy a specific version of an object, append
370
+ # `?versionId=<version-id>` to the value (for example,
371
+ # `awsexamplebucket/reports/january.pdf?versionId=QUpfdndhfd8438MNFDN93jdnJFkdmqnh893`).
372
+ # If you don't specify a version ID, Amazon S3 copies the latest
373
+ # version of the source object.
374
+ #
375
+ #
376
+ #
377
+ # [1]: https://docs.aws.amazon.com/AmazonS3/latest/dev/access-points.html
314
378
  # @option options [String] :copy_source_if_match
315
379
  # Copies the object if its entity tag (ETag) matches the specified tag.
316
380
  # @option options [Time,DateTime,Date,Integer,String] :copy_source_if_modified_since
@@ -326,12 +390,20 @@ module Aws::S3
326
390
  # @option options [String] :grant_full_control
327
391
  # Gives the grantee READ, READ\_ACP, and WRITE\_ACP permissions on the
328
392
  # object.
393
+ #
394
+ # This action is not supported by Amazon S3 on Outposts.
329
395
  # @option options [String] :grant_read
330
396
  # Allows grantee to read the object data and its metadata.
397
+ #
398
+ # This action is not supported by Amazon S3 on Outposts.
331
399
  # @option options [String] :grant_read_acp
332
400
  # Allows grantee to read the object ACL.
401
+ #
402
+ # This action is not supported by Amazon S3 on Outposts.
333
403
  # @option options [String] :grant_write_acp
334
404
  # Allows grantee to write the ACL for the applicable object.
405
+ #
406
+ # This action is not supported by Amazon S3 on Outposts.
335
407
  # @option options [Hash<String,String>] :metadata
336
408
  # A map of metadata to store with the object in S3.
337
409
  # @option options [String] :metadata_directive
@@ -344,7 +416,16 @@ module Aws::S3
344
416
  # The server-side encryption algorithm used when storing this object in
345
417
  # Amazon S3 (for example, AES256, aws:kms).
346
418
  # @option options [String] :storage_class
347
- # The type of storage to use for the object. Defaults to 'STANDARD'.
419
+ # By default, Amazon S3 uses the STANDARD Storage Class to store newly
420
+ # created objects. The STANDARD storage class provides high durability
421
+ # and high availability. Depending on performance needs, you can specify
422
+ # a different Storage Class. Amazon S3 on Outposts only uses the
423
+ # OUTPOSTS Storage Class. For more information, see [Storage Classes][1]
424
+ # in the *Amazon S3 Service Developer Guide*.
425
+ #
426
+ #
427
+ #
428
+ # [1]: https://docs.aws.amazon.com/AmazonS3/latest/dev/storage-class-intro.html
348
429
  # @option options [String] :website_redirect_location
349
430
  # If the bucket is configured as a website, redirects requests for this
350
431
  # object to another object in the same bucket or to an external URL.
@@ -357,7 +438,7 @@ module Aws::S3
357
438
  # encrypting data. This value is used to store the object and then it is
358
439
  # discarded; Amazon S3 does not store the encryption key. The key must
359
440
  # be appropriate for use with the algorithm specified in the
360
- # `x-amz-server-side​-encryption​-customer-algorithm` header.
441
+ # `x-amz-server-side-encryption-customer-algorithm` header.
361
442
  # @option options [String] :sse_customer_key_md5
362
443
  # Specifies the 128-bit MD5 digest of the encryption key according to
363
444
  # RFC 1321. Amazon S3 uses this header for a message integrity check to
@@ -409,6 +490,14 @@ module Aws::S3
409
490
  # expire.
410
491
  # @option options [String] :object_lock_legal_hold_status
411
492
  # Specifies whether you want to apply a Legal Hold to the copied object.
493
+ # @option options [String] :expected_bucket_owner
494
+ # The account id of the expected destination bucket owner. If the
495
+ # destination bucket is owned by a different account, the request will
496
+ # fail with an HTTP `403 (Access Denied)` error.
497
+ # @option options [String] :expected_source_bucket_owner
498
+ # The account id of the expected source bucket owner. If the source
499
+ # bucket is owned by a different account, the request will fail with an
500
+ # HTTP `403 (Access Denied)` error.
412
501
  # @return [Types::CopyObjectOutput]
413
502
  def copy_from(options = {})
414
503
  options = options.merge(
@@ -426,6 +515,7 @@ module Aws::S3
426
515
  # version_id: "ObjectVersionId",
427
516
  # request_payer: "requester", # accepts requester
428
517
  # bypass_governance_retention: false,
518
+ # expected_bucket_owner: "AccountId",
429
519
  # })
430
520
  # @param [Hash] options ({})
431
521
  # @option options [String] :mfa
@@ -448,6 +538,10 @@ module Aws::S3
448
538
  # @option options [Boolean] :bypass_governance_retention
449
539
  # Indicates whether S3 Object Lock should bypass Governance-mode
450
540
  # restrictions to process this operation.
541
+ # @option options [String] :expected_bucket_owner
542
+ # The account id of the expected bucket owner. If the bucket is owned by
543
+ # a different account, the request will fail with an HTTP `403 (Access
544
+ # Denied)` error.
451
545
  # @return [Types::DeleteObjectOutput]
452
546
  def delete(options = {})
453
547
  options = options.merge(
@@ -478,6 +572,7 @@ module Aws::S3
478
572
  # sse_customer_key_md5: "SSECustomerKeyMD5",
479
573
  # request_payer: "requester", # accepts requester
480
574
  # part_number: 1,
575
+ # expected_bucket_owner: "AccountId",
481
576
  # })
482
577
  # @param [Hash] options ({})
483
578
  # @option options [String] :if_match
@@ -527,7 +622,7 @@ module Aws::S3
527
622
  # encrypting data. This value is used to store the object and then it is
528
623
  # discarded; Amazon S3 does not store the encryption key. The key must
529
624
  # be appropriate for use with the algorithm specified in the
530
- # `x-amz-server-side​-encryption​-customer-algorithm` header.
625
+ # `x-amz-server-side-encryption-customer-algorithm` header.
531
626
  # @option options [String] :sse_customer_key_md5
532
627
  # Specifies the 128-bit MD5 digest of the encryption key according to
533
628
  # RFC 1321. Amazon S3 uses this header for a message integrity check to
@@ -547,6 +642,10 @@ module Aws::S3
547
642
  # between 1 and 10,000. Effectively performs a 'ranged' GET request
548
643
  # for the part specified. Useful for downloading just a part of an
549
644
  # object.
645
+ # @option options [String] :expected_bucket_owner
646
+ # The account id of the expected bucket owner. If the bucket is owned by
647
+ # a different account, the request will fail with an HTTP `403 (Access
648
+ # Denied)` error.
550
649
  # @return [Types::GetObjectOutput]
551
650
  def get(options = {}, &block)
552
651
  options = options.merge(
@@ -575,7 +674,7 @@ module Aws::S3
575
674
  # "MetadataKey" => "MetadataValue",
576
675
  # },
577
676
  # 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
677
+ # storage_class: "STANDARD", # accepts STANDARD, REDUCED_REDUNDANCY, STANDARD_IA, ONEZONE_IA, INTELLIGENT_TIERING, GLACIER, DEEP_ARCHIVE, OUTPOSTS
579
678
  # website_redirect_location: "WebsiteRedirectLocation",
580
679
  # sse_customer_algorithm: "SSECustomerAlgorithm",
581
680
  # sse_customer_key: "SSECustomerKey",
@@ -587,10 +686,13 @@ module Aws::S3
587
686
  # object_lock_mode: "GOVERNANCE", # accepts GOVERNANCE, COMPLIANCE
588
687
  # object_lock_retain_until_date: Time.now,
589
688
  # object_lock_legal_hold_status: "ON", # accepts ON, OFF
689
+ # expected_bucket_owner: "AccountId",
590
690
  # })
591
691
  # @param [Hash] options ({})
592
692
  # @option options [String] :acl
593
693
  # The canned ACL to apply to the object.
694
+ #
695
+ # This action is not supported by Amazon S3 on Outposts.
594
696
  # @option options [String] :cache_control
595
697
  # Specifies caching behavior along the request/reply chain.
596
698
  # @option options [String] :content_disposition
@@ -608,19 +710,36 @@ module Aws::S3
608
710
  # @option options [String] :grant_full_control
609
711
  # Gives the grantee READ, READ\_ACP, and WRITE\_ACP permissions on the
610
712
  # object.
713
+ #
714
+ # This action is not supported by Amazon S3 on Outposts.
611
715
  # @option options [String] :grant_read
612
716
  # Allows grantee to read the object data and its metadata.
717
+ #
718
+ # This action is not supported by Amazon S3 on Outposts.
613
719
  # @option options [String] :grant_read_acp
614
720
  # Allows grantee to read the object ACL.
721
+ #
722
+ # This action is not supported by Amazon S3 on Outposts.
615
723
  # @option options [String] :grant_write_acp
616
724
  # Allows grantee to write the ACL for the applicable object.
725
+ #
726
+ # This action is not supported by Amazon S3 on Outposts.
617
727
  # @option options [Hash<String,String>] :metadata
618
728
  # A map of metadata to store with the object in S3.
619
729
  # @option options [String] :server_side_encryption
620
730
  # The server-side encryption algorithm used when storing this object in
621
731
  # Amazon S3 (for example, AES256, aws:kms).
622
732
  # @option options [String] :storage_class
623
- # The type of storage to use for the object. Defaults to 'STANDARD'.
733
+ # By default, Amazon S3 uses the STANDARD Storage Class to store newly
734
+ # created objects. The STANDARD storage class provides high durability
735
+ # and high availability. Depending on performance needs, you can specify
736
+ # a different Storage Class. Amazon S3 on Outposts only uses the
737
+ # OUTPOSTS Storage Class. For more information, see [Storage Classes][1]
738
+ # in the *Amazon S3 Service Developer Guide*.
739
+ #
740
+ #
741
+ #
742
+ # [1]: https://docs.aws.amazon.com/AmazonS3/latest/dev/storage-class-intro.html
624
743
  # @option options [String] :website_redirect_location
625
744
  # If the bucket is configured as a website, redirects requests for this
626
745
  # object to another object in the same bucket or to an external URL.
@@ -633,7 +752,7 @@ module Aws::S3
633
752
  # encrypting data. This value is used to store the object and then it is
634
753
  # discarded; Amazon S3 does not store the encryption key. The key must
635
754
  # be appropriate for use with the algorithm specified in the
636
- # `x-amz-server-side​-encryption​-customer-algorithm` header.
755
+ # `x-amz-server-side-encryption-customer-algorithm` header.
637
756
  # @option options [String] :sse_customer_key_md5
638
757
  # Specifies the 128-bit MD5 digest of the encryption key according to
639
758
  # RFC 1321. Amazon S3 uses this header for a message integrity check to
@@ -674,6 +793,10 @@ module Aws::S3
674
793
  # @option options [String] :object_lock_legal_hold_status
675
794
  # Specifies whether you want to apply a Legal Hold to the uploaded
676
795
  # object.
796
+ # @option options [String] :expected_bucket_owner
797
+ # The account id of the expected bucket owner. If the bucket is owned by
798
+ # a different account, the request will fail with an HTTP `403 (Access
799
+ # Denied)` error.
677
800
  # @return [MultipartUpload]
678
801
  def initiate_multipart_upload(options = {})
679
802
  options = options.merge(
@@ -710,7 +833,7 @@ module Aws::S3
710
833
  # "MetadataKey" => "MetadataValue",
711
834
  # },
712
835
  # 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
836
+ # storage_class: "STANDARD", # accepts STANDARD, REDUCED_REDUNDANCY, STANDARD_IA, ONEZONE_IA, INTELLIGENT_TIERING, GLACIER, DEEP_ARCHIVE, OUTPOSTS
714
837
  # website_redirect_location: "WebsiteRedirectLocation",
715
838
  # sse_customer_algorithm: "SSECustomerAlgorithm",
716
839
  # sse_customer_key: "SSECustomerKey",
@@ -722,16 +845,19 @@ module Aws::S3
722
845
  # object_lock_mode: "GOVERNANCE", # accepts GOVERNANCE, COMPLIANCE
723
846
  # object_lock_retain_until_date: Time.now,
724
847
  # object_lock_legal_hold_status: "ON", # accepts ON, OFF
848
+ # expected_bucket_owner: "AccountId",
725
849
  # })
726
850
  # @param [Hash] options ({})
727
851
  # @option options [String] :acl
728
852
  # The canned ACL to apply to the object. For more information, see
729
853
  # [Canned ACL][1].
730
854
  #
855
+ # This action is not supported by Amazon S3 on Outposts.
856
+ #
731
857
  #
732
858
  #
733
859
  # [1]: https://docs.aws.amazon.com/AmazonS3/latest/dev/acl-overview.html#CannedACL
734
- # @option options [String, IO] :body
860
+ # @option options [String, StringIO, File] :body
735
861
  # Object data.
736
862
  # @option options [String] :cache_control
737
863
  # Can be used to specify caching behavior along the request/reply chain.
@@ -799,20 +925,36 @@ module Aws::S3
799
925
  # @option options [String] :grant_full_control
800
926
  # Gives the grantee READ, READ\_ACP, and WRITE\_ACP permissions on the
801
927
  # object.
928
+ #
929
+ # This action is not supported by Amazon S3 on Outposts.
802
930
  # @option options [String] :grant_read
803
931
  # Allows grantee to read the object data and its metadata.
932
+ #
933
+ # This action is not supported by Amazon S3 on Outposts.
804
934
  # @option options [String] :grant_read_acp
805
935
  # Allows grantee to read the object ACL.
936
+ #
937
+ # This action is not supported by Amazon S3 on Outposts.
806
938
  # @option options [String] :grant_write_acp
807
939
  # Allows grantee to write the ACL for the applicable object.
940
+ #
941
+ # This action is not supported by Amazon S3 on Outposts.
808
942
  # @option options [Hash<String,String>] :metadata
809
943
  # A map of metadata to store with the object in S3.
810
944
  # @option options [String] :server_side_encryption
811
945
  # The server-side encryption algorithm used when storing this object in
812
946
  # Amazon S3 (for example, AES256, aws:kms).
813
947
  # @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.
948
+ # By default, Amazon S3 uses the STANDARD Storage Class to store newly
949
+ # created objects. The STANDARD storage class provides high durability
950
+ # and high availability. Depending on performance needs, you can specify
951
+ # a different Storage Class. Amazon S3 on Outposts only uses the
952
+ # OUTPOSTS Storage Class. For more information, see [Storage Classes][1]
953
+ # in the *Amazon S3 Service Developer Guide*.
954
+ #
955
+ #
956
+ #
957
+ # [1]: https://docs.aws.amazon.com/AmazonS3/latest/dev/storage-class-intro.html
816
958
  # @option options [String] :website_redirect_location
817
959
  # If the bucket is configured as a website, redirects requests for this
818
960
  # object to another object in the same bucket or to an external URL.
@@ -846,7 +988,7 @@ module Aws::S3
846
988
  # encrypting data. This value is used to store the object and then it is
847
989
  # discarded; Amazon S3 does not store the encryption key. The key must
848
990
  # be appropriate for use with the algorithm specified in the
849
- # `x-amz-server-side​-encryption​-customer-algorithm` header.
991
+ # `x-amz-server-side-encryption-customer-algorithm` header.
850
992
  # @option options [String] :sse_customer_key_md5
851
993
  # Specifies the 128-bit MD5 digest of the encryption key according to
852
994
  # RFC 1321. Amazon S3 uses this header for a message integrity check to
@@ -891,6 +1033,10 @@ module Aws::S3
891
1033
  #
892
1034
  #
893
1035
  # [1]: https://docs.aws.amazon.com/AmazonS3/latest/dev/object-lock.html
1036
+ # @option options [String] :expected_bucket_owner
1037
+ # The account id of the expected bucket owner. If the bucket is owned by
1038
+ # a different account, the request will fail with an HTTP `403 (Access
1039
+ # Denied)` error.
894
1040
  # @return [Types::PutObjectOutput]
895
1041
  def put(options = {})
896
1042
  options = options.merge(
@@ -982,11 +1128,12 @@ module Aws::S3
982
1128
  # value: "MetadataValue",
983
1129
  # },
984
1130
  # ],
985
- # storage_class: "STANDARD", # accepts STANDARD, REDUCED_REDUNDANCY, STANDARD_IA, ONEZONE_IA, INTELLIGENT_TIERING, GLACIER, DEEP_ARCHIVE
1131
+ # storage_class: "STANDARD", # accepts STANDARD, REDUCED_REDUNDANCY, STANDARD_IA, ONEZONE_IA, INTELLIGENT_TIERING, GLACIER, DEEP_ARCHIVE, OUTPOSTS
986
1132
  # },
987
1133
  # },
988
1134
  # },
989
1135
  # request_payer: "requester", # accepts requester
1136
+ # expected_bucket_owner: "AccountId",
990
1137
  # })
991
1138
  # @param [Hash] options ({})
992
1139
  # @option options [String] :version_id
@@ -1003,6 +1150,10 @@ module Aws::S3
1003
1150
  #
1004
1151
  #
1005
1152
  # [1]: https://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html
1153
+ # @option options [String] :expected_bucket_owner
1154
+ # The account id of the expected bucket owner. If the bucket is owned by
1155
+ # a different account, the request will fail with an HTTP `403 (Access
1156
+ # Denied)` error.
1006
1157
  # @return [Types::RestoreObjectOutput]
1007
1158
  def restore_object(options = {})
1008
1159
  options = options.merge(
@@ -1134,6 +1285,7 @@ module Aws::S3
1134
1285
  # mfa: "MFA",
1135
1286
  # request_payer: "requester", # accepts requester
1136
1287
  # bypass_governance_retention: false,
1288
+ # expected_bucket_owner: "AccountId",
1137
1289
  # })
1138
1290
  # @param options ({})
1139
1291
  # @option options [String] :mfa
@@ -1155,6 +1307,10 @@ module Aws::S3
1155
1307
  # Specifies whether you want to delete this object even if it has a
1156
1308
  # Governance-type Object Lock in place. You must have sufficient
1157
1309
  # permissions to perform this operation.
1310
+ # @option options [String] :expected_bucket_owner
1311
+ # The account id of the expected bucket owner. If the bucket is owned by
1312
+ # a different account, the request will fail with an HTTP `403 (Access
1313
+ # Denied)` error.
1158
1314
  # @return [void]
1159
1315
  def batch_delete!(options = {})
1160
1316
  batch_enum.each do |batch|
@@ -1,3 +1,5 @@
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:
@@ -232,6 +234,7 @@ module Aws::S3
232
234
  # mfa: "MFA",
233
235
  # request_payer: "requester", # accepts requester
234
236
  # bypass_governance_retention: false,
237
+ # expected_bucket_owner: "AccountId",
235
238
  # })
236
239
  # @param [Hash] options ({})
237
240
  # @option options [String] :mfa
@@ -252,6 +255,10 @@ module Aws::S3
252
255
  # @option options [Boolean] :bypass_governance_retention
253
256
  # Indicates whether S3 Object Lock should bypass Governance-mode
254
257
  # restrictions to process this operation.
258
+ # @option options [String] :expected_bucket_owner
259
+ # The account id of the expected bucket owner. If the bucket is owned by
260
+ # a different account, the request will fail with an HTTP `403 (Access
261
+ # Denied)` error.
255
262
  # @return [Types::DeleteObjectOutput]
256
263
  def delete(options = {})
257
264
  options = options.merge(
@@ -282,6 +289,7 @@ module Aws::S3
282
289
  # sse_customer_key_md5: "SSECustomerKeyMD5",
283
290
  # request_payer: "requester", # accepts requester
284
291
  # part_number: 1,
292
+ # expected_bucket_owner: "AccountId",
285
293
  # })
286
294
  # @param [Hash] options ({})
287
295
  # @option options [String] :if_match
@@ -329,7 +337,7 @@ module Aws::S3
329
337
  # encrypting data. This value is used to store the object and then it is
330
338
  # discarded; Amazon S3 does not store the encryption key. The key must
331
339
  # be appropriate for use with the algorithm specified in the
332
- # `x-amz-server-side​-encryption​-customer-algorithm` header.
340
+ # `x-amz-server-side-encryption-customer-algorithm` header.
333
341
  # @option options [String] :sse_customer_key_md5
334
342
  # Specifies the 128-bit MD5 digest of the encryption key according to
335
343
  # RFC 1321. Amazon S3 uses this header for a message integrity check to
@@ -349,6 +357,10 @@ module Aws::S3
349
357
  # between 1 and 10,000. Effectively performs a 'ranged' GET request
350
358
  # for the part specified. Useful for downloading just a part of an
351
359
  # object.
360
+ # @option options [String] :expected_bucket_owner
361
+ # The account id of the expected bucket owner. If the bucket is owned by
362
+ # a different account, the request will fail with an HTTP `403 (Access
363
+ # Denied)` error.
352
364
  # @return [Types::GetObjectOutput]
353
365
  def get(options = {}, &block)
354
366
  options = options.merge(
@@ -373,6 +385,7 @@ module Aws::S3
373
385
  # sse_customer_key_md5: "SSECustomerKeyMD5",
374
386
  # request_payer: "requester", # accepts requester
375
387
  # part_number: 1,
388
+ # expected_bucket_owner: "AccountId",
376
389
  # })
377
390
  # @param [Hash] options ({})
378
391
  # @option options [String] :if_match
@@ -390,12 +403,16 @@ module Aws::S3
390
403
  # @option options [String] :range
391
404
  # Downloads the specified range bytes of an object. For more information
392
405
  # about the HTTP Range header, see
393
- # [http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.35]().
406
+ # [http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.35][1].
394
407
  #
395
408
  # <note markdown="1"> Amazon S3 doesn't support retrieving multiple ranges of data per
396
409
  # `GET` request.
397
410
  #
398
411
  # </note>
412
+ #
413
+ #
414
+ #
415
+ # [1]: http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.35
399
416
  # @option options [String] :sse_customer_algorithm
400
417
  # Specifies the algorithm to use to when encrypting the object (for
401
418
  # example, AES256).
@@ -404,7 +421,7 @@ module Aws::S3
404
421
  # encrypting data. This value is used to store the object and then it is
405
422
  # discarded; Amazon S3 does not store the encryption key. The key must
406
423
  # be appropriate for use with the algorithm specified in the
407
- # `x-amz-server-side​-encryption​-customer-algorithm` header.
424
+ # `x-amz-server-side-encryption-customer-algorithm` header.
408
425
  # @option options [String] :sse_customer_key_md5
409
426
  # Specifies the 128-bit MD5 digest of the encryption key according to
410
427
  # RFC 1321. Amazon S3 uses this header for a message integrity check to
@@ -424,6 +441,10 @@ module Aws::S3
424
441
  # between 1 and 10,000. Effectively performs a 'ranged' HEAD request
425
442
  # for the part specified. Useful querying about the size of the part and
426
443
  # the number of parts in this object.
444
+ # @option options [String] :expected_bucket_owner
445
+ # The account id of the expected bucket owner. If the bucket is owned by
446
+ # a different account, the request will fail with an HTTP `403 (Access
447
+ # Denied)` error.
427
448
  # @return [Types::HeadObjectOutput]
428
449
  def head(options = {})
429
450
  options = options.merge(
@@ -502,6 +523,7 @@ module Aws::S3
502
523
  # mfa: "MFA",
503
524
  # request_payer: "requester", # accepts requester
504
525
  # bypass_governance_retention: false,
526
+ # expected_bucket_owner: "AccountId",
505
527
  # })
506
528
  # @param options ({})
507
529
  # @option options [String] :mfa
@@ -523,6 +545,10 @@ module Aws::S3
523
545
  # Specifies whether you want to delete this object even if it has a
524
546
  # Governance-type Object Lock in place. You must have sufficient
525
547
  # permissions to perform this operation.
548
+ # @option options [String] :expected_bucket_owner
549
+ # The account id of the expected bucket owner. If the bucket is owned by
550
+ # a different account, the request will fail with an HTTP `403 (Access
551
+ # Denied)` error.
526
552
  # @return [void]
527
553
  def batch_delete!(options = {})
528
554
  batch_enum.each do |batch|