aws-sdk-s3 1.61.2 → 1.83.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (94) hide show
  1. checksums.yaml +5 -5
  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 +61 -10
  6. data/lib/aws-sdk-s3/bucket_acl.rb +7 -0
  7. data/lib/aws-sdk-s3/bucket_cors.rb +15 -2
  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 +18 -3
  18. data/lib/aws-sdk-s3/client.rb +2521 -1187
  19. data/lib/aws-sdk-s3/client_api.rb +188 -18
  20. data/lib/aws-sdk-s3/customizations.rb +3 -0
  21. data/lib/aws-sdk-s3/customizations/bucket.rb +11 -4
  22. data/lib/aws-sdk-s3/customizations/multipart_upload.rb +2 -0
  23. data/lib/aws-sdk-s3/customizations/object.rb +23 -5
  24. data/lib/aws-sdk-s3/customizations/object_summary.rb +5 -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 +18 -5
  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 +8 -6
  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 +7 -0
  56. data/lib/aws-sdk-s3/file_downloader.rb +10 -8
  57. data/lib/aws-sdk-s3/file_part.rb +2 -0
  58. data/lib/aws-sdk-s3/file_uploader.rb +14 -1
  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 +3 -1
  62. data/lib/aws-sdk-s3/multipart_upload.rb +18 -1
  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 +174 -23
  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 +185 -20
  70. data/lib/aws-sdk-s3/object_version.rb +44 -4
  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 +3 -4
  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 +11 -3
  79. data/lib/aws-sdk-s3/plugins/iad_regional_endpoint.rb +3 -1
  80. data/lib/aws-sdk-s3/plugins/location_constraint.rb +2 -0
  81. data/lib/aws-sdk-s3/plugins/md5s.rb +26 -25
  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 +68 -32
  89. data/lib/aws-sdk-s3/presigner.rb +102 -34
  90. data/lib/aws-sdk-s3/resource.rb +4 -2
  91. data/lib/aws-sdk-s3/types.rb +2016 -256
  92. data/lib/aws-sdk-s3/waiters.rb +2 -0
  93. metadata +23 -6
  94. data/lib/aws-sdk-s3/plugins/bucket_arn.rb +0 -211
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: 78cdfcf48bd51a03dbd3c59b32b1911ed9a1e1d9
4
- data.tar.gz: c4e92d45fc239636c237fb1acad005ecc9162763
2
+ SHA256:
3
+ metadata.gz: 06754c5841e3a40c510a9702e1f4de282fc40cf6e1b73cabc97ba25b34b167be
4
+ data.tar.gz: 6cad21e9108cdfbb03ff04dab1954dff05bf3bbee8214f86d04ab9484d75b96b
5
5
  SHA512:
6
- metadata.gz: 5d25ecae5a1d929778c7040a5f18572b6f4562d16be623de24eba1e67630370859f44973238d0e206bab3682918ec0b2d9864328511168067179424095418bcd
7
- data.tar.gz: 3438b81790a35d71c15e025620ec8104f803239bb050db632eccf8d288f2360b2f25a0fcbd5a9c77b3372629f12907dee37d17c4d7a11f99c1d43710f0d0ddcd
6
+ metadata.gz: f092576cb7a592bc6c5f5b698fef4052356ac37ed583b0688b72edc33f2e6534ed344d18f9c1ca1aeb7ee9f02f239e7fe937ea9d886153ecfeffaac40cc09caf
7
+ data.tar.gz: 572f55dd0322870bdc2ddc3e169e437ea99a87bfbc7c8277145fc15da186a2b9338a3560aa26c102ee856ae505a1a29774ec2683571cfed2f784a80a295c5a19
@@ -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:
@@ -5,6 +7,7 @@
5
7
  #
6
8
  # WARNING ABOUT GENERATED CODE
7
9
 
10
+
8
11
  require 'aws-sdk-kms'
9
12
  require 'aws-sigv4'
