aws-sdk-s3 1.151.0 → 1.153.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +25 -0
- data/VERSION +1 -1
- data/lib/aws-sdk-s3/bucket.rb +10 -10
- 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 +66 -63
- data/lib/aws-sdk-s3/client_api.rb +2 -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 +12 -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 +5 -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.rb +1 -1
- metadata +4 -4
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
|
@@ -4918,20 +4921,22 @@ module Aws::S3
|
|
4918
4921
|
# * {Types::DeleteObjectsOutput#errors #errors} => Array<Types::Error>
|
4919
4922
|
#
|
4920
4923
|
#
|
4921
|
-
# @example Example: To delete multiple
|
4924
|
+
# @example Example: To delete multiple object versions from a versioned bucket
|
4922
4925
|
#
|
4923
|
-
# # The following example deletes objects from a bucket. The
|
4924
|
-
# #
|
4926
|
+
# # The following example deletes objects from a bucket. The request specifies object versions. S3 deletes specific object
|
4927
|
+
# # versions and returns the key and versions of deleted objects in the response.
|
4925
4928
|
#
|
4926
4929
|
# resp = client.delete_objects({
|
4927
4930
|
# bucket: "examplebucket",
|
4928
4931
|
# delete: {
|
4929
4932
|
# objects: [
|
4930
4933
|
# {
|
4931
|
-
# key: "
|
4934
|
+
# key: "HappyFace.jpg",
|
4935
|
+
# version_id: "2LWg7lQLnY41.maGB5Z6SWW.dcq0vx7b",
|
4932
4936
|
# },
|
4933
4937
|
# {
|
4934
|
-
# key: "
|
4938
|
+
# key: "HappyFace.jpg",
|
4939
|
+
# version_id: "yoz3HB.ZhCS_tKVEmIOr7qYyyAaZSKVd",
|
4935
4940
|
# },
|
4936
4941
|
# ],
|
4937
4942
|
# quiet: false,
|
@@ -4942,34 +4947,30 @@ module Aws::S3
|
|
4942
4947
|
# {
|
4943
4948
|
# deleted: [
|
4944
4949
|
# {
|
4945
|
-
#
|
4946
|
-
#
|
4947
|
-
# key: "objectkey1",
|
4950
|
+
# key: "HappyFace.jpg",
|
4951
|
+
# version_id: "yoz3HB.ZhCS_tKVEmIOr7qYyyAaZSKVd",
|
4948
4952
|
# },
|
4949
4953
|
# {
|
4950
|
-
#
|
4951
|
-
#
|
4952
|
-
# key: "objectkey2",
|
4954
|
+
# key: "HappyFace.jpg",
|
4955
|
+
# version_id: "2LWg7lQLnY41.maGB5Z6SWW.dcq0vx7b",
|
4953
4956
|
# },
|
4954
4957
|
# ],
|
4955
4958
|
# }
|
4956
4959
|
#
|
4957
|
-
# @example Example: To delete multiple
|
4960
|
+
# @example Example: To delete multiple objects from a versioned bucket
|
4958
4961
|
#
|
4959
|
-
# # The following example deletes objects from a bucket. The
|
4960
|
-
# #
|
4962
|
+
# # The following example deletes objects from a bucket. The bucket is versioned, and the request does not specify the
|
4963
|
+
# # object version to delete. In this case, all versions remain in the bucket and S3 adds a delete marker.
|
4961
4964
|
#
|
4962
4965
|
# resp = client.delete_objects({
|
4963
4966
|
# bucket: "examplebucket",
|
4964
4967
|
# delete: {
|
4965
4968
|
# objects: [
|
4966
4969
|
# {
|
4967
|
-
# key: "
|
4968
|
-
# version_id: "2LWg7lQLnY41.maGB5Z6SWW.dcq0vx7b",
|
4970
|
+
# key: "objectkey1",
|
4969
4971
|
# },
|
4970
4972
|
# {
|
4971
|
-
# key: "
|
4972
|
-
# version_id: "yoz3HB.ZhCS_tKVEmIOr7qYyyAaZSKVd",
|
4973
|
+
# key: "objectkey2",
|
4973
4974
|
# },
|
4974
4975
|
# ],
|
4975
4976
|
# quiet: false,
|
@@ -4980,12 +4981,14 @@ module Aws::S3
|
|
4980
4981
|
# {
|
4981
4982
|
# deleted: [
|
4982
4983
|
# {
|
4983
|
-
#
|
4984
|
-
#
|
4984
|
+
# delete_marker: true,
|
4985
|
+
# delete_marker_version_id: "A._w1z6EFiCF5uhtQMDal9JDkID9tQ7F",
|
4986
|
+
# key: "objectkey1",
|
4985
4987
|
# },
|
4986
4988
|
# {
|
4987
|
-
#
|
4988
|
-
#
|
4989
|
+
# delete_marker: true,
|
4990
|
+
# delete_marker_version_id: "iOd_ORxhkKe_e8G8_oSGxt2PjsCZKlkt",
|
4991
|
+
# key: "objectkey2",
|
4989
4992
|
# },
|
4990
4993
|
# ],
|
4991
4994
|
# }
|
@@ -15410,25 +15413,40 @@ module Aws::S3
|
|
15410
15413
|
# * {Types::PutObjectOutput#request_charged #request_charged} => String
|
15411
15414
|
#
|
15412
15415
|
#
|
15413
|
-
# @example Example: To upload object and specify
|
15416
|
+
# @example Example: To upload an object and specify server-side encryption and object tags
|
15414
15417
|
#
|
15415
|
-
# # The following example
|
15416
|
-
# # enabled, S3 returns version ID in response.
|
15418
|
+
# # The following example uploads an object. The request specifies the optional server-side encryption option. The request
|
15419
|
+
# # also specifies optional object tags. If the bucket is versioning enabled, S3 returns version ID in response.
|
15417
15420
|
#
|
15418
15421
|
# resp = client.put_object({
|
15419
15422
|
# body: "filetoupload",
|
15420
15423
|
# bucket: "examplebucket",
|
15421
15424
|
# key: "exampleobject",
|
15422
|
-
#
|
15423
|
-
#
|
15424
|
-
# "metadata2" => "value2",
|
15425
|
-
# },
|
15425
|
+
# server_side_encryption: "AES256",
|
15426
|
+
# tagging: "key1=value1&key2=value2",
|
15426
15427
|
# })
|
15427
15428
|
#
|
15428
15429
|
# resp.to_h outputs the following:
|
15429
15430
|
# {
|
15430
15431
|
# etag: "\"6805f2cfc46c0f04559748bb039d69ae\"",
|
15431
|
-
#
|
15432
|
+
# server_side_encryption: "AES256",
|
15433
|
+
# version_id: "Ri.vC6qVlA4dEnjgRV4ZHsHoFIjqEMNt",
|
15434
|
+
# }
|
15435
|
+
#
|
15436
|
+
# @example Example: To create an object.
|
15437
|
+
#
|
15438
|
+
# # The following example creates an object. If the bucket is versioning enabled, S3 returns version ID in response.
|
15439
|
+
#
|
15440
|
+
# resp = client.put_object({
|
15441
|
+
# body: "filetoupload",
|
15442
|
+
# bucket: "examplebucket",
|
15443
|
+
# key: "objectkey",
|
15444
|
+
# })
|
15445
|
+
#
|
15446
|
+
# resp.to_h outputs the following:
|
15447
|
+
# {
|
15448
|
+
# etag: "\"6805f2cfc46c0f04559748bb039d69ae\"",
|
15449
|
+
# version_id: "Bvq0EDKxOcXLJXNo_Lkz37eM3R4pfzyQ",
|
15432
15450
|
# }
|
15433
15451
|
#
|
15434
15452
|
# @example Example: To upload an object (specify optional headers)
|
@@ -15469,37 +15487,25 @@ module Aws::S3
|
|
15469
15487
|
# version_id: "psM2sYY4.o1501dSx8wMvnkOzSBB.V4a",
|
15470
15488
|
# }
|
15471
15489
|
#
|
15472
|
-
# @example Example: To
|
15490
|
+
# @example Example: To upload object and specify user-defined metadata
|
15473
15491
|
#
|
15474
|
-
# # The following example creates an object.
|
15492
|
+
# # The following example creates an object. The request also specifies optional metadata. If the bucket is versioning
|
15493
|
+
# # enabled, S3 returns version ID in response.
|
15475
15494
|
#
|
15476
15495
|
# resp = client.put_object({
|
15477
15496
|
# body: "filetoupload",
|
15478
15497
|
# bucket: "examplebucket",
|
15479
|
-
# key: "
|
15480
|
-
#
|
15481
|
-
#
|
15482
|
-
#
|
15483
|
-
#
|
15484
|
-
# etag: "\"6805f2cfc46c0f04559748bb039d69ae\"",
|
15485
|
-
# version_id: "Bvq0EDKxOcXLJXNo_Lkz37eM3R4pfzyQ",
|
15486
|
-
# }
|
15487
|
-
#
|
15488
|
-
# @example Example: To upload an object
|
15489
|
-
#
|
15490
|
-
# # The following example uploads an object to a versioning-enabled bucket. The source file is specified using Windows file
|
15491
|
-
# # syntax. S3 returns VersionId of the newly created object.
|
15492
|
-
#
|
15493
|
-
# resp = client.put_object({
|
15494
|
-
# body: "HappyFace.jpg",
|
15495
|
-
# bucket: "examplebucket",
|
15496
|
-
# key: "HappyFace.jpg",
|
15498
|
+
# key: "exampleobject",
|
15499
|
+
# metadata: {
|
15500
|
+
# "metadata1" => "value1",
|
15501
|
+
# "metadata2" => "value2",
|
15502
|
+
# },
|
15497
15503
|
# })
|
15498
15504
|
#
|
15499
15505
|
# resp.to_h outputs the following:
|
15500
15506
|
# {
|
15501
15507
|
# etag: "\"6805f2cfc46c0f04559748bb039d69ae\"",
|
15502
|
-
# version_id: "
|
15508
|
+
# version_id: "pSKidl4pHBiNwukdbcPXAIs.sshFFOc0",
|
15503
15509
|
# }
|
15504
15510
|
#
|
15505
15511
|
# @example Example: To upload an object and specify canned ACL.
|
@@ -15520,24 +15526,21 @@ module Aws::S3
|
|
15520
15526
|
# version_id: "Kirh.unyZwjQ69YxcQLA8z4F5j3kJJKr",
|
15521
15527
|
# }
|
15522
15528
|
#
|
15523
|
-
# @example Example: To upload an object
|
15529
|
+
# @example Example: To upload an object
|
15524
15530
|
#
|
15525
|
-
# # The following example uploads an object. The
|
15526
|
-
# #
|
15531
|
+
# # The following example uploads an object to a versioning-enabled bucket. The source file is specified using Windows file
|
15532
|
+
# # syntax. S3 returns VersionId of the newly created object.
|
15527
15533
|
#
|
15528
15534
|
# resp = client.put_object({
|
15529
|
-
# body: "
|
15535
|
+
# body: "HappyFace.jpg",
|
15530
15536
|
# bucket: "examplebucket",
|
15531
|
-
# key: "
|
15532
|
-
# server_side_encryption: "AES256",
|
15533
|
-
# tagging: "key1=value1&key2=value2",
|
15537
|
+
# key: "HappyFace.jpg",
|
15534
15538
|
# })
|
15535
15539
|
#
|
15536
15540
|
# resp.to_h outputs the following:
|
15537
15541
|
# {
|
15538
15542
|
# etag: "\"6805f2cfc46c0f04559748bb039d69ae\"",
|
15539
|
-
#
|
15540
|
-
# version_id: "Ri.vC6qVlA4dEnjgRV4ZHsHoFIjqEMNt",
|
15543
|
+
# version_id: "tpf3zF08nBplQK1XLOefGskR7mGDwcDk",
|
15541
15544
|
# }
|
15542
15545
|
#
|
15543
15546
|
# @example Streaming a file from disk
|
@@ -18828,7 +18831,7 @@ module Aws::S3
|
|
18828
18831
|
params: params,
|
18829
18832
|
config: config)
|
18830
18833
|
context[:gem_name] = 'aws-sdk-s3'
|
18831
|
-
context[:gem_version] = '1.
|
18834
|
+
context[:gem_version] = '1.153.0'
|
18832
18835
|
Seahorse::Client::Request.new(handlers, context)
|
18833
18836
|
end
|
18834
18837
|
|
@@ -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"))
|
@@ -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'])
|
@@ -65,6 +65,11 @@ module Aws::S3
|
|
65
65
|
#
|
66
66
|
# @return [String]
|
67
67
|
#
|
68
|
+
# @!attribute copy_source
|
69
|
+
# The Copy Source used for Copy Object request. This is an optional parameter that will be set automatically for operations that are scoped to Copy Source.
|
70
|
+
#
|
71
|
+
# @return [String]
|
72
|
+
#
|
68
73
|
# @!attribute disable_access_points
|
69
74
|
# Internal parameter to disable Access Point Buckets
|
70
75
|
#
|
@@ -102,6 +107,7 @@ module Aws::S3
|
|
102
107
|
:use_object_lambda_endpoint,
|
103
108
|
:key,
|
104
109
|
:prefix,
|
110
|
+
:copy_source,
|
105
111
|
:disable_access_points,
|
106
112
|
:disable_multi_region_access_points,
|
107
113
|
:use_arn_region,
|
@@ -124,6 +130,7 @@ module Aws::S3
|
|
124
130
|
'UseObjectLambdaEndpoint' => :use_object_lambda_endpoint,
|
125
131
|
'Key' => :key,
|
126
132
|
'Prefix' => :prefix,
|
133
|
+
'CopySource' => :copy_source,
|
127
134
|
'DisableAccessPoints' => :disable_access_points,
|
128
135
|
'DisableMultiRegionAccessPoints' => :disable_multi_region_access_points,
|
129
136
|
'UseArnRegion' => :use_arn_region,
|
@@ -164,6 +171,7 @@ module Aws::S3
|
|
164
171
|
self[:use_object_lambda_endpoint] = options[:use_object_lambda_endpoint]
|
165
172
|
self[:key] = options[:key]
|
166
173
|
self[:prefix] = options[:prefix]
|
174
|
+
self[:copy_source] = options[:copy_source]
|
167
175
|
self[:disable_access_points] = options[:disable_access_points]
|
168
176
|
self[:disable_multi_region_access_points] = options[:disable_multi_region_access_points]
|
169
177
|
self[:disable_multi_region_access_points] = false if self[:disable_multi_region_access_points].nil?
|
@@ -21,6 +21,7 @@ module Aws::S3
|
|
21
21
|
use_object_lambda_endpoint = parameters.use_object_lambda_endpoint
|
22
22
|
key = parameters.key
|
23
23
|
prefix = parameters.prefix
|
24
|
+
copy_source = parameters.copy_source
|
24
25
|
disable_access_points = parameters.disable_access_points
|
25
26
|
disable_multi_region_access_points = parameters.disable_multi_region_access_points
|
26
27
|
use_arn_region = parameters.use_arn_region
|