aws-sdk-s3 1.113.0 → 1.129.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (62) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +131 -0
  3. data/VERSION +1 -1
  4. data/lib/aws-sdk-s3/bucket.rb +108 -55
  5. data/lib/aws-sdk-s3/bucket_acl.rb +9 -3
  6. data/lib/aws-sdk-s3/bucket_cors.rb +12 -4
  7. data/lib/aws-sdk-s3/bucket_lifecycle.rb +12 -4
  8. data/lib/aws-sdk-s3/bucket_lifecycle_configuration.rb +12 -4
  9. data/lib/aws-sdk-s3/bucket_logging.rb +9 -3
  10. data/lib/aws-sdk-s3/bucket_notification.rb +9 -3
  11. data/lib/aws-sdk-s3/bucket_policy.rb +12 -4
  12. data/lib/aws-sdk-s3/bucket_request_payment.rb +9 -3
  13. data/lib/aws-sdk-s3/bucket_tagging.rb +12 -4
  14. data/lib/aws-sdk-s3/bucket_versioning.rb +15 -5
  15. data/lib/aws-sdk-s3/bucket_website.rb +12 -4
  16. data/lib/aws-sdk-s3/client.rb +1869 -1550
  17. data/lib/aws-sdk-s3/client_api.rb +213 -189
  18. data/lib/aws-sdk-s3/customizations/bucket.rb +23 -47
  19. data/lib/aws-sdk-s3/customizations/errors.rb +27 -0
  20. data/lib/aws-sdk-s3/customizations/object.rb +32 -19
  21. data/lib/aws-sdk-s3/customizations/types/permanent_redirect.rb +26 -0
  22. data/lib/aws-sdk-s3/customizations.rb +2 -0
  23. data/lib/aws-sdk-s3/encryption/client.rb +6 -2
  24. data/lib/aws-sdk-s3/encryption/kms_cipher_provider.rb +13 -9
  25. data/lib/aws-sdk-s3/encryptionV2/client.rb +6 -2
  26. data/lib/aws-sdk-s3/encryptionV2/decrypt_handler.rb +1 -0
  27. data/lib/aws-sdk-s3/encryptionV2/kms_cipher_provider.rb +10 -6
  28. data/lib/aws-sdk-s3/endpoint_parameters.rb +142 -0
  29. data/lib/aws-sdk-s3/endpoint_provider.rb +733 -0
  30. data/lib/aws-sdk-s3/endpoints.rb +2150 -0
  31. data/lib/aws-sdk-s3/file_downloader.rb +28 -24
  32. data/lib/aws-sdk-s3/file_uploader.rb +8 -6
  33. data/lib/aws-sdk-s3/multipart_stream_uploader.rb +41 -13
  34. data/lib/aws-sdk-s3/multipart_upload.rb +12 -4
  35. data/lib/aws-sdk-s3/multipart_upload_part.rb +10 -4
  36. data/lib/aws-sdk-s3/object.rb +105 -77
  37. data/lib/aws-sdk-s3/object_acl.rb +9 -3
  38. data/lib/aws-sdk-s3/object_copier.rb +7 -5
  39. data/lib/aws-sdk-s3/object_multipart_copier.rb +11 -5
  40. data/lib/aws-sdk-s3/object_summary.rb +106 -65
  41. data/lib/aws-sdk-s3/object_version.rb +35 -9
  42. data/lib/aws-sdk-s3/plugins/accelerate.rb +3 -50
  43. data/lib/aws-sdk-s3/plugins/arn.rb +0 -184
  44. data/lib/aws-sdk-s3/plugins/bucket_dns.rb +3 -39
  45. data/lib/aws-sdk-s3/plugins/bucket_name_restrictions.rb +1 -6
  46. data/lib/aws-sdk-s3/plugins/dualstack.rb +1 -49
  47. data/lib/aws-sdk-s3/plugins/endpoints.rb +262 -0
  48. data/lib/aws-sdk-s3/plugins/expect_100_continue.rb +2 -1
  49. data/lib/aws-sdk-s3/plugins/iad_regional_endpoint.rb +0 -29
  50. data/lib/aws-sdk-s3/plugins/s3_signer.rb +35 -124
  51. data/lib/aws-sdk-s3/plugins/streaming_retry.rb +23 -2
  52. data/lib/aws-sdk-s3/presigned_post.rb +61 -59
  53. data/lib/aws-sdk-s3/presigner.rb +24 -35
  54. data/lib/aws-sdk-s3/resource.rb +7 -3
  55. data/lib/aws-sdk-s3/types.rb +714 -4040
  56. data/lib/aws-sdk-s3.rb +5 -1
  57. metadata +12 -11
  58. data/lib/aws-sdk-s3/arn/access_point_arn.rb +0 -69
  59. data/lib/aws-sdk-s3/arn/multi_region_access_point_arn.rb +0 -68
  60. data/lib/aws-sdk-s3/arn/object_lambda_arn.rb +0 -69
  61. data/lib/aws-sdk-s3/arn/outpost_access_point_arn.rb +0 -74
  62. data/lib/aws-sdk-s3/plugins/object_lambda_endpoint.rb +0 -25
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: cd3cdd3ce413a190558c3c4fb19b0c360e6fdc8429315addf9a99f8a4200e84f
4
- data.tar.gz: 8ea6b6b1a93212b99871945b5deeaa90813f4aef35d55ae2c351194be17f2909
3
+ metadata.gz: 578e27a27f5e9dbd010d0ebd8c5d0fb08a044ad00030fe0aa5bffdf06b3fefcb
4
+ data.tar.gz: ba2d207e8dcde9882c68df896273de191c2f73f96474fdc15edd1f05340c7549
5
5
  SHA512:
6
- metadata.gz: 4c83d52e47d9990c34a6ffa1b0ab647e333353dc516a4105a01df1fa2d93fe5d8a7e45c48072e27d95cd4e7581adcc606fabe3afb5cfd9e41047da330910ad37
7
- data.tar.gz: a399eff773756874118891127b2ac26592b1c780559b3900ef0f4982e6ef3286b759331507a79778725e5cb61f7f140d94d08e77bd4ba51b05eb3e23b1f7a621
6
+ metadata.gz: 46454fc534e68df2f8c885243e622298b3a044d3102e9682055bf9cad711474ddf6a26676b8a1d1a94d8680efc590fb9f9fab36071e3e26cba126354209f3954
7
+ data.tar.gz: ce7cbb366e60f0d68fd0fcaed9210a4e4ed2ae03c45c81fda0ae310a4cd12291480214c7478ab28257c7b9bd0c7981898f009c57aa7ae6a83e9e875479e41bc3
data/CHANGELOG.md CHANGED
@@ -1,6 +1,137 @@
1
1
  Unreleased Changes
2
2
  ------------------
3
3
 
4
+ 1.129.0 (2023-07-11)
5
+ ------------------
6
+
7
+ * Feature - Code Generated Changes, see `./build_tools` or `aws-sdk-core`'s CHANGELOG.md for details.
8
+
9
+ 1.128.0 (2023-07-06)
10
+ ------------------
11
+
12
+ * Feature - Code Generated Changes, see `./build_tools` or `aws-sdk-core`'s CHANGELOG.md for details.
13
+
14
+ 1.127.0 (2023-06-28)
15
+ ------------------
16
+
17
+ * Feature - The S3 LISTObjects, ListObjectsV2 and ListObjectVersions API now supports a new optional header x-amz-optional-object-attributes. If header contains RestoreStatus as the value, then S3 will include Glacier restore status i.e. isRestoreInProgress and RestoreExpiryDate in List response.
18
+
19
+ * Feature - Select minimum expiration time for presigned urls between the expiration time option and the credential expiration time.
20
+
21
+ 1.126.0 (2023-06-16)
22
+ ------------------
23
+
24
+ * Feature - This release adds SDK support for request-payer request header and request-charged response header in the "GetBucketAccelerateConfiguration", "ListMultipartUploads", "ListObjects", "ListObjectsV2" and "ListObjectVersions" S3 APIs.
25
+
26
+ 1.125.0 (2023-06-15)
27
+ ------------------
28
+
29
+ * Feature - Code Generated Changes, see `./build_tools` or `aws-sdk-core`'s CHANGELOG.md for details.
30
+
31
+ 1.124.0 (2023-06-13)
32
+ ------------------
33
+
34
+ * Feature - Integrate double encryption feature to SDKs.
35
+
36
+ 1.123.2 (2023-06-12)
37
+ ------------------
38
+
39
+ * Issue - Fix issue when decrypting noncurrent versions of objects when using client side encryption (#2866).
40
+
41
+ 1.123.1 (2023-06-02)
42
+ ------------------
43
+
44
+ * Issue - Fix multipart `download_file` so that it does not download bytes out of range (#2859).
45
+
46
+ 1.123.0 (2023-05-31)
47
+ ------------------
48
+
49
+ * Feature - Code Generated Changes, see `./build_tools` or `aws-sdk-core`'s CHANGELOG.md for details.
50
+
51
+ 1.122.0 (2023-05-04)
52
+ ------------------
53
+
54
+ * Feature - Documentation updates for Amazon S3
55
+
56
+ 1.121.0 (2023-04-19)
57
+ ------------------
58
+
59
+ * Feature - Provides support for "Snow" Storage class.
60
+
61
+ 1.120.1 (2023-04-05)
62
+ ------------------
63
+
64
+ * Issue - Skip `#check_for_cached_region` if custom endpoint provided
65
+
66
+ 1.120.0 (2023-03-31)
67
+ ------------------
68
+
69
+ * Feature - Documentation updates for Amazon S3
70
+
71
+ 1.119.2 (2023-03-22)
72
+ ------------------
73
+
74
+ * Issue - Provide `endpoint` and `bucket` attributes on `Aws::S3::Errors::PermanentRedirect` error objects.
75
+
76
+ 1.119.1 (2023-02-13)
77
+ ------------------
78
+
79
+ * Issue - Ensure object metadata is not lost on multipart copy (#2821).
80
+
81
+ 1.119.0 (2023-01-26)
82
+ ------------------
83
+
84
+ * Feature - Allow FIPS to be used with path-style URLs.
85
+
86
+ 1.118.0 (2023-01-18)
87
+ ------------------
88
+
89
+ * Feature - Code Generated Changes, see `./build_tools` or `aws-sdk-core`'s CHANGELOG.md for details.
90
+
91
+ * Issue - Replace runtime endpoint resolution approach with generated ruby code.
92
+
93
+ 1.117.2 (2022-11-30)
94
+ ------------------
95
+
96
+ * Issue - Return error messages from failures in threads in `MultipartStreamUploader` (#2793).
97
+
98
+ 1.117.1 (2022-10-26)
99
+ ------------------
100
+
101
+ * Issue - Fix custom endpoint and port regression with `presigned_url` (#2776).
102
+
103
+ 1.117.0 (2022-10-25)
104
+ ------------------
105
+
106
+ * Feature - Code Generated Changes, see `./build_tools` or `aws-sdk-core`'s CHANGELOG.md for details.
107
+
108
+ * Issue - Apply checksums to MultipartStreamUploader (#2769).
109
+
110
+ 1.116.0 (2022-10-21)
111
+ ------------------
112
+
113
+ * Feature - S3 on Outposts launches support for automatic bucket-style alias. You can use the automatic access point alias instead of an access point ARN for any object-level operation in an Outposts bucket.
114
+
115
+ 1.115.0 (2022-10-19)
116
+ ------------------
117
+
118
+ * Feature - Updates internal logic for constructing API endpoints. We have added rule-based endpoints and internal model parameters.
119
+
120
+ 1.114.0 (2022-05-03)
121
+ ------------------
122
+
123
+ * Feature - Documentation only update for doc bug fixes for the S3 API docs.
124
+
125
+ 1.113.2 (2022-04-26)
126
+ ------------------
127
+
128
+ * Issue - Fix an issue where `ExpiredToken` errors were retried as if the request was from another region.
129
+
130
+ 1.113.1 (2022-04-25)
131
+ ------------------
132
+
133
+ * Issue - Rewind the underlying file on a streaming retry that is not a truncated body (#2692).
134
+
4
135
  1.113.0 (2022-02-24)
5
136
  ------------------
6
137
 
data/VERSION CHANGED
@@ -1 +1 @@
1
- 1.113.0
1
+ 1.129.0
@@ -95,7 +95,9 @@ module Aws::S3
95
95
  options, params = separate_params_and_options(options)
96
96
  waiter = Waiters::BucketExists.new(options)
97
97
  yield_waiter_and_warn(waiter, &block) if block_given?
98
- waiter.wait(params.merge(bucket: @name))
98
+ Aws::Plugins::UserAgent.feature('resource') do
99
+ waiter.wait(params.merge(bucket: @name))
100
+ end
99
101
  Bucket.new({
100
102
  name: @name,
101
103
  client: @client
@@ -112,7 +114,9 @@ module Aws::S3
112
114
  options, params = separate_params_and_options(options)
113
115
  waiter = Waiters::BucketNotExists.new(options)
114
116
  yield_waiter_and_warn(waiter, &block) if block_given?
115
- waiter.wait(params.merge(bucket: @name))
117
+ Aws::Plugins::UserAgent.feature('resource') do
118
+ waiter.wait(params.merge(bucket: @name))
119
+ end
116
120
  Bucket.new({
117
121
  name: @name,
118
122
  client: @client
@@ -213,7 +217,9 @@ module Aws::S3
213
217
  :retry
214
218
  end
215
219
  end
216
- Aws::Waiters::Waiter.new(options).wait({})
220
+ Aws::Plugins::UserAgent.feature('resource') do
221
+ Aws::Waiters::Waiter.new(options).wait({})
222
+ end
217
223
  end
218
224
 
219
225
  # @!group Actions
@@ -223,7 +229,7 @@ module Aws::S3
223
229
  # bucket.create({
224
230
  # acl: "private", # accepts private, public-read, public-read-write, authenticated-read
225
231
  # create_bucket_configuration: {
226
- # 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
232
+ # 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, ap-southeast-3, 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
227
233
  # },
228
234
  # grant_full_control: "GrantFullControl",
229
235
  # grant_read: "GrantRead",
@@ -275,7 +281,9 @@ module Aws::S3
275
281
  # @return [Types::CreateBucketOutput]
276
282
  def create(options = {})
277
283
  options = options.merge(bucket: @name)
278
- resp = @client.create_bucket(options)
284
+ resp = Aws::Plugins::UserAgent.feature('resource') do
285
+ @client.create_bucket(options)
286
+ end
279
287
  resp.data
280
288
  end
281
289
 
@@ -292,7 +300,9 @@ module Aws::S3
292
300
  # @return [EmptyStructure]
293
301
  def delete(options = {})
294
302
  options = options.merge(bucket: @name)
295
- resp = @client.delete_bucket(options)
303
+ resp = Aws::Plugins::UserAgent.feature('resource') do
304
+ @client.delete_bucket(options)
305
+ end
296
306
  resp.data
297
307
  end
298
308
 
@@ -361,7 +371,9 @@ module Aws::S3
361
371
  # @return [Types::DeleteObjectsOutput]
362
372
  def delete_objects(options = {})
363
373
  options = options.merge(bucket: @name)
364
- resp = @client.delete_objects(options)
374
+ resp = Aws::Plugins::UserAgent.feature('resource') do
375
+ @client.delete_objects(options)
376
+ end
365
377
  resp.data
366
378
  end
367
379
 
@@ -391,8 +403,8 @@ module Aws::S3
391
403
  # metadata: {
392
404
  # "MetadataKey" => "MetadataValue",
393
405
  # },
394
- # server_side_encryption: "AES256", # accepts AES256, aws:kms
395
- # storage_class: "STANDARD", # accepts STANDARD, REDUCED_REDUNDANCY, STANDARD_IA, ONEZONE_IA, INTELLIGENT_TIERING, GLACIER, DEEP_ARCHIVE, OUTPOSTS, GLACIER_IR
406
+ # server_side_encryption: "AES256", # accepts AES256, aws:kms, aws:kms:dsse
407
+ # storage_class: "STANDARD", # accepts STANDARD, REDUCED_REDUNDANCY, STANDARD_IA, ONEZONE_IA, INTELLIGENT_TIERING, GLACIER, DEEP_ARCHIVE, OUTPOSTS, GLACIER_IR, SNOW
396
408
  # website_redirect_location: "WebsiteRedirectLocation",
397
409
  # sse_customer_algorithm: "SSECustomerAlgorithm",
398
410
  # sse_customer_key: "SSECustomerKey",
@@ -430,30 +442,30 @@ module Aws::S3
430
442
  # @option options [String] :content_disposition
431
443
  # Specifies presentational information for the object. For more
432
444
  # information, see
433
- # [http://www.w3.org/Protocols/rfc2616/rfc2616-sec19.html#sec19.5.1][1].
445
+ # [https://www.rfc-editor.org/rfc/rfc6266#section-4][1].
434
446
  #
435
447
  #
436
448
  #
437
- # [1]: http://www.w3.org/Protocols/rfc2616/rfc2616-sec19.html#sec19.5.1
449
+ # [1]: https://www.rfc-editor.org/rfc/rfc6266#section-4
438
450
  # @option options [String] :content_encoding
439
451
  # Specifies what content encodings have been applied to the object and
440
452
  # thus what decoding mechanisms must be applied to obtain the media-type
441
453
  # referenced by the Content-Type header field. For more information, see
442
- # [http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.11][1].
454
+ # [https://www.rfc-editor.org/rfc/rfc9110.html#field.content-encoding][1].
443
455
  #
444
456
  #
445
457
  #
446
- # [1]: http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.11
458
+ # [1]: https://www.rfc-editor.org/rfc/rfc9110.html#field.content-encoding
447
459
  # @option options [String] :content_language
448
460
  # The language the content is in.
449
461
  # @option options [Integer] :content_length
450
462
  # Size of the body in bytes. This parameter is useful when the size of
451
463
  # the body cannot be determined automatically. For more information, see
452
- # [http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.13][1].
464
+ # [https://www.rfc-editor.org/rfc/rfc9110.html#name-content-length][1].
453
465
  #
454
466
  #
455
467
  #
456
- # [1]: http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.13
468
+ # [1]: https://www.rfc-editor.org/rfc/rfc9110.html#name-content-length
457
469
  # @option options [String] :content_md5
458
470
  # The base64-encoded 128-bit MD5 digest of the message (without the
459
471
  # headers) according to RFC 1864. This header can be used as a message
@@ -469,11 +481,11 @@ module Aws::S3
469
481
  # @option options [String] :content_type
470
482
  # A standard MIME type describing the format of the contents. For more
471
483
  # information, see
472
- # [http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.17][1].
484
+ # [https://www.rfc-editor.org/rfc/rfc9110.html#name-content-type][1].
473
485
  #
474
486
  #
475
487
  #
476
- # [1]: http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.17
488
+ # [1]: https://www.rfc-editor.org/rfc/rfc9110.html#name-content-type
477
489
  # @option options [String] :checksum_algorithm
478
490
  # Indicates the algorithm used to create the checksum for the object
479
491
  # when using the SDK. This header will not provide any additional
@@ -532,11 +544,11 @@ module Aws::S3
532
544
  # @option options [Time,DateTime,Date,Integer,String] :expires
533
545
  # The date and time at which the object is no longer cacheable. For more
534
546
  # information, see
535
- # [http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.21][1].
547
+ # [https://www.rfc-editor.org/rfc/rfc7234#section-5.3][1].
536
548
  #
537
549
  #
538
550
  #
539
- # [1]: http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.21
551
+ # [1]: https://www.rfc-editor.org/rfc/rfc7234#section-5.3
540
552
  # @option options [String] :grant_full_control
541
553
  # Gives the grantee READ, READ\_ACP, and WRITE\_ACP permissions on the
542
554
  # object.
@@ -560,7 +572,7 @@ module Aws::S3
560
572
  # A map of metadata to store with the object in S3.
561
573
  # @option options [String] :server_side_encryption
562
574
  # The server-side encryption algorithm used when storing this object in
563
- # Amazon S3 (for example, AES256, aws:kms).
575
+ # Amazon S3 (for example, `AES256`, `aws:kms`, `aws:kms:dsse`).
564
576
  # @option options [String] :storage_class
565
577
  # By default, Amazon S3 uses the STANDARD Storage Class to store newly
566
578
  # created objects. The STANDARD storage class provides high durability
@@ -611,24 +623,27 @@ module Aws::S3
611
623
  # RFC 1321. Amazon S3 uses this header for a message integrity check to
612
624
  # ensure that the encryption key was transmitted without error.
613
625
  # @option options [String] :ssekms_key_id
614
- # If `x-amz-server-side-encryption` is present and has the value of
615
- # `aws:kms`, this header specifies the ID of the Amazon Web Services Key
616
- # Management Service (Amazon Web Services KMS) symmetrical customer
617
- # managed key that was used for the object. If you specify
618
- # `x-amz-server-side-encryption:aws:kms`, but do not provide`
626
+ # If `x-amz-server-side-encryption` has a valid value of `aws:kms` or
627
+ # `aws:kms:dsse`, this header specifies the ID of the Key Management
628
+ # Service (KMS) symmetric encryption customer managed key that was used
629
+ # for the object. If you specify `x-amz-server-side-encryption:aws:kms`
630
+ # or `x-amz-server-side-encryption:aws:kms:dsse`, but do not provide`
619
631
  # x-amz-server-side-encryption-aws-kms-key-id`, Amazon S3 uses the
620
- # Amazon Web Services managed key to protect the data. If the KMS key
621
- # does not exist in the same account issuing the command, you must use
622
- # the full ARN and not just the ID.
632
+ # Amazon Web Services managed key (`aws/s3`) to protect the data. If the
633
+ # KMS key does not exist in the same account that's issuing the
634
+ # command, you must use the full ARN and not just the ID.
623
635
  # @option options [String] :ssekms_encryption_context
624
636
  # Specifies the Amazon Web Services KMS Encryption Context to use for
625
637
  # object encryption. The value of this header is a base64-encoded UTF-8
626
- # string holding JSON with the encryption context key-value pairs.
638
+ # string holding JSON with the encryption context key-value pairs. This
639
+ # value is stored as object metadata and automatically gets passed on to
640
+ # Amazon Web Services KMS for future `GetObject` or `CopyObject`
641
+ # operations on this object.
627
642
  # @option options [Boolean] :bucket_key_enabled
628
643
  # Specifies whether Amazon S3 should use an S3 Bucket Key for object
629
- # encryption with server-side encryption using AWS KMS (SSE-KMS).
630
- # Setting this header to `true` causes Amazon S3 to use an S3 Bucket Key
631
- # for object encryption with SSE-KMS.
644
+ # encryption with server-side encryption using Key Management Service
645
+ # (KMS) keys (SSE-KMS). Setting this header to `true` causes Amazon S3
646
+ # to use an S3 Bucket Key for object encryption with SSE-KMS.
632
647
  #
633
648
  # Specifying this header with a PUT action doesn’t affect bucket-level
634
649
  # settings for S3 Bucket Key.
@@ -664,7 +679,9 @@ module Aws::S3
664
679
  # @return [Object]
665
680
  def put_object(options = {})
666
681
  options = options.merge(bucket: @name)
667
- @client.put_object(options)
682
+ Aws::Plugins::UserAgent.feature('resource') do
683
+ @client.put_object(options)
684
+ end
668
685
  Object.new(
669
686
  bucket_name: @name,
670
687
  key: options[:key],
@@ -723,6 +740,7 @@ module Aws::S3
723
740
  # prefix: "Prefix",
724
741
  # upload_id_marker: "UploadIdMarker",
725
742
  # expected_bucket_owner: "AccountId",
743
+ # request_payer: "requester", # accepts requester
726
744
  # })
727
745
  # @param [Hash] options ({})
728
746
  # @option options [String] :delimiter
@@ -736,14 +754,14 @@ module Aws::S3
736
754
  # result element are not returned elsewhere in the response.
737
755
  # @option options [String] :encoding_type
738
756
  # Requests Amazon S3 to encode the object keys in the response and
739
- # specifies the encoding method to use. An object key may contain any
740
- # Unicode character; however, XML 1.0 parser cannot parse some
757
+ # specifies the encoding method to use. An object key can contain any
758
+ # Unicode character; however, the XML 1.0 parser cannot parse some
741
759
  # characters, such as characters with an ASCII value from 0 to 10. For
742
760
  # characters that are not supported in XML 1.0, you can add this
743
761
  # parameter to request that Amazon S3 encode the keys in the response.
744
762
  # @option options [String] :key_marker
745
- # Together with upload-id-marker, this parameter specifies the multipart
746
- # upload after which listing should begin.
763
+ # Together with `upload-id-marker`, this parameter specifies the
764
+ # multipart upload after which listing should begin.
747
765
  #
748
766
  # If `upload-id-marker` is not specified, only the keys
749
767
  # lexicographically greater than the specified `key-marker` will be
@@ -756,8 +774,8 @@ module Aws::S3
756
774
  # @option options [String] :prefix
757
775
  # Lists in-progress uploads only for those keys that begin with the
758
776
  # specified prefix. You can use prefixes to separate a bucket into
759
- # different grouping of keys. (You can think of using prefix to make
760
- # groups in the same way you'd use a folder in a file system.)
777
+ # different grouping of keys. (You can think of using `prefix` to make
778
+ # groups in the same way that you'd use a folder in a file system.)
761
779
  # @option options [String] :upload_id_marker
762
780
  # Together with key-marker, specifies the multipart upload after which
763
781
  # listing should begin. If key-marker is not specified, the
@@ -769,11 +787,23 @@ module Aws::S3
769
787
  # The account ID of the expected bucket owner. If the bucket is owned by
770
788
  # a different account, the request fails with the HTTP status code `403
771
789
  # Forbidden` (access denied).
790
+ # @option options [String] :request_payer
791
+ # Confirms that the requester knows that they will be charged for the
792
+ # request. Bucket owners need not specify this parameter in their
793
+ # requests. For information about downloading objects from Requester
794
+ # Pays buckets, see [Downloading Objects in Requester Pays Buckets][1]
795
+ # in the *Amazon S3 User Guide*.
796
+ #
797
+ #
798
+ #
799
+ # [1]: https://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html
772
800
  # @return [MultipartUpload::Collection]
773
801
  def multipart_uploads(options = {})
774
802
  batches = Enumerator.new do |y|
775
803
  options = options.merge(bucket: @name)
776
- resp = @client.list_multipart_uploads(options)
804
+ resp = Aws::Plugins::UserAgent.feature('resource') do
805
+ @client.list_multipart_uploads(options)
806
+ end
777
807
  resp.each_page do |page|
778
808
  batch = []
779
809
  page.data.uploads.each do |u|
@@ -818,19 +848,21 @@ module Aws::S3
818
848
  # prefix: "Prefix",
819
849
  # version_id_marker: "VersionIdMarker",
820
850
  # expected_bucket_owner: "AccountId",
851
+ # request_payer: "requester", # accepts requester
852
+ # optional_object_attributes: ["RestoreStatus"], # accepts RestoreStatus
821
853
  # })
822
854
  # @param [Hash] options ({})
823
855
  # @option options [String] :delimiter
824
856
  # A delimiter is a character that you specify to group keys. All keys
825
857
  # that contain the same string between the `prefix` and the first
826
858
  # occurrence of the delimiter are grouped under a single result element
827
- # in CommonPrefixes. These groups are counted as one result against the
828
- # max-keys limitation. These keys are not returned elsewhere in the
829
- # response.
859
+ # in `CommonPrefixes`. These groups are counted as one result against
860
+ # the `max-keys` limitation. These keys are not returned elsewhere in
861
+ # the response.
830
862
  # @option options [String] :encoding_type
831
863
  # Requests Amazon S3 to encode the object keys in the response and
832
- # specifies the encoding method to use. An object key may contain any
833
- # Unicode character; however, XML 1.0 parser cannot parse some
864
+ # specifies the encoding method to use. An object key can contain any
865
+ # Unicode character; however, the XML 1.0 parser cannot parse some
834
866
  # characters, such as characters with an ASCII value from 0 to 10. For
835
867
  # characters that are not supported in XML 1.0, you can add this
836
868
  # parameter to request that Amazon S3 encode the keys in the response.
@@ -839,21 +871,36 @@ module Aws::S3
839
871
  # @option options [String] :prefix
840
872
  # Use this parameter to select only those keys that begin with the
841
873
  # specified prefix. You can use prefixes to separate a bucket into
842
- # different groupings of keys. (You can think of using prefix to make
843
- # groups in the same way you'd use a folder in a file system.) You can
844
- # use prefix with delimiter to roll up numerous objects into a single
845
- # result under CommonPrefixes.
874
+ # different groupings of keys. (You can think of using `prefix` to make
875
+ # groups in the same way that you'd use a folder in a file system.) You
876
+ # can use `prefix` with `delimiter` to roll up numerous objects into a
877
+ # single result under `CommonPrefixes`.
846
878
  # @option options [String] :version_id_marker
847
879
  # Specifies the object version you want to start listing from.
848
880
  # @option options [String] :expected_bucket_owner
849
881
  # The account ID of the expected bucket owner. If the bucket is owned by
850
882
  # a different account, the request fails with the HTTP status code `403
851
883
  # Forbidden` (access denied).
884
+ # @option options [String] :request_payer
885
+ # Confirms that the requester knows that they will be charged for the
886
+ # request. Bucket owners need not specify this parameter in their
887
+ # requests. For information about downloading objects from Requester
888
+ # Pays buckets, see [Downloading Objects in Requester Pays Buckets][1]
889
+ # in the *Amazon S3 User Guide*.
890
+ #
891
+ #
892
+ #
893
+ # [1]: https://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html
894
+ # @option options [Array<String>] :optional_object_attributes
895
+ # Specifies the optional fields that you want returned in the response.
896
+ # Fields that you do not specify are not returned.
852
897
  # @return [ObjectVersion::Collection]
853
898
  def object_versions(options = {})
854
899
  batches = Enumerator.new do |y|
855
900
  options = options.merge(bucket: @name)
856
- resp = @client.list_object_versions(options)
901
+ resp = Aws::Plugins::UserAgent.feature('resource') do
902
+ @client.list_object_versions(options)
903
+ end
857
904
  resp.each_page do |page|
858
905
  batch = []
859
906
  page.data.versions_delete_markers.each do |v|
@@ -881,18 +928,19 @@ module Aws::S3
881
928
  # start_after: "StartAfter",
882
929
  # request_payer: "requester", # accepts requester
883
930
  # expected_bucket_owner: "AccountId",
931
+ # optional_object_attributes: ["RestoreStatus"], # accepts RestoreStatus
884
932
  # })
885
933
  # @param [Hash] options ({})
886
934
  # @option options [String] :delimiter
887
- # A delimiter is a character you use to group keys.
935
+ # A delimiter is a character that you use to group keys.
888
936
  # @option options [String] :encoding_type
889
937
  # Encoding type used by Amazon S3 to encode object keys in the response.
890
938
  # @option options [String] :prefix
891
939
  # Limits the response to keys that begin with the specified prefix.
892
940
  # @option options [Boolean] :fetch_owner
893
- # The owner field is not present in listV2 by default, if you want to
894
- # return owner field with each key in the result then set the fetch
895
- # owner field to true.
941
+ # The owner field is not present in `ListObjectsV2` by default. If you
942
+ # want to return the owner field with each key in the result, then set
943
+ # the `FetchOwner` field to `true`.
896
944
  # @option options [String] :start_after
897
945
  # StartAfter is where you want Amazon S3 to start listing from. Amazon
898
946
  # S3 starts listing after this specified key. StartAfter can be any key
@@ -905,11 +953,16 @@ module Aws::S3
905
953
  # The account ID of the expected bucket owner. If the bucket is owned by
906
954
  # a different account, the request fails with the HTTP status code `403
907
955
  # Forbidden` (access denied).
956
+ # @option options [Array<String>] :optional_object_attributes
957
+ # Specifies the optional fields that you want returned in the response.
958
+ # Fields that you do not specify are not returned.
908
959
  # @return [ObjectSummary::Collection]
909
960
  def objects(options = {})
910
961
  batches = Enumerator.new do |y|
911
962
  options = options.merge(bucket: @name)
912
- resp = @client.list_objects_v2(options)
963
+ resp = Aws::Plugins::UserAgent.feature('resource') do
964
+ @client.list_objects_v2(options)
965
+ end
913
966
  resp.each_page do |page|
914
967
  batch = []
915
968
  page.data.contents.each do |c|
@@ -60,7 +60,9 @@ module Aws::S3
60
60
  #
61
61
  # @return [self]
62
62
  def load
63
- resp = @client.get_bucket_acl(bucket: @bucket_name)
63
+ resp = Aws::Plugins::UserAgent.feature('resource') do
64
+ @client.get_bucket_acl(bucket: @bucket_name)
65
+ end
64
66
  @data = resp.data
65
67
  self
66
68
  end
@@ -175,7 +177,9 @@ module Aws::S3
175
177
  :retry
176
178
  end
177
179
  end
178
- Aws::Waiters::Waiter.new(options).wait({})
180
+ Aws::Plugins::UserAgent.feature('resource') do
181
+ Aws::Waiters::Waiter.new(options).wait({})
182
+ end
179
183
  end
180
184
 
181
185
  # @!group Actions
@@ -265,7 +269,9 @@ module Aws::S3
265
269
  # @return [EmptyStructure]
266
270
  def put(options = {})
267
271
  options = options.merge(bucket: @bucket_name)
268
- resp = @client.put_bucket_acl(options)
272
+ resp = Aws::Plugins::UserAgent.feature('resource') do
273
+ @client.put_bucket_acl(options)
274
+ end
269
275
  resp.data
270
276
  end
271
277
 
@@ -55,7 +55,9 @@ module Aws::S3
55
55
  #
56
56
  # @return [self]
57
57
  def load
58
- resp = @client.get_bucket_cors(bucket: @bucket_name)
58
+ resp = Aws::Plugins::UserAgent.feature('resource') do
59
+ @client.get_bucket_cors(bucket: @bucket_name)
60
+ end
59
61
  @data = resp.data
60
62
  self
61
63
  end
@@ -170,7 +172,9 @@ module Aws::S3
170
172
  :retry
171
173
  end
172
174
  end
173
- Aws::Waiters::Waiter.new(options).wait({})
175
+ Aws::Plugins::UserAgent.feature('resource') do
176
+ Aws::Waiters::Waiter.new(options).wait({})
177
+ end
174
178
  end
175
179
 
176
180
  # @!group Actions
@@ -188,7 +192,9 @@ module Aws::S3
188
192
  # @return [EmptyStructure]
189
193
  def delete(options = {})
190
194
  options = options.merge(bucket: @bucket_name)
191
- resp = @client.delete_bucket_cors(options)
195
+ resp = Aws::Plugins::UserAgent.feature('resource') do
196
+ @client.delete_bucket_cors(options)
197
+ end
192
198
  resp.data
193
199
  end
194
200
 
@@ -254,7 +260,9 @@ module Aws::S3
254
260
  # @return [EmptyStructure]
255
261
  def put(options = {})
256
262
  options = options.merge(bucket: @bucket_name)
257
- resp = @client.put_bucket_cors(options)
263
+ resp = Aws::Plugins::UserAgent.feature('resource') do
264
+ @client.put_bucket_cors(options)
265
+ end
258
266
  resp.data
259
267
  end
260
268
 
@@ -54,7 +54,9 @@ module Aws::S3
54
54
  #
55
55
  # @return [self]
56
56
  def load
57
- resp = @client.get_bucket_lifecycle(bucket: @bucket_name)
57
+ resp = Aws::Plugins::UserAgent.feature('resource') do
58
+ @client.get_bucket_lifecycle(bucket: @bucket_name)
59
+ end
58
60
  @data = resp.data
59
61
  self
60
62
  end
@@ -169,7 +171,9 @@ module Aws::S3
169
171
  :retry
170
172
  end
171
173
  end
172
- Aws::Waiters::Waiter.new(options).wait({})
174
+ Aws::Plugins::UserAgent.feature('resource') do
175
+ Aws::Waiters::Waiter.new(options).wait({})
176
+ end
173
177
  end
174
178
 
175
179
  # @!group Actions
@@ -187,7 +191,9 @@ module Aws::S3
187
191
  # @return [EmptyStructure]
188
192
  def delete(options = {})
189
193
  options = options.merge(bucket: @bucket_name)
190
- resp = @client.delete_bucket_lifecycle(options)
194
+ resp = Aws::Plugins::UserAgent.feature('resource') do
195
+ @client.delete_bucket_lifecycle(options)
196
+ end
191
197
  resp.data
192
198
  end
193
199
 
@@ -257,7 +263,9 @@ module Aws::S3
257
263
  # @return [EmptyStructure]
258
264
  def put(options = {})
259
265
  options = options.merge(bucket: @bucket_name)
260
- resp = @client.put_bucket_lifecycle(options)
266
+ resp = Aws::Plugins::UserAgent.feature('resource') do
267
+ @client.put_bucket_lifecycle(options)
268
+ end
261
269
  resp.data
262
270
  end
263
271