aws-sdk-s3 1.151.0 → 1.156.0
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.
- checksums.yaml +4 -4
- data/CHANGELOG.md +40 -0
- data/VERSION +1 -1
- data/lib/aws-sdk-s3/bucket.rb +12 -12
- data/lib/aws-sdk-s3/bucket_acl.rb +3 -3
- data/lib/aws-sdk-s3/bucket_cors.rb +4 -4
- data/lib/aws-sdk-s3/bucket_lifecycle.rb +4 -4
- data/lib/aws-sdk-s3/bucket_lifecycle_configuration.rb +4 -4
- data/lib/aws-sdk-s3/bucket_logging.rb +3 -3
- data/lib/aws-sdk-s3/bucket_notification.rb +3 -3
- data/lib/aws-sdk-s3/bucket_policy.rb +4 -4
- data/lib/aws-sdk-s3/bucket_request_payment.rb +3 -3
- data/lib/aws-sdk-s3/bucket_tagging.rb +4 -4
- data/lib/aws-sdk-s3/bucket_versioning.rb +5 -5
- data/lib/aws-sdk-s3/bucket_website.rb +4 -4
- data/lib/aws-sdk-s3/client.rb +123 -88
- data/lib/aws-sdk-s3/client_api.rb +10 -2
- data/lib/aws-sdk-s3/customizations/bucket.rb +1 -1
- data/lib/aws-sdk-s3/customizations/object.rb +5 -5
- data/lib/aws-sdk-s3/encryption/client.rb +2 -2
- data/lib/aws-sdk-s3/encryption/kms_cipher_provider.rb +2 -2
- data/lib/aws-sdk-s3/encryptionV2/client.rb +2 -2
- data/lib/aws-sdk-s3/encryptionV2/kms_cipher_provider.rb +2 -2
- data/lib/aws-sdk-s3/endpoint_parameters.rb +8 -0
- data/lib/aws-sdk-s3/endpoint_provider.rb +1 -0
- data/lib/aws-sdk-s3/endpoints.rb +100 -1
- data/lib/aws-sdk-s3/file_downloader.rb +1 -1
- data/lib/aws-sdk-s3/file_uploader.rb +1 -1
- data/lib/aws-sdk-s3/multipart_stream_uploader.rb +1 -1
- data/lib/aws-sdk-s3/multipart_upload.rb +4 -4
- data/lib/aws-sdk-s3/multipart_upload_part.rb +3 -3
- data/lib/aws-sdk-s3/object.rb +30 -12
- data/lib/aws-sdk-s3/object_acl.rb +3 -3
- data/lib/aws-sdk-s3/object_copier.rb +1 -1
- data/lib/aws-sdk-s3/object_summary.rb +10 -10
- data/lib/aws-sdk-s3/object_version.rb +23 -5
- data/lib/aws-sdk-s3/plugins/access_grants.rb +7 -1
- data/lib/aws-sdk-s3/plugins/express_session_auth.rb +7 -1
- data/lib/aws-sdk-s3/plugins/http_200_errors.rb +53 -16
- data/lib/aws-sdk-s3/resource.rb +2 -2
- data/lib/aws-sdk-s3/types.rb +48 -17
- data/lib/aws-sdk-s3.rb +1 -1
- data/sig/client.rbs +19 -0
- data/sig/object.rbs +6 -0
- data/sig/object_version.rbs +6 -0
- data/sig/resource.rbs +1 -0
- data/sig/types.rbs +6 -0
- data/sig/waiters.rbs +12 -0
- metadata +6 -6
data/lib/aws-sdk-s3/client.rb
CHANGED
@@ -131,6 +131,11 @@ module Aws::S3
|
|
131
131
|
|
132
132
|
# @overload initialize(options)
|
133
133
|
# @param [Hash] options
|
134
|
+
#
|
135
|
+
# @option options [Array<Seahorse::Client::Plugin>] :plugins ([]])
|
136
|
+
# A list of plugins to apply to the client. Each plugin is either a
|
137
|
+
# class name or an instance of a plugin class.
|
138
|
+
#
|
134
139
|
# @option options [required, Aws::CredentialProvider] :credentials
|
135
140
|
# Your AWS credentials. This can be an instance of any one of the
|
136
141
|
# following classes:
|
@@ -271,7 +276,6 @@ module Aws::S3
|
|
271
276
|
# 'https://example.com'
|
272
277
|
# 'http://example.com:123'
|
273
278
|
#
|
274
|
-
#
|
275
279
|
# @option options [Integer] :endpoint_cache_max_entries (1000)
|
276
280
|
# Used for the maximum size limit of the LRU cache storing endpoints data
|
277
281
|
# for endpoint discovery enabled operations. Defaults to 1000.
|
@@ -386,7 +390,6 @@ module Aws::S3
|
|
386
390
|
# throttling. This is a provisional mode that may change behavior
|
387
391
|
# in the future.
|
388
392
|
#
|
389
|
-
#
|
390
393
|
# @option options [Boolean] :s3_disable_multiregion_access_points (false)
|
391
394
|
# When set to `false` this will option will raise errors when multi-region
|
392
395
|
# access point ARNs are used. Multi-region access points can potentially
|
@@ -411,6 +414,15 @@ module Aws::S3
|
|
411
414
|
#
|
412
415
|
# @option options [String] :session_token
|
413
416
|
#
|
417
|
+
# @option options [Array] :sigv4a_signing_region_set
|
418
|
+
# A list of regions that should be signed with SigV4a signing. When
|
419
|
+
# not passed, a default `:sigv4a_signing_region_set` is searched for
|
420
|
+
# in the following locations:
|
421
|
+
#
|
422
|
+
# * `Aws.config[:sigv4a_signing_region_set]`
|
423
|
+
# * `ENV['AWS_SIGV4A_SIGNING_REGION_SET']`
|
424
|
+
# * `~/.aws/config`
|
425
|
+
#
|
414
426
|
# @option options [Boolean] :stub_responses (false)
|
415
427
|
# Causes the client to return stubbed responses. By default
|
416
428
|
# fake responses are generated and returned. You can specify
|
@@ -1201,8 +1213,7 @@ module Aws::S3
|
|
1201
1213
|
# : When the request is an HTTP 1.1 request, the response is chunk
|
1202
1214
|
# encoded. When the request is not an HTTP 1.1 request, the response
|
1203
1215
|
# would not contain the `Content-Length`. You always need to read the
|
1204
|
-
# entire response body to check if the copy succeeds.
|
1205
|
-
# connection alive while we copy the data.
|
1216
|
+
# entire response body to check if the copy succeeds.
|
1206
1217
|
#
|
1207
1218
|
# * If the copy is successful, you receive a response with information
|
1208
1219
|
# about the copied object.
|
@@ -2328,33 +2339,33 @@ module Aws::S3
|
|
2328
2339
|
# * {Types::CreateBucketOutput#location #location} => String
|
2329
2340
|
#
|
2330
2341
|
#
|
2331
|
-
# @example Example: To create a bucket
|
2342
|
+
# @example Example: To create a bucket in a specific region
|
2332
2343
|
#
|
2333
|
-
# # The following example creates a bucket.
|
2344
|
+
# # The following example creates a bucket. The request specifies an AWS region where to create the bucket.
|
2334
2345
|
#
|
2335
2346
|
# resp = client.create_bucket({
|
2336
2347
|
# bucket: "examplebucket",
|
2348
|
+
# create_bucket_configuration: {
|
2349
|
+
# location_constraint: "eu-west-1",
|
2350
|
+
# },
|
2337
2351
|
# })
|
2338
2352
|
#
|
2339
2353
|
# resp.to_h outputs the following:
|
2340
2354
|
# {
|
2341
|
-
# location: "/
|
2355
|
+
# location: "http://examplebucket.<Region>.s3.amazonaws.com/",
|
2342
2356
|
# }
|
2343
2357
|
#
|
2344
|
-
# @example Example: To create a bucket
|
2358
|
+
# @example Example: To create a bucket
|
2345
2359
|
#
|
2346
|
-
# # The following example creates a bucket.
|
2360
|
+
# # The following example creates a bucket.
|
2347
2361
|
#
|
2348
2362
|
# resp = client.create_bucket({
|
2349
2363
|
# bucket: "examplebucket",
|
2350
|
-
# create_bucket_configuration: {
|
2351
|
-
# location_constraint: "eu-west-1",
|
2352
|
-
# },
|
2353
2364
|
# })
|
2354
2365
|
#
|
2355
2366
|
# resp.to_h outputs the following:
|
2356
2367
|
# {
|
2357
|
-
# location: "
|
2368
|
+
# location: "/examplebucket",
|
2358
2369
|
# }
|
2359
2370
|
#
|
2360
2371
|
# @example Request syntax with placeholder values
|
@@ -4487,15 +4498,6 @@ module Aws::S3
|
|
4487
4498
|
# * {Types::DeleteObjectOutput#request_charged #request_charged} => String
|
4488
4499
|
#
|
4489
4500
|
#
|
4490
|
-
# @example Example: To delete an object (from a non-versioned bucket)
|
4491
|
-
#
|
4492
|
-
# # The following example deletes an object from a non-versioned bucket.
|
4493
|
-
#
|
4494
|
-
# resp = client.delete_object({
|
4495
|
-
# bucket: "ExampleBucket",
|
4496
|
-
# key: "HappyFace.jpg",
|
4497
|
-
# })
|
4498
|
-
#
|
4499
4501
|
# @example Example: To delete an object
|
4500
4502
|
#
|
4501
4503
|
# # The following example deletes an object from an S3 bucket.
|
@@ -4509,6 +4511,15 @@ module Aws::S3
|
|
4509
4511
|
# {
|
4510
4512
|
# }
|
4511
4513
|
#
|
4514
|
+
# @example Example: To delete an object (from a non-versioned bucket)
|
4515
|
+
#
|
4516
|
+
# # The following example deletes an object from a non-versioned bucket.
|
4517
|
+
#
|
4518
|
+
# resp = client.delete_object({
|
4519
|
+
# bucket: "ExampleBucket",
|
4520
|
+
# key: "HappyFace.jpg",
|
4521
|
+
# })
|
4522
|
+
#
|
4512
4523
|
# @example Request syntax with placeholder values
|
4513
4524
|
#
|
4514
4525
|
# resp = client.delete_object({
|
@@ -4717,7 +4728,7 @@ module Aws::S3
|
|
4717
4728
|
# permission.
|
4718
4729
|
#
|
4719
4730
|
# * <b> <code>s3:DeleteObjectVersion</code> </b> - To delete a
|
4720
|
-
# specific version of an object from a
|
4731
|
+
# specific version of an object from a versioning-enabled bucket,
|
4721
4732
|
# you must specify the `s3:DeleteObjectVersion` permission.
|
4722
4733
|
#
|
4723
4734
|
# * **Directory bucket permissions** - To grant access to this API
|
@@ -8735,49 +8746,49 @@ module Aws::S3
|
|
8735
8746
|
# * {Types::GetObjectTaggingOutput#tag_set #tag_set} => Array<Types::Tag>
|
8736
8747
|
#
|
8737
8748
|
#
|
8738
|
-
# @example Example: To retrieve tag set of
|
8749
|
+
# @example Example: To retrieve tag set of a specific object version
|
8739
8750
|
#
|
8740
|
-
# # The following example retrieves tag set of an object.
|
8751
|
+
# # The following example retrieves tag set of an object. The request specifies object version.
|
8741
8752
|
#
|
8742
8753
|
# resp = client.get_object_tagging({
|
8743
8754
|
# bucket: "examplebucket",
|
8744
|
-
# key: "
|
8755
|
+
# key: "exampleobject",
|
8756
|
+
# version_id: "ydlaNkwWm0SfKJR.T1b1fIdPRbldTYRI",
|
8745
8757
|
# })
|
8746
8758
|
#
|
8747
8759
|
# resp.to_h outputs the following:
|
8748
8760
|
# {
|
8749
8761
|
# tag_set: [
|
8750
8762
|
# {
|
8751
|
-
# key: "
|
8752
|
-
# value: "
|
8753
|
-
# },
|
8754
|
-
# {
|
8755
|
-
# key: "Key3",
|
8756
|
-
# value: "Value3",
|
8763
|
+
# key: "Key1",
|
8764
|
+
# value: "Value1",
|
8757
8765
|
# },
|
8758
8766
|
# ],
|
8759
|
-
# version_id: "
|
8767
|
+
# version_id: "ydlaNkwWm0SfKJR.T1b1fIdPRbldTYRI",
|
8760
8768
|
# }
|
8761
8769
|
#
|
8762
|
-
# @example Example: To retrieve tag set of
|
8770
|
+
# @example Example: To retrieve tag set of an object
|
8763
8771
|
#
|
8764
|
-
# # The following example retrieves tag set of an object.
|
8772
|
+
# # The following example retrieves tag set of an object.
|
8765
8773
|
#
|
8766
8774
|
# resp = client.get_object_tagging({
|
8767
8775
|
# bucket: "examplebucket",
|
8768
|
-
# key: "
|
8769
|
-
# version_id: "ydlaNkwWm0SfKJR.T1b1fIdPRbldTYRI",
|
8776
|
+
# key: "HappyFace.jpg",
|
8770
8777
|
# })
|
8771
8778
|
#
|
8772
8779
|
# resp.to_h outputs the following:
|
8773
8780
|
# {
|
8774
8781
|
# tag_set: [
|
8775
8782
|
# {
|
8776
|
-
# key: "
|
8777
|
-
# value: "
|
8783
|
+
# key: "Key4",
|
8784
|
+
# value: "Value4",
|
8785
|
+
# },
|
8786
|
+
# {
|
8787
|
+
# key: "Key3",
|
8788
|
+
# value: "Value3",
|
8778
8789
|
# },
|
8779
8790
|
# ],
|
8780
|
-
# version_id: "
|
8791
|
+
# version_id: "null",
|
8781
8792
|
# }
|
8782
8793
|
#
|
8783
8794
|
# @example Request syntax with placeholder values
|
@@ -9423,6 +9434,24 @@ module Aws::S3
|
|
9423
9434
|
# the Range is not satisfiable, S3 returns a `416 - Requested Range Not
|
9424
9435
|
# Satisfiable` error.
|
9425
9436
|
#
|
9437
|
+
# @option params [String] :response_cache_control
|
9438
|
+
# Sets the `Cache-Control` header of the response.
|
9439
|
+
#
|
9440
|
+
# @option params [String] :response_content_disposition
|
9441
|
+
# Sets the `Content-Disposition` header of the response.
|
9442
|
+
#
|
9443
|
+
# @option params [String] :response_content_encoding
|
9444
|
+
# Sets the `Content-Encoding` header of the response.
|
9445
|
+
#
|
9446
|
+
# @option params [String] :response_content_language
|
9447
|
+
# Sets the `Content-Language` header of the response.
|
9448
|
+
#
|
9449
|
+
# @option params [String] :response_content_type
|
9450
|
+
# Sets the `Content-Type` header of the response.
|
9451
|
+
#
|
9452
|
+
# @option params [Time,DateTime,Date,Integer,String] :response_expires
|
9453
|
+
# Sets the `Expires` header of the response.
|
9454
|
+
#
|
9426
9455
|
# @option params [String] :version_id
|
9427
9456
|
# Version ID used to reference a specific version of the object.
|
9428
9457
|
#
|
@@ -9565,6 +9594,12 @@ module Aws::S3
|
|
9565
9594
|
# if_unmodified_since: Time.now,
|
9566
9595
|
# key: "ObjectKey", # required
|
9567
9596
|
# range: "Range",
|
9597
|
+
# response_cache_control: "ResponseCacheControl",
|
9598
|
+
# response_content_disposition: "ResponseContentDisposition",
|
9599
|
+
# response_content_encoding: "ResponseContentEncoding",
|
9600
|
+
# response_content_language: "ResponseContentLanguage",
|
9601
|
+
# response_content_type: "ResponseContentType",
|
9602
|
+
# response_expires: Time.now,
|
9568
9603
|
# version_id: "ObjectVersionId",
|
9569
9604
|
# sse_customer_algorithm: "SSECustomerAlgorithm",
|
9570
9605
|
# sse_customer_key: "SSECustomerKey",
|
@@ -11182,8 +11217,8 @@ module Aws::S3
|
|
11182
11217
|
# @option params [String] :encoding_type
|
11183
11218
|
# Encoding type used by Amazon S3 to encode object keys in the response.
|
11184
11219
|
# If using `url`, non-ASCII characters used in an object's key name
|
11185
|
-
# will be URL encoded. For example, the object
|
11186
|
-
# appear as
|
11220
|
+
# will be URL encoded. For example, the object `test_file(3).png` will
|
11221
|
+
# appear as `test_file%283%29.png`.
|
11187
11222
|
#
|
11188
11223
|
# @option params [Integer] :max_keys
|
11189
11224
|
# Sets the maximum number of keys returned in the response. By default,
|
@@ -15410,96 +15445,100 @@ module Aws::S3
|
|
15410
15445
|
# * {Types::PutObjectOutput#request_charged #request_charged} => String
|
15411
15446
|
#
|
15412
15447
|
#
|
15413
|
-
# @example Example: To upload object
|
15448
|
+
# @example Example: To upload an object
|
15414
15449
|
#
|
15415
|
-
# # The following example
|
15416
|
-
# #
|
15450
|
+
# # The following example uploads an object to a versioning-enabled bucket. The source file is specified using Windows file
|
15451
|
+
# # syntax. S3 returns VersionId of the newly created object.
|
15417
15452
|
#
|
15418
15453
|
# resp = client.put_object({
|
15419
|
-
# body: "
|
15454
|
+
# body: "HappyFace.jpg",
|
15420
15455
|
# bucket: "examplebucket",
|
15421
|
-
# key: "
|
15422
|
-
# metadata: {
|
15423
|
-
# "metadata1" => "value1",
|
15424
|
-
# "metadata2" => "value2",
|
15425
|
-
# },
|
15456
|
+
# key: "HappyFace.jpg",
|
15426
15457
|
# })
|
15427
15458
|
#
|
15428
15459
|
# resp.to_h outputs the following:
|
15429
15460
|
# {
|
15430
15461
|
# etag: "\"6805f2cfc46c0f04559748bb039d69ae\"",
|
15431
|
-
# version_id: "
|
15462
|
+
# version_id: "tpf3zF08nBplQK1XLOefGskR7mGDwcDk",
|
15432
15463
|
# }
|
15433
15464
|
#
|
15434
|
-
# @example Example: To upload an object
|
15465
|
+
# @example Example: To upload an object and specify server-side encryption and object tags
|
15435
15466
|
#
|
15436
|
-
# # The following example uploads an object. The request specifies optional
|
15437
|
-
# #
|
15467
|
+
# # The following example uploads an object. The request specifies the optional server-side encryption option. The request
|
15468
|
+
# # also specifies optional object tags. If the bucket is versioning enabled, S3 returns version ID in response.
|
15438
15469
|
#
|
15439
15470
|
# resp = client.put_object({
|
15440
|
-
# body: "
|
15471
|
+
# body: "filetoupload",
|
15441
15472
|
# bucket: "examplebucket",
|
15442
|
-
# key: "
|
15473
|
+
# key: "exampleobject",
|
15443
15474
|
# server_side_encryption: "AES256",
|
15444
|
-
#
|
15475
|
+
# tagging: "key1=value1&key2=value2",
|
15445
15476
|
# })
|
15446
15477
|
#
|
15447
15478
|
# resp.to_h outputs the following:
|
15448
15479
|
# {
|
15449
15480
|
# etag: "\"6805f2cfc46c0f04559748bb039d69ae\"",
|
15450
15481
|
# server_side_encryption: "AES256",
|
15451
|
-
# version_id: "
|
15482
|
+
# version_id: "Ri.vC6qVlA4dEnjgRV4ZHsHoFIjqEMNt",
|
15452
15483
|
# }
|
15453
15484
|
#
|
15454
|
-
# @example Example: To upload an object
|
15485
|
+
# @example Example: To upload an object (specify optional headers)
|
15455
15486
|
#
|
15456
|
-
# # The following example uploads an object. The request specifies optional
|
15457
|
-
# #
|
15487
|
+
# # The following example uploads an object. The request specifies optional request headers to directs S3 to use specific
|
15488
|
+
# # storage class and use server-side encryption.
|
15458
15489
|
#
|
15459
15490
|
# resp = client.put_object({
|
15460
|
-
# body: "
|
15491
|
+
# body: "HappyFace.jpg",
|
15461
15492
|
# bucket: "examplebucket",
|
15462
15493
|
# key: "HappyFace.jpg",
|
15463
|
-
#
|
15494
|
+
# server_side_encryption: "AES256",
|
15495
|
+
# storage_class: "STANDARD_IA",
|
15464
15496
|
# })
|
15465
15497
|
#
|
15466
15498
|
# resp.to_h outputs the following:
|
15467
15499
|
# {
|
15468
15500
|
# etag: "\"6805f2cfc46c0f04559748bb039d69ae\"",
|
15469
|
-
#
|
15501
|
+
# server_side_encryption: "AES256",
|
15502
|
+
# version_id: "CG612hodqujkf8FaaNfp8U..FIhLROcp",
|
15470
15503
|
# }
|
15471
15504
|
#
|
15472
|
-
# @example Example: To
|
15505
|
+
# @example Example: To upload object and specify user-defined metadata
|
15473
15506
|
#
|
15474
|
-
# # The following example creates an object.
|
15507
|
+
# # The following example creates an object. The request also specifies optional metadata. If the bucket is versioning
|
15508
|
+
# # enabled, S3 returns version ID in response.
|
15475
15509
|
#
|
15476
15510
|
# resp = client.put_object({
|
15477
15511
|
# body: "filetoupload",
|
15478
15512
|
# bucket: "examplebucket",
|
15479
|
-
# key: "
|
15513
|
+
# key: "exampleobject",
|
15514
|
+
# metadata: {
|
15515
|
+
# "metadata1" => "value1",
|
15516
|
+
# "metadata2" => "value2",
|
15517
|
+
# },
|
15480
15518
|
# })
|
15481
15519
|
#
|
15482
15520
|
# resp.to_h outputs the following:
|
15483
15521
|
# {
|
15484
15522
|
# etag: "\"6805f2cfc46c0f04559748bb039d69ae\"",
|
15485
|
-
# version_id: "
|
15523
|
+
# version_id: "pSKidl4pHBiNwukdbcPXAIs.sshFFOc0",
|
15486
15524
|
# }
|
15487
15525
|
#
|
15488
|
-
# @example Example: To upload an object
|
15526
|
+
# @example Example: To upload an object and specify optional tags
|
15489
15527
|
#
|
15490
|
-
# # The following example uploads an object
|
15491
|
-
# #
|
15528
|
+
# # The following example uploads an object. The request specifies optional object tags. The bucket is versioned, therefore
|
15529
|
+
# # S3 returns version ID of the newly created object.
|
15492
15530
|
#
|
15493
15531
|
# resp = client.put_object({
|
15494
|
-
# body: "HappyFace.jpg",
|
15532
|
+
# body: "c:\\HappyFace.jpg",
|
15495
15533
|
# bucket: "examplebucket",
|
15496
15534
|
# key: "HappyFace.jpg",
|
15535
|
+
# tagging: "key1=value1&key2=value2",
|
15497
15536
|
# })
|
15498
15537
|
#
|
15499
15538
|
# resp.to_h outputs the following:
|
15500
15539
|
# {
|
15501
15540
|
# etag: "\"6805f2cfc46c0f04559748bb039d69ae\"",
|
15502
|
-
# version_id: "
|
15541
|
+
# version_id: "psM2sYY4.o1501dSx8wMvnkOzSBB.V4a",
|
15503
15542
|
# }
|
15504
15543
|
#
|
15505
15544
|
# @example Example: To upload an object and specify canned ACL.
|
@@ -15520,24 +15559,20 @@ module Aws::S3
|
|
15520
15559
|
# version_id: "Kirh.unyZwjQ69YxcQLA8z4F5j3kJJKr",
|
15521
15560
|
# }
|
15522
15561
|
#
|
15523
|
-
# @example Example: To
|
15562
|
+
# @example Example: To create an object.
|
15524
15563
|
#
|
15525
|
-
# # The following example
|
15526
|
-
# # also specifies optional object tags. If the bucket is versioning enabled, S3 returns version ID in response.
|
15564
|
+
# # The following example creates an object. If the bucket is versioning enabled, S3 returns version ID in response.
|
15527
15565
|
#
|
15528
15566
|
# resp = client.put_object({
|
15529
15567
|
# body: "filetoupload",
|
15530
15568
|
# bucket: "examplebucket",
|
15531
|
-
# key: "
|
15532
|
-
# server_side_encryption: "AES256",
|
15533
|
-
# tagging: "key1=value1&key2=value2",
|
15569
|
+
# key: "objectkey",
|
15534
15570
|
# })
|
15535
15571
|
#
|
15536
15572
|
# resp.to_h outputs the following:
|
15537
15573
|
# {
|
15538
15574
|
# etag: "\"6805f2cfc46c0f04559748bb039d69ae\"",
|
15539
|
-
#
|
15540
|
-
# version_id: "Ri.vC6qVlA4dEnjgRV4ZHsHoFIjqEMNt",
|
15575
|
+
# version_id: "Bvq0EDKxOcXLJXNo_Lkz37eM3R4pfzyQ",
|
15541
15576
|
# }
|
15542
15577
|
#
|
15543
15578
|
# @example Streaming a file from disk
|
@@ -17960,7 +17995,7 @@ module Aws::S3
|
|
17960
17995
|
# the object copy to the destination bucket.
|
17961
17996
|
#
|
17962
17997
|
# For information about permissions required to use the multipart
|
17963
|
-
# upload API, see [Multipart
|
17998
|
+
# upload API, see [Multipart upload API and permissions][7] in the
|
17964
17999
|
# *Amazon S3 User Guide*.
|
17965
18000
|
#
|
17966
18001
|
# * **Directory bucket permissions** - You must have permissions in a
|
@@ -17970,9 +18005,9 @@ module Aws::S3
|
|
17970
18005
|
# * If the source object that you want to copy is in a directory
|
17971
18006
|
# bucket, you must have the <b>
|
17972
18007
|
# <code>s3express:CreateSession</code> </b> permission in the
|
17973
|
-
# `Action` element of a policy to read the object
|
17974
|
-
#
|
17975
|
-
#
|
18008
|
+
# `Action` element of a policy to read the object. By default, the
|
18009
|
+
# session is in the `ReadWrite` mode. If you want to restrict the
|
18010
|
+
# access, you can explicitly set the `s3express:SessionMode`
|
17976
18011
|
# condition key to `ReadOnly` on the copy source bucket.
|
17977
18012
|
#
|
17978
18013
|
# * If the copy destination is a directory bucket, you must have the
|
@@ -18039,7 +18074,7 @@ module Aws::S3
|
|
18039
18074
|
# [4]: https://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectOperations.html
|
18040
18075
|
# [5]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-express-Regions-and-Zones.html
|
18041
18076
|
# [6]: https://docs.aws.amazon.com/AmazonS3/latest/dev/RESTAuthentication.html
|
18042
|
-
# [7]: https://docs.aws.amazon.com/AmazonS3/latest/
|
18077
|
+
# [7]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/mpuoverview.html#mpuAndPermissions
|
18043
18078
|
# [8]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-express-security-iam-example-bucket-policies.html
|
18044
18079
|
# [9]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-express-security-iam-identity-policies.html
|
18045
18080
|
# [10]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_CopyObject.html
|
@@ -18828,7 +18863,7 @@ module Aws::S3
|
|
18828
18863
|
params: params,
|
18829
18864
|
config: config)
|
18830
18865
|
context[:gem_name] = 'aws-sdk-s3'
|
18831
|
-
context[:gem_version] = '1.
|
18866
|
+
context[:gem_version] = '1.156.0'
|
18832
18867
|
Seahorse::Client::Request.new(handlers, context)
|
18833
18868
|
end
|
18834
18869
|
|
@@ -817,7 +817,7 @@ module Aws::S3
|
|
817
817
|
CopyObjectRequest.add_member(:content_encoding, Shapes::ShapeRef.new(shape: ContentEncoding, location: "header", location_name: "Content-Encoding"))
|
818
818
|
CopyObjectRequest.add_member(:content_language, Shapes::ShapeRef.new(shape: ContentLanguage, location: "header", location_name: "Content-Language"))
|
819
819
|
CopyObjectRequest.add_member(:content_type, Shapes::ShapeRef.new(shape: ContentType, location: "header", location_name: "Content-Type"))
|
820
|
-
CopyObjectRequest.add_member(:copy_source, Shapes::ShapeRef.new(shape: CopySource, required: true, location: "header", location_name: "x-amz-copy-source"))
|
820
|
+
CopyObjectRequest.add_member(:copy_source, Shapes::ShapeRef.new(shape: CopySource, required: true, location: "header", location_name: "x-amz-copy-source", metadata: {"contextParam"=>{"name"=>"CopySource"}}))
|
821
821
|
CopyObjectRequest.add_member(:copy_source_if_match, Shapes::ShapeRef.new(shape: CopySourceIfMatch, location: "header", location_name: "x-amz-copy-source-if-match"))
|
822
822
|
CopyObjectRequest.add_member(:copy_source_if_modified_since, Shapes::ShapeRef.new(shape: CopySourceIfModifiedSince, location: "header", location_name: "x-amz-copy-source-if-modified-since"))
|
823
823
|
CopyObjectRequest.add_member(:copy_source_if_none_match, Shapes::ShapeRef.new(shape: CopySourceIfNoneMatch, location: "header", location_name: "x-amz-copy-source-if-none-match"))
|
@@ -827,7 +827,7 @@ module Aws::S3
|
|
827
827
|
CopyObjectRequest.add_member(:grant_read, Shapes::ShapeRef.new(shape: GrantRead, location: "header", location_name: "x-amz-grant-read"))
|
828
828
|
CopyObjectRequest.add_member(:grant_read_acp, Shapes::ShapeRef.new(shape: GrantReadACP, location: "header", location_name: "x-amz-grant-read-acp"))
|
829
829
|
CopyObjectRequest.add_member(:grant_write_acp, Shapes::ShapeRef.new(shape: GrantWriteACP, location: "header", location_name: "x-amz-grant-write-acp"))
|
830
|
-
CopyObjectRequest.add_member(:key, Shapes::ShapeRef.new(shape: ObjectKey, required: true, location: "uri", location_name: "Key"))
|
830
|
+
CopyObjectRequest.add_member(:key, Shapes::ShapeRef.new(shape: ObjectKey, required: true, location: "uri", location_name: "Key", metadata: {"contextParam"=>{"name"=>"Key"}}))
|
831
831
|
CopyObjectRequest.add_member(:metadata, Shapes::ShapeRef.new(shape: Metadata, location: "headers", location_name: "x-amz-meta-"))
|
832
832
|
CopyObjectRequest.add_member(:metadata_directive, Shapes::ShapeRef.new(shape: MetadataDirective, location: "header", location_name: "x-amz-metadata-directive"))
|
833
833
|
CopyObjectRequest.add_member(:tagging_directive, Shapes::ShapeRef.new(shape: TaggingDirective, location: "header", location_name: "x-amz-tagging-directive"))
|
@@ -1531,6 +1531,12 @@ module Aws::S3
|
|
1531
1531
|
HeadObjectRequest.add_member(:if_unmodified_since, Shapes::ShapeRef.new(shape: IfUnmodifiedSince, location: "header", location_name: "If-Unmodified-Since"))
|
1532
1532
|
HeadObjectRequest.add_member(:key, Shapes::ShapeRef.new(shape: ObjectKey, required: true, location: "uri", location_name: "Key", metadata: {"contextParam"=>{"name"=>"Key"}}))
|
1533
1533
|
HeadObjectRequest.add_member(:range, Shapes::ShapeRef.new(shape: Range, location: "header", location_name: "Range"))
|
1534
|
+
HeadObjectRequest.add_member(:response_cache_control, Shapes::ShapeRef.new(shape: ResponseCacheControl, location: "querystring", location_name: "response-cache-control"))
|
1535
|
+
HeadObjectRequest.add_member(:response_content_disposition, Shapes::ShapeRef.new(shape: ResponseContentDisposition, location: "querystring", location_name: "response-content-disposition"))
|
1536
|
+
HeadObjectRequest.add_member(:response_content_encoding, Shapes::ShapeRef.new(shape: ResponseContentEncoding, location: "querystring", location_name: "response-content-encoding"))
|
1537
|
+
HeadObjectRequest.add_member(:response_content_language, Shapes::ShapeRef.new(shape: ResponseContentLanguage, location: "querystring", location_name: "response-content-language"))
|
1538
|
+
HeadObjectRequest.add_member(:response_content_type, Shapes::ShapeRef.new(shape: ResponseContentType, location: "querystring", location_name: "response-content-type"))
|
1539
|
+
HeadObjectRequest.add_member(:response_expires, Shapes::ShapeRef.new(shape: ResponseExpires, location: "querystring", location_name: "response-expires"))
|
1534
1540
|
HeadObjectRequest.add_member(:version_id, Shapes::ShapeRef.new(shape: ObjectVersionId, location: "querystring", location_name: "versionId"))
|
1535
1541
|
HeadObjectRequest.add_member(:sse_customer_algorithm, Shapes::ShapeRef.new(shape: SSECustomerAlgorithm, location: "header", location_name: "x-amz-server-side-encryption-customer-algorithm"))
|
1536
1542
|
HeadObjectRequest.add_member(:sse_customer_key, Shapes::ShapeRef.new(shape: SSECustomerKey, location: "header", location_name: "x-amz-server-side-encryption-customer-key"))
|
@@ -2760,6 +2766,7 @@ module Aws::S3
|
|
2760
2766
|
|
2761
2767
|
api.metadata = {
|
2762
2768
|
"apiVersion" => "2006-03-01",
|
2769
|
+
"auth" => ["aws.auth#sigv4"],
|
2763
2770
|
"checksumFormat" => "md5",
|
2764
2771
|
"endpointPrefix" => "s3",
|
2765
2772
|
"globalEndpoint" => "s3.amazonaws.com",
|
@@ -3829,6 +3836,7 @@ module Aws::S3
|
|
3829
3836
|
o.http_method = "POST"
|
3830
3837
|
o.http_request_uri = "/WriteGetObjectResponse"
|
3831
3838
|
o['authtype'] = "v4-unsigned-body"
|
3839
|
+
o['unsignedPayload'] = true
|
3832
3840
|
o.endpoint_pattern = {
|
3833
3841
|
"hostPrefix" => "{RequestRoute}.",
|
3834
3842
|
}
|
@@ -134,7 +134,7 @@ module Aws
|
|
134
134
|
|
135
135
|
# @api private
|
136
136
|
def load
|
137
|
-
@data = Aws::Plugins::UserAgent.
|
137
|
+
@data = Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
|
138
138
|
client.list_buckets.buckets.find { |b| b.name == name }
|
139
139
|
end
|
140
140
|
raise "unable to load bucket #{name}" if @data.nil?
|
@@ -76,7 +76,7 @@ module Aws
|
|
76
76
|
# @see #copy_to
|
77
77
|
#
|
78
78
|
def copy_from(source, options = {})
|
79
|
-
Aws::Plugins::UserAgent.
|
79
|
+
Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
|
80
80
|
if Hash === source && source[:copy_source]
|
81
81
|
# for backwards compatibility
|
82
82
|
@client.copy_object(source.merge(bucket: bucket_name, key: key))
|
@@ -119,7 +119,7 @@ module Aws
|
|
119
119
|
# object.copy_to('src-bucket/src-key', multipart_copy: true)
|
120
120
|
#
|
121
121
|
def copy_to(target, options = {})
|
122
|
-
Aws::Plugins::UserAgent.
|
122
|
+
Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
|
123
123
|
ObjectCopier.new(self, options).copy_to(target, options)
|
124
124
|
end
|
125
125
|
end
|
@@ -390,7 +390,7 @@ module Aws
|
|
390
390
|
tempfile: uploading_options.delete(:tempfile),
|
391
391
|
part_size: uploading_options.delete(:part_size)
|
392
392
|
)
|
393
|
-
Aws::Plugins::UserAgent.
|
393
|
+
Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
|
394
394
|
uploader.upload(
|
395
395
|
uploading_options.merge(bucket: bucket_name, key: key),
|
396
396
|
&block
|
@@ -473,7 +473,7 @@ module Aws
|
|
473
473
|
multipart_threshold: uploading_options.delete(:multipart_threshold),
|
474
474
|
client: client
|
475
475
|
)
|
476
|
-
response = Aws::Plugins::UserAgent.
|
476
|
+
response = Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
|
477
477
|
uploader.upload(
|
478
478
|
source,
|
479
479
|
uploading_options.merge(bucket: bucket_name, key: key)
|
@@ -551,7 +551,7 @@ module Aws
|
|
551
551
|
# @see Client#head_object
|
552
552
|
def download_file(destination, options = {})
|
553
553
|
downloader = FileDownloader.new(client: client)
|
554
|
-
Aws::Plugins::UserAgent.
|
554
|
+
Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
|
555
555
|
downloader.download(
|
556
556
|
destination,
|
557
557
|
options.merge(bucket: bucket_name, key: key)
|
@@ -270,7 +270,7 @@ module Aws
|
|
270
270
|
envelope_location: @envelope_location,
|
271
271
|
instruction_file_suffix: @instruction_file_suffix,
|
272
272
|
}
|
273
|
-
Aws::Plugins::UserAgent.
|
273
|
+
Aws::Plugins::UserAgent.metric('S3_CRYPTO_V1N') do
|
274
274
|
req.send_request
|
275
275
|
end
|
276
276
|
end
|
@@ -300,7 +300,7 @@ module Aws
|
|
300
300
|
envelope_location: envelope_location,
|
301
301
|
instruction_file_suffix: instruction_file_suffix,
|
302
302
|
}
|
303
|
-
Aws::Plugins::UserAgent.
|
303
|
+
Aws::Plugins::UserAgent.metric('S3_CRYPTO_V1N') do
|
304
304
|
req.send_request(target: block)
|
305
305
|
end
|
306
306
|
end
|
@@ -17,7 +17,7 @@ module Aws
|
|
17
17
|
# envelope and encryption cipher.
|
18
18
|
def encryption_cipher
|
19
19
|
encryption_context = { "kms_cmk_id" => @kms_key_id }
|
20
|
-
key_data = Aws::Plugins::UserAgent.
|
20
|
+
key_data = Aws::Plugins::UserAgent.metric('S3_CRYPTO_V1N') do
|
21
21
|
@kms_client.generate_data_key(
|
22
22
|
key_id: @kms_key_id,
|
23
23
|
encryption_context: encryption_context,
|
@@ -60,7 +60,7 @@ module Aws
|
|
60
60
|
"#{envelope['x-amz-wrap-alg']}"
|
61
61
|
end
|
62
62
|
|
63
|
-
key = Aws::Plugins::UserAgent.
|
63
|
+
key = Aws::Plugins::UserAgent.metric('S3_CRYPTO_V1N') do
|
64
64
|
@kms_client.decrypt(
|
65
65
|
ciphertext_blob: decode64(envelope['x-amz-key-v2']),
|
66
66
|
encryption_context: encryption_context
|
@@ -361,7 +361,7 @@ module Aws
|
|
361
361
|
instruction_file_suffix: @instruction_file_suffix,
|
362
362
|
kms_encryption_context: kms_encryption_context
|
363
363
|
}
|
364
|
-
Aws::Plugins::UserAgent.
|
364
|
+
Aws::Plugins::UserAgent.metric('S3_CRYPTO_V2') do
|
365
365
|
req.send_request
|
366
366
|
end
|
367
367
|
end
|
@@ -416,7 +416,7 @@ module Aws
|
|
416
416
|
kms_allow_decrypt_with_any_cmk: kms_any_cmk_mode,
|
417
417
|
security_profile: security_profile
|
418
418
|
}
|
419
|
-
Aws::Plugins::UserAgent.
|
419
|
+
Aws::Plugins::UserAgent.metric('S3_CRYPTO_V2') do
|
420
420
|
req.send_request(target: block)
|
421
421
|
end
|
422
422
|
end
|
@@ -24,7 +24,7 @@ module Aws
|
|
24
24
|
def encryption_cipher(options = {})
|
25
25
|
validate_key_for_encryption
|
26
26
|
encryption_context = build_encryption_context(@content_encryption_schema, options)
|
27
|
-
key_data = Aws::Plugins::UserAgent.
|
27
|
+
key_data = Aws::Plugins::UserAgent.metric('S3_CRYPTO_V2') do
|
28
28
|
@kms_client.generate_data_key(
|
29
29
|
key_id: @kms_key_id,
|
30
30
|
encryption_context: encryption_context,
|
@@ -85,7 +85,7 @@ module Aws
|
|
85
85
|
decrypt_options[:key_id] = @kms_key_id
|
86
86
|
end
|
87
87
|
|
88
|
-
key = Aws::Plugins::UserAgent.
|
88
|
+
key = Aws::Plugins::UserAgent.metric('S3_CRYPTO_V2') do
|
89
89
|
@kms_client.decrypt(decrypt_options).plaintext
|
90
90
|
end
|
91
91
|
iv = decode64(envelope['x-amz-iv'])
|