10
13
  require 'aws-sdk-core'
@@ -63,9 +66,9 @@ require_relative 'aws-sdk-s3/event_streams'
63
66
  #
64
67
  # See {Errors} for more information.
65
68
  #
66
- # @service
69
+ # @!group service
67
70
  module Aws::S3
68
71
 
69
- GEM_VERSION = '1.61.2'
72
+ GEM_VERSION = '1.83.1'
70
73
 
71
74
  end
@@ -0,0 +1,62 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Aws
4
+ module S3
5
+ # @api private
6
+ class AccessPointARN < Aws::ARN
7
+ def initialize(options)
8
+ super(options)
9
+ @type, @access_point_name, @extra = @resource.split(/[:,\/]/)
10
+ end
11
+
12
+ attr_reader :access_point_name
13
+
14
+ def support_dualstack?
15
+ true
16
+ end
17
+
18
+ def support_fips?
19
+ true
20
+ end
21
+
22
+ def validate_arn!
23
+ unless @service == 's3'
24
+ raise ArgumentError, 'Must provide a valid S3 accesspoint ARN.'
25
+ end
26
+
27
+ if @region.empty? || @account_id.empty?
28
+ raise ArgumentError,
29
+ 'S3 accesspoint ARNs must contain both a region '\
30
+ 'and an account id.'
31
+ end
32
+
33
+ if @type != 'accesspoint'
34
+ raise ArgumentError, 'Invalid ARN, resource format is not correct'
35
+ end
36
+
37
+ if @access_point_name.nil? || @access_point_name.empty?
38
+ raise ArgumentError, 'Missing ARN accesspoint name.'
39
+ end
40
+
41
+ if @extra
42
+ raise ArgumentError,
43
+ 'ARN accesspoint resource must be a single value.'
44
+ end
45
+
46
+ unless Seahorse::Util.host_label?(
47
+ "#{@access_point_name}-#{@account_id}"
48
+ )
49
+ raise ArgumentError,
50
+ "#{@access_point_name}-#{@account_id} is not a valid "\
51
+ 'host label.'
52
+ end
53
+ end
54
+
55
+ def host_url(region, dualstack = false)
56
+ sfx = Aws::Partitions::EndpointProvider.dns_suffix_for(region)
57
+ "#{@access_point_name}-#{@account_id}"\
58
+ ".s3-accesspoint#{'.dualstack' if dualstack}.#{region}.#{sfx}"
59
+ end
60
+ end
61
+ end
62
+ end
@@ -0,0 +1,71 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Aws
4
+ module S3
5
+ # @api private
6
+ class OutpostAccessPointARN < Aws::ARN
7
+ def initialize(options)
8
+ super(options)
9
+ @type, @outpost_id, @subtype, @access_point_name, @extra =
10
+ @resource.split(/[:,\/]/)
11
+ end
12
+
13
+ attr_reader :outpost_id, :access_point_name
14
+
15
+ def support_dualstack?
16
+ false
17
+ end
18
+
19
+ def support_fips?
20
+ false
21
+ end
22
+
23
+ def validate_arn!
24
+ unless @service == 's3-outposts'
25
+ raise ArgumentError, 'Must provide a valid S3 outposts ARN.'
26
+ end
27
+
28
+ if @region.empty? || @account_id.empty?
29
+ raise ArgumentError,
30
+ 'S3 accesspoint ARNs must contain both a region '\
31
+ 'and an account id.'
32
+ end
33
+
34
+ if @type != 'outpost' && @subtype != 'accesspoint'
35
+ raise ArgumentError, 'Invalid ARN, resource format is not correct'
36
+ end
37
+
38
+ if @outpost_id.nil? || @outpost_id.empty?
39
+ raise ArgumentError, 'Missing ARN outpost id.'
40
+ end
41
+
42
+ if @access_point_name.nil? || @access_point_name.empty?
43
+ raise ArgumentError, 'Missing ARN accesspoint name.'
44
+ end
45
+
46
+ if @extra
47
+ raise ArgumentError,
48
+ 'ARN accesspoint resource must be a single value.'
49
+ end
50
+
51
+ unless Seahorse::Util.host_label?(
52
+ "#{@access_point_name}-#{@account_id}"
53
+ )
54
+ raise ArgumentError,
55
+ "#{@access_point_name}-#{@account_id} is not a valid "\
56
+ 'host label.'
57
+ end
58
+
59
+ unless Seahorse::Util.host_label?(@outpost_id)
60
+ raise ArgumentError, "#{@outpost_id} is not a valid host label."
61
+ end
62
+ end
63
+
64
+ # Outpost ARNs currently do not support dualstack
65
+ def host_url(region, _dualstack = false)
66
+ "#{@access_point_name}-#{@account_id}.#{@outpost_id}"\
67
+ ".s3-outposts.#{region}.amazonaws.com"
68
+ end
69
+ end
70
+ end
71
+ end
@@ -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:
@@ -220,7 +222,7 @@ module Aws::S3
220
222
  # bucket.create({
221
223
  # acl: "private", # accepts private, public-read, public-read-write, authenticated-read
222
224
  # create_bucket_configuration: {
223
- # location_constraint: "EU", # accepts EU, eu-west-1, us-west-1, us-west-2, ap-south-1, ap-southeast-1, ap-southeast-2, ap-northeast-1, sa-east-1, cn-north-1, eu-central-1
225
+ # location_constraint: "af-south-1", # accepts af-south-1, ap-east-1, ap-northeast-1, ap-northeast-2, ap-northeast-3, ap-south-1, ap-southeast-1, ap-southeast-2, ca-central-1, cn-north-1, cn-northwest-1, EU, eu-central-1, eu-north-1, eu-south-1, eu-west-1, eu-west-2, eu-west-3, me-south-1, sa-east-1, us-east-2, us-gov-east-1, us-gov-west-1, us-west-1, us-west-2
224
226
  # },
225
227
  # grant_full_control: "GrantFullControl",
226
228
  # grant_read: "GrantRead",
@@ -258,8 +260,14 @@ module Aws::S3
258
260
 
259
261
  # @example Request syntax with placeholder values
260
262
  #
261
- # bucket.delete()
263
+ # bucket.delete({
264
+ # expected_bucket_owner: "AccountId",
265
+ # })
262
266
  # @param [Hash] options ({})
267
+ # @option options [String] :expected_bucket_owner
268
+ # The account id of the expected bucket owner. If the bucket is owned by
269
+ # a different account, the request will fail with an HTTP `403 (Access
270
+ # Denied)` error.
263
271
  # @return [EmptyStructure]
264
272
  def delete(options = {})
265
273
  options = options.merge(bucket: @name)
@@ -282,6 +290,7 @@ module Aws::S3
282
290
  # mfa: "MFA",
283
291
  # request_payer: "requester", # accepts requester
284
292
  # bypass_governance_retention: false,
293
+ # expected_bucket_owner: "AccountId",
285
294
  # })
286
295
  # @param [Hash] options ({})
287
296
  # @option options [required, Types::Delete] :delete
@@ -305,6 +314,10 @@ module Aws::S3
305
314
  # Specifies whether you want to delete this object even if it has a
306
315
  # Governance-type Object Lock in place. You must have sufficient
307
316
  # permissions to perform this operation.
317
+ # @option options [String] :expected_bucket_owner
318
+ # The account id of the expected bucket owner. If the bucket is owned by
319
+ # a different account, the request will fail with an HTTP `403 (Access
320
+ # Denied)` error.
308
321
  # @return [Types::DeleteObjectsOutput]
309
322
  def delete_objects(options = {})
310
323
  options = options.merge(bucket: @name)
@@ -334,7 +347,7 @@ module Aws::S3
334
347
  # "MetadataKey" => "MetadataValue",
335
348
  # },
336
349
  # server_side_encryption: "AES256", # accepts AES256, aws:kms
337
- # storage_class: "STANDARD", # accepts STANDARD, REDUCED_REDUNDANCY, STANDARD_IA, ONEZONE_IA, INTELLIGENT_TIERING, GLACIER, DEEP_ARCHIVE
350
+ # storage_class: "STANDARD", # accepts STANDARD, REDUCED_REDUNDANCY, STANDARD_IA, ONEZONE_IA, INTELLIGENT_TIERING, GLACIER, DEEP_ARCHIVE, OUTPOSTS
338
351
  # website_redirect_location: "WebsiteRedirectLocation",
339
352
  # sse_customer_algorithm: "SSECustomerAlgorithm",
340
353
  # sse_customer_key: "SSECustomerKey",
@@ -346,16 +359,19 @@ module Aws::S3
346
359
  # object_lock_mode: "GOVERNANCE", # accepts GOVERNANCE, COMPLIANCE
347
360
  # object_lock_retain_until_date: Time.now,
348
361
  # object_lock_legal_hold_status: "ON", # accepts ON, OFF
362
+ # expected_bucket_owner: "AccountId",
349
363
  # })
350
364
  # @param [Hash] options ({})
351
365
  # @option options [String] :acl
352
366
  # The canned ACL to apply to the object. For more information, see
353
367
  # [Canned ACL][1].
354
368
  #
369
+ # This action is not supported by Amazon S3 on Outposts.
370
+ #
355
371
  #
356
372
  #
357
373
  # [1]: https://docs.aws.amazon.com/AmazonS3/latest/dev/acl-overview.html#CannedACL
358
- # @option options [String, IO] :body
374
+ # @option options [String, StringIO, File] :body
359
375
  # Object data.
360
376
  # @option options [String] :cache_control
361
377
  # Can be used to specify caching behavior along the request/reply chain.
@@ -423,12 +439,20 @@ module Aws::S3
423
439
  # @option options [String] :grant_full_control
424
440
  # Gives the grantee READ, READ\_ACP, and WRITE\_ACP permissions on the
425
441
  # object.
442
+ #
443
+ # This action is not supported by Amazon S3 on Outposts.
426
444
  # @option options [String] :grant_read
427
445
  # Allows grantee to read the object data and its metadata.
446
+ #
447
+ # This action is not supported by Amazon S3 on Outposts.
428
448
  # @option options [String] :grant_read_acp
429
449
  # Allows grantee to read the object ACL.
450
+ #
451
+ # This action is not supported by Amazon S3 on Outposts.
430
452
  # @option options [String] :grant_write_acp
431
453
  # Allows grantee to write the ACL for the applicable object.
454
+ #
455
+ # This action is not supported by Amazon S3 on Outposts.
432
456
  # @option options [required, String] :key
433
457
  # Object key for which the PUT operation was initiated.
434
458
  # @option options [Hash<String,String>] :metadata
@@ -437,8 +461,16 @@ module Aws::S3
437
461
  # The server-side encryption algorithm used when storing this object in
438
462
  # Amazon S3 (for example, AES256, aws:kms).
439
463
  # @option options [String] :storage_class
440
- # If you don't specify, Standard is the default storage class. Amazon
441
- # S3 supports other storage classes.
464
+ # By default, Amazon S3 uses the STANDARD Storage Class to store newly
465
+ # created objects. The STANDARD storage class provides high durability
466
+ # and high availability. Depending on performance needs, you can specify
467
+ # a different Storage Class. Amazon S3 on Outposts only uses the
468
+ # OUTPOSTS Storage Class. For more information, see [Storage Classes][1]
469
+ # in the *Amazon S3 Service Developer Guide*.
470
+ #
471
+ #
472
+ #
473
+ # [1]: https://docs.aws.amazon.com/AmazonS3/latest/dev/storage-class-intro.html
442
474
  # @option options [String] :website_redirect_location
443
475
  # If the bucket is configured as a website, redirects requests for this
444
476
  # object to another object in the same bucket or to an external URL.
@@ -472,7 +504,7 @@ module Aws::S3
472
504
  # encrypting data. This value is used to store the object and then it is
473
505
  # discarded; Amazon S3 does not store the encryption key. The key must
474
506
  # be appropriate for use with the algorithm specified in the
475
- # `x-amz-server-side​-encryption​-customer-algorithm` header.
507
+ # `x-amz-server-side-encryption-customer-algorithm` header.
476
508
  # @option options [String] :sse_customer_key_md5
477
509
  # Specifies the 128-bit MD5 digest of the encryption key according to
478
510
  # RFC 1321. Amazon S3 uses this header for a message integrity check to
@@ -517,10 +549,14 @@ module Aws::S3
517
549
  #
518
550
  #
519
551
  # [1]: https://docs.aws.amazon.com/AmazonS3/latest/dev/object-lock.html
552
+ # @option options [String] :expected_bucket_owner
553
+ # The account id of the expected bucket owner. If the bucket is owned by
554
+ # a different account, the request will fail with an HTTP `403 (Access
555
+ # Denied)` error.
520
556
  # @return [Object]
521
557
  def put_object(options = {})
522
558
  options = options.merge(bucket: @name)
523
- resp = @client.put_object(options)
559
+ @client.put_object(options)
524
560
  Object.new(
525
561
  bucket_name: @name,
526
562
  key: options[:key],
@@ -578,6 +614,7 @@ module Aws::S3
578
614
  # key_marker: "KeyMarker",
579
615
  # prefix: "Prefix",
580
616
  # upload_id_marker: "UploadIdMarker",
617
+ # expected_bucket_owner: "AccountId",
581
618
  # })
582
619
  # @param [Hash] options ({})
583
620
  # @option options [String] :delimiter
@@ -620,6 +657,10 @@ module Aws::S3
620
657
  # uploads for a key equal to the key-marker might be included in the
621
658
  # list only if they have an upload ID lexicographically greater than the
622
659
  # specified `upload-id-marker`.
660
+ # @option options [String] :expected_bucket_owner
661
+ # The account id of the expected bucket owner. If the bucket is owned by
662
+ # a different account, the request will fail with an HTTP `403 (Access
663
+ # Denied)` error.
623
664
  # @return [MultipartUpload::Collection]
624
665
  def multipart_uploads(options = {})
625
666
  batches = Enumerator.new do |y|
@@ -668,6 +709,7 @@ module Aws::S3
668
709
  # key_marker: "KeyMarker",
669
710
  # prefix: "Prefix",
670
711
  # version_id_marker: "VersionIdMarker",
712
+ # expected_bucket_owner: "AccountId",
671
713
  # })
672
714
  # @param [Hash] options ({})
673
715
  # @option options [String] :delimiter
@@ -695,6 +737,10 @@ module Aws::S3
695
737
  # result under CommonPrefixes.
696
738
  # @option options [String] :version_id_marker
697
739
  # Specifies the object version you want to start listing from.
740
+ # @option options [String] :expected_bucket_owner
741
+ # The account id of the expected bucket owner. If the bucket is owned by
742
+ # a different account, the request will fail with an HTTP `403 (Access
743
+ # Denied)` error.
698
744
  # @return [ObjectVersion::Collection]
699
745
  def object_versions(options = {})
700
746
  batches = Enumerator.new do |y|
@@ -726,6 +772,7 @@ module Aws::S3
726
772
  # fetch_owner: false,
727
773
  # start_after: "StartAfter",
728
774
  # request_payer: "requester", # accepts requester
775
+ # expected_bucket_owner: "AccountId",
729
776
  # })
730
777
  # @param [Hash] options ({})
731
778
  # @option options [String] :delimiter
@@ -746,6 +793,10 @@ module Aws::S3
746
793
  # Confirms that the requester knows that she or he will be charged for
747
794
  # the list objects request in V2 style. Bucket owners need not specify
748
795
  # this parameter in their requests.
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.
749
800
  # @return [ObjectSummary::Collection]
750
801
  def objects(options = {})
751
802
  batches = Enumerator.new do |y|
@@ -829,8 +880,8 @@ module Aws::S3
829
880
 
830
881
  def yield_waiter_and_warn(waiter, &block)
831
882
  if !@waiter_block_warned
832
- msg = "pass options to configure the waiter; "
833
- msg << "yielding the waiter is deprecated"
883
+ msg = "pass options to configure the waiter; "\
884
+ "yielding the waiter is deprecated"
834
885
  warn(msg)
835
886
  @waiter_block_warned = true
836
887
  end
@@ -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:
@@ -206,6 +208,7 @@ module Aws::S3
206
208
  # grant_read_acp: "GrantReadACP",
207
209
  # grant_write: "GrantWrite",
208
210
  # grant_write_acp: "GrantWriteACP",
211
+ # expected_bucket_owner: "AccountId",
209
212
  # })
210
213
  # @param [Hash] options ({})
211
214
  # @option options [String] :acl
@@ -233,6 +236,10 @@ module Aws::S3
233
236
  # bucket.
234
237
  # @option options [String] :grant_write_acp
235
238
  # Allows grantee to write the ACL for the applicable bucket.
239
+ # @option options [String] :expected_bucket_owner
240
+ # The account id of the expected bucket owner. If the bucket is owned by
241
+ # a different account, the request will fail with an HTTP `403 (Access
242
+ # Denied)` error.
236
243
  # @return [EmptyStructure]
237
244
  def put(options = {})
238
245
  options = options.merge(bucket: @bucket_name)
@@ -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:
@@ -175,8 +177,14 @@ module Aws::S3
175
177
 
176
178
  # @example Request syntax with placeholder values
177
179
  #
178
- # bucket_cors.delete()
180
+ # bucket_cors.delete({
181
+ # expected_bucket_owner: "AccountId",
182
+ # })
179
183
  # @param [Hash] options ({})
184
+ # @option options [String] :expected_bucket_owner
185
+ # The account id of the expected bucket owner. If the bucket is owned by
186
+ # a different account, the request will fail with an HTTP `403 (Access
187
+ # Denied)` error.
180
188
  # @return [EmptyStructure]
181
189
  def delete(options = {})
182
190
  options = options.merge(bucket: @bucket_name)
@@ -199,6 +207,7 @@ module Aws::S3
199
207
  # ],
200
208
  # },
201
209
  # content_md5: "ContentMD5",
210
+ # expected_bucket_owner: "AccountId",
202
211
  # })
203
212
  # @param [Hash] options ({})
204
213
  # @option options [required, Types::CORSConfiguration] :cors_configuration
@@ -209,7 +218,7 @@ module Aws::S3
209
218
  #
210
219
  #
211
220
  #
212
- # [1]: https://docs.aws.amazon.com/AmazonS3/latest/dev//cors.html
221
+ # [1]: https://docs.aws.amazon.com/AmazonS3/latest/dev/cors.html
213
222
  # @option options [String] :content_md5
214
223
  # The base64-encoded 128-bit MD5 digest of the data. This header must be
215
224
  # used as a message integrity check to verify that the request body was
@@ -218,6 +227,10 @@ module Aws::S3
218
227
  #
219
228
  #
220
229
  # [1]: http://www.ietf.org/rfc/rfc1864.txt
230
+ # @option options [String] :expected_bucket_owner
231
+ # The account id of the expected bucket owner. If the bucket is owned by
232
+ # a different account, the request will fail with an HTTP `403 (Access
233
+ # Denied)` error.
221
234
  # @return [EmptyStructure]
222
235
  def put(options = {})
223
236
  options = options.merge(bucket: @bucket_name)