aws-sdk-s3 1.122.0 → 1.123.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +10 -0
- data/VERSION +1 -1
- data/lib/aws-sdk-s3/bucket.rb +30 -10
- data/lib/aws-sdk-s3/bucket_acl.rb +9 -3
- data/lib/aws-sdk-s3/bucket_cors.rb +12 -4
- data/lib/aws-sdk-s3/bucket_lifecycle.rb +12 -4
- data/lib/aws-sdk-s3/bucket_lifecycle_configuration.rb +12 -4
- data/lib/aws-sdk-s3/bucket_logging.rb +9 -3
- data/lib/aws-sdk-s3/bucket_notification.rb +9 -3
- data/lib/aws-sdk-s3/bucket_policy.rb +12 -4
- data/lib/aws-sdk-s3/bucket_request_payment.rb +9 -3
- data/lib/aws-sdk-s3/bucket_tagging.rb +12 -4
- data/lib/aws-sdk-s3/bucket_versioning.rb +15 -5
- data/lib/aws-sdk-s3/bucket_website.rb +12 -4
- data/lib/aws-sdk-s3/client.rb +6 -1
- data/lib/aws-sdk-s3/customizations/bucket.rb +3 -1
- data/lib/aws-sdk-s3/customizations/object.rb +28 -18
- data/lib/aws-sdk-s3/encryption/client.rb +6 -2
- data/lib/aws-sdk-s3/encryption/kms_cipher_provider.rb +13 -9
- data/lib/aws-sdk-s3/encryptionV2/client.rb +6 -2
- data/lib/aws-sdk-s3/encryptionV2/kms_cipher_provider.rb +10 -6
- data/lib/aws-sdk-s3/file_downloader.rb +28 -24
- data/lib/aws-sdk-s3/file_uploader.rb +8 -6
- data/lib/aws-sdk-s3/multipart_stream_uploader.rb +5 -3
- data/lib/aws-sdk-s3/multipart_upload.rb +12 -4
- data/lib/aws-sdk-s3/multipart_upload_part.rb +9 -3
- data/lib/aws-sdk-s3/object.rb +36 -12
- data/lib/aws-sdk-s3/object_acl.rb +9 -3
- data/lib/aws-sdk-s3/object_copier.rb +7 -5
- data/lib/aws-sdk-s3/object_summary.rb +30 -10
- data/lib/aws-sdk-s3/object_version.rb +15 -5
- data/lib/aws-sdk-s3/resource.rb +6 -2
- data/lib/aws-sdk-s3.rb +1 -1
- metadata +4 -4
@@ -68,11 +68,13 @@ module Aws
|
|
68
68
|
# @see #copy_to
|
69
69
|
#
|
70
70
|
def copy_from(source, options = {})
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
71
|
+
Aws::Plugins::UserAgent.feature('resource') do
|
72
|
+
if Hash === source && source[:copy_source]
|
73
|
+
# for backwards compatibility
|
74
|
+
@client.copy_object(source.merge(bucket: bucket_name, key: key))
|
75
|
+
else
|
76
|
+
ObjectCopier.new(self, options).copy_from(source, options)
|
77
|
+
end
|
76
78
|
end
|
77
79
|
end
|
78
80
|
|
@@ -109,7 +111,9 @@ module Aws
|
|
109
111
|
# object.copy_to('src-bucket/src-key', multipart_copy: true)
|
110
112
|
#
|
111
113
|
def copy_to(target, options = {})
|
112
|
-
|
114
|
+
Aws::Plugins::UserAgent.feature('resource') do
|
115
|
+
ObjectCopier.new(self, options).copy_to(target, options)
|
116
|
+
end
|
113
117
|
end
|
114
118
|
|
115
119
|
# Copies and deletes the current object. The object will only be deleted
|
@@ -371,10 +375,12 @@ module Aws
|
|
371
375
|
tempfile: uploading_options.delete(:tempfile),
|
372
376
|
part_size: uploading_options.delete(:part_size)
|
373
377
|
)
|
374
|
-
|
375
|
-
|
376
|
-
|
377
|
-
|
378
|
+
Aws::Plugins::UserAgent.feature('resource') do
|
379
|
+
uploader.upload(
|
380
|
+
uploading_options.merge(bucket: bucket_name, key: key),
|
381
|
+
&block
|
382
|
+
)
|
383
|
+
end
|
378
384
|
true
|
379
385
|
end
|
380
386
|
|
@@ -440,10 +446,12 @@ module Aws
|
|
440
446
|
multipart_threshold: uploading_options.delete(:multipart_threshold),
|
441
447
|
client: client
|
442
448
|
)
|
443
|
-
response =
|
444
|
-
|
445
|
-
|
446
|
-
|
449
|
+
response = Aws::Plugins::UserAgent.feature('resource') do
|
450
|
+
uploader.upload(
|
451
|
+
source,
|
452
|
+
uploading_options.merge(bucket: bucket_name, key: key)
|
453
|
+
)
|
454
|
+
end
|
447
455
|
yield response if block_given?
|
448
456
|
true
|
449
457
|
end
|
@@ -480,10 +488,12 @@ module Aws
|
|
480
488
|
# any errors.
|
481
489
|
def download_file(destination, options = {})
|
482
490
|
downloader = FileDownloader.new(client: client)
|
483
|
-
|
484
|
-
|
485
|
-
|
486
|
-
|
491
|
+
Aws::Plugins::UserAgent.feature('resource') do
|
492
|
+
downloader.download(
|
493
|
+
destination,
|
494
|
+
options.merge(bucket: bucket_name, key: key)
|
495
|
+
)
|
496
|
+
end
|
487
497
|
true
|
488
498
|
end
|
489
499
|
end
|
@@ -270,7 +270,9 @@ module Aws
|
|
270
270
|
envelope_location: @envelope_location,
|
271
271
|
instruction_file_suffix: @instruction_file_suffix,
|
272
272
|
}
|
273
|
-
|
273
|
+
Aws::Plugins::UserAgent.feature('S3CryptoV1n') do
|
274
|
+
req.send_request
|
275
|
+
end
|
274
276
|
end
|
275
277
|
|
276
278
|
# Gets an object from Amazon S3, decrypting data locally.
|
@@ -298,7 +300,9 @@ module Aws
|
|
298
300
|
envelope_location: envelope_location,
|
299
301
|
instruction_file_suffix: instruction_file_suffix,
|
300
302
|
}
|
301
|
-
|
303
|
+
Aws::Plugins::UserAgent.feature('S3CryptoV1n') do
|
304
|
+
req.send_request(target: block)
|
305
|
+
end
|
302
306
|
end
|
303
307
|
|
304
308
|
private
|
@@ -17,11 +17,13 @@ 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 =
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
20
|
+
key_data = Aws::Plugins::UserAgent.feature('S3CryptoV1n') do
|
21
|
+
@kms_client.generate_data_key(
|
22
|
+
key_id: @kms_key_id,
|
23
|
+
encryption_context: encryption_context,
|
24
|
+
key_spec: 'AES_256'
|
25
|
+
)
|
26
|
+
end
|
25
27
|
cipher = Utils.aes_encryption_cipher(:CBC)
|
26
28
|
cipher.key = key_data.plaintext
|
27
29
|
envelope = {
|
@@ -58,10 +60,12 @@ module Aws
|
|
58
60
|
"#{envelope['x-amz-wrap-alg']}"
|
59
61
|
end
|
60
62
|
|
61
|
-
key =
|
62
|
-
|
63
|
-
|
64
|
-
|
63
|
+
key = Aws::Plugins::UserAgent.feature('S3CryptoV1n') do
|
64
|
+
@kms_client.decrypt(
|
65
|
+
ciphertext_blob: decode64(envelope['x-amz-key-v2']),
|
66
|
+
encryption_context: encryption_context
|
67
|
+
).plaintext
|
68
|
+
end
|
65
69
|
|
66
70
|
iv = decode64(envelope['x-amz-iv'])
|
67
71
|
block_mode =
|
@@ -361,7 +361,9 @@ module Aws
|
|
361
361
|
instruction_file_suffix: @instruction_file_suffix,
|
362
362
|
kms_encryption_context: kms_encryption_context
|
363
363
|
}
|
364
|
-
|
364
|
+
Aws::Plugins::UserAgent.feature('S3CryptoV2') do
|
365
|
+
req.send_request
|
366
|
+
end
|
365
367
|
end
|
366
368
|
|
367
369
|
# Gets an object from Amazon S3, decrypting data locally.
|
@@ -414,7 +416,9 @@ module Aws
|
|
414
416
|
kms_allow_decrypt_with_any_cmk: kms_any_cmk_mode,
|
415
417
|
security_profile: security_profile
|
416
418
|
}
|
417
|
-
|
419
|
+
Aws::Plugins::UserAgent.feature('S3CryptoV2') do
|
420
|
+
req.send_request(target: block)
|
421
|
+
end
|
418
422
|
end
|
419
423
|
|
420
424
|
private
|
@@ -24,11 +24,13 @@ 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 =
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
27
|
+
key_data = Aws::Plugins::UserAgent.feature('S3CryptoV2') do
|
28
|
+
@kms_client.generate_data_key(
|
29
|
+
key_id: @kms_key_id,
|
30
|
+
encryption_context: encryption_context,
|
31
|
+
key_spec: 'AES_256'
|
32
|
+
)
|
33
|
+
end
|
32
34
|
cipher = Utils.aes_encryption_cipher(:GCM)
|
33
35
|
cipher.key = key_data.plaintext
|
34
36
|
envelope = {
|
@@ -83,7 +85,9 @@ module Aws
|
|
83
85
|
decrypt_options[:key_id] = @kms_key_id
|
84
86
|
end
|
85
87
|
|
86
|
-
key =
|
88
|
+
key = Aws::Plugins::UserAgent.feature('S3CryptoV2') do
|
89
|
+
@kms_client.decrypt(decrypt_options).plaintext
|
90
|
+
end
|
87
91
|
iv = decode64(envelope['x-amz-iv'])
|
88
92
|
block_mode =
|
89
93
|
case cek_alg
|
@@ -32,21 +32,23 @@ module Aws
|
|
32
32
|
}
|
33
33
|
@params[:version_id] = options[:version_id] if options[:version_id]
|
34
34
|
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
35
|
+
Aws::Plugins::UserAgent.feature('s3-transfer') do
|
36
|
+
case @mode
|
37
|
+
when 'auto' then multipart_download
|
38
|
+
when 'single_request' then single_request
|
39
|
+
when 'get_range'
|
40
|
+
if @chunk_size
|
41
|
+
resp = @client.head_object(@params)
|
42
|
+
multithreaded_get_by_ranges(construct_chunks(resp.content_length))
|
43
|
+
else
|
44
|
+
msg = 'In :get_range mode, :chunk_size must be provided'
|
45
|
+
raise ArgumentError, msg
|
46
|
+
end
|
42
47
|
else
|
43
|
-
msg =
|
48
|
+
msg = "Invalid mode #{@mode} provided, "\
|
49
|
+
'mode should be :single_request, :get_range or :auto'
|
44
50
|
raise ArgumentError, msg
|
45
51
|
end
|
46
|
-
else
|
47
|
-
msg = "Invalid mode #{@mode} provided, "\
|
48
|
-
'mode should be :single_request, :get_range or :auto'
|
49
|
-
raise ArgumentError, msg
|
50
52
|
end
|
51
53
|
end
|
52
54
|
|
@@ -56,15 +58,19 @@ module Aws
|
|
56
58
|
resp = @client.head_object(@params.merge(part_number: 1))
|
57
59
|
count = resp.parts_count
|
58
60
|
if count.nil? || count <= 1
|
59
|
-
resp.content_length
|
60
|
-
single_request
|
61
|
+
if resp.content_length <= MIN_CHUNK_SIZE
|
62
|
+
single_request
|
63
|
+
else
|
61
64
|
multithreaded_get_by_ranges(construct_chunks(resp.content_length))
|
65
|
+
end
|
62
66
|
else
|
63
67
|
# partNumber is an option
|
64
68
|
resp = @client.head_object(@params)
|
65
|
-
resp.content_length
|
66
|
-
single_request
|
69
|
+
if resp.content_length <= MIN_CHUNK_SIZE
|
70
|
+
single_request
|
71
|
+
else
|
67
72
|
compute_mode(resp.content_length, count)
|
73
|
+
end
|
68
74
|
end
|
69
75
|
end
|
70
76
|
|
@@ -82,10 +88,11 @@ module Aws
|
|
82
88
|
offset = 0
|
83
89
|
default_chunk_size = compute_chunk(file_size)
|
84
90
|
chunks = []
|
85
|
-
while offset
|
91
|
+
while offset < file_size
|
86
92
|
progress = offset + default_chunk_size
|
87
|
-
|
88
|
-
|
93
|
+
progress = file_size if progress > file_size
|
94
|
+
chunks << "bytes=#{offset}-#{progress - 1}"
|
95
|
+
offset = progress
|
89
96
|
end
|
90
97
|
chunks
|
91
98
|
end
|
@@ -94,12 +101,9 @@ module Aws
|
|
94
101
|
if @chunk_size && @chunk_size > file_size
|
95
102
|
raise ArgumentError, ":chunk_size shouldn't exceed total file size."
|
96
103
|
else
|
97
|
-
|
98
|
-
(file_size.to_f / MAX_PARTS).ceil,
|
99
|
-
MIN_CHUNK_SIZE
|
104
|
+
@chunk_size || [
|
105
|
+
(file_size.to_f / MAX_PARTS).ceil, MIN_CHUNK_SIZE
|
100
106
|
].max.to_i
|
101
|
-
chunk_size -= 1 if file_size % chunk_size == 1
|
102
|
-
chunk_size
|
103
107
|
end
|
104
108
|
end
|
105
109
|
|
@@ -37,12 +37,14 @@ module Aws
|
|
37
37
|
# objects smaller than the multipart threshold.
|
38
38
|
# @return [void]
|
39
39
|
def upload(source, options = {})
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
40
|
+
Aws::Plugins::UserAgent.feature('s3-transfer') do
|
41
|
+
if File.size(source) >= multipart_threshold
|
42
|
+
MultipartFileUploader.new(@options).upload(source, options)
|
43
|
+
else
|
44
|
+
# remove multipart parameters not supported by put_object
|
45
|
+
options.delete(:thread_count)
|
46
|
+
put_object(source, options)
|
47
|
+
end
|
46
48
|
end
|
47
49
|
end
|
48
50
|
|
@@ -45,9 +45,11 @@ module Aws
|
|
45
45
|
# @option options [required,String] :key
|
46
46
|
# @return [Seahorse::Client::Response] - the CompleteMultipartUploadResponse
|
47
47
|
def upload(options = {}, &block)
|
48
|
-
|
49
|
-
|
50
|
-
|
48
|
+
Aws::Plugins::UserAgent.feature('s3-transfer') do
|
49
|
+
upload_id = initiate_upload(options)
|
50
|
+
parts = upload_parts(upload_id, options, &block)
|
51
|
+
complete_upload(upload_id, parts, options)
|
52
|
+
end
|
51
53
|
end
|
52
54
|
|
53
55
|
private
|
@@ -217,7 +217,9 @@ module Aws::S3
|
|
217
217
|
:retry
|
218
218
|
end
|
219
219
|
end
|
220
|
-
Aws::
|
220
|
+
Aws::Plugins::UserAgent.feature('resource') do
|
221
|
+
Aws::Waiters::Waiter.new(options).wait({})
|
222
|
+
end
|
221
223
|
end
|
222
224
|
|
223
225
|
# @!group Actions
|
@@ -250,7 +252,9 @@ module Aws::S3
|
|
250
252
|
key: @object_key,
|
251
253
|
upload_id: @id
|
252
254
|
)
|
253
|
-
resp =
|
255
|
+
resp = Aws::Plugins::UserAgent.feature('resource') do
|
256
|
+
@client.abort_multipart_upload(options)
|
257
|
+
end
|
254
258
|
resp.data
|
255
259
|
end
|
256
260
|
|
@@ -370,7 +374,9 @@ module Aws::S3
|
|
370
374
|
key: @object_key,
|
371
375
|
upload_id: @id
|
372
376
|
)
|
373
|
-
|
377
|
+
Aws::Plugins::UserAgent.feature('resource') do
|
378
|
+
@client.complete_multipart_upload(options)
|
379
|
+
end
|
374
380
|
Object.new(
|
375
381
|
bucket_name: @bucket_name,
|
376
382
|
key: @object_key,
|
@@ -460,7 +466,9 @@ module Aws::S3
|
|
460
466
|
key: @object_key,
|
461
467
|
upload_id: @id
|
462
468
|
)
|
463
|
-
resp =
|
469
|
+
resp = Aws::Plugins::UserAgent.feature('resource') do
|
470
|
+
@client.list_parts(options)
|
471
|
+
end
|
464
472
|
resp.each_page do |page|
|
465
473
|
batch = []
|
466
474
|
page.data.parts.each do |p|
|
@@ -256,7 +256,9 @@ module Aws::S3
|
|
256
256
|
:retry
|
257
257
|
end
|
258
258
|
end
|
259
|
-
Aws::
|
259
|
+
Aws::Plugins::UserAgent.feature('resource') do
|
260
|
+
Aws::Waiters::Waiter.new(options).wait({})
|
261
|
+
end
|
260
262
|
end
|
261
263
|
|
262
264
|
# @!group Actions
|
@@ -395,7 +397,9 @@ module Aws::S3
|
|
395
397
|
upload_id: @multipart_upload_id,
|
396
398
|
part_number: @part_number
|
397
399
|
)
|
398
|
-
resp =
|
400
|
+
resp = Aws::Plugins::UserAgent.feature('resource') do
|
401
|
+
@client.upload_part_copy(options)
|
402
|
+
end
|
399
403
|
resp.data
|
400
404
|
end
|
401
405
|
|
@@ -521,7 +525,9 @@ module Aws::S3
|
|
521
525
|
upload_id: @multipart_upload_id,
|
522
526
|
part_number: @part_number
|
523
527
|
)
|
524
|
-
resp =
|
528
|
+
resp = Aws::Plugins::UserAgent.feature('resource') do
|
529
|
+
@client.upload_part(options)
|
530
|
+
end
|
525
531
|
resp.data
|
526
532
|
end
|
527
533
|
|
data/lib/aws-sdk-s3/object.rb
CHANGED
@@ -407,10 +407,12 @@ module Aws::S3
|
|
407
407
|
#
|
408
408
|
# @return [self]
|
409
409
|
def load
|
410
|
-
resp =
|
410
|
+
resp = Aws::Plugins::UserAgent.feature('resource') do
|
411
|
+
@client.head_object(
|
411
412
|
bucket: @bucket_name,
|
412
413
|
key: @key
|
413
414
|
)
|
415
|
+
end
|
414
416
|
@data = resp.data
|
415
417
|
self
|
416
418
|
end
|
@@ -455,8 +457,10 @@ module Aws::S3
|
|
455
457
|
options, params = separate_params_and_options(options)
|
456
458
|
waiter = Waiters::ObjectExists.new(options)
|
457
459
|
yield_waiter_and_warn(waiter, &block) if block_given?
|
458
|
-
|
460
|
+
Aws::Plugins::UserAgent.feature('resource') do
|
461
|
+
waiter.wait(params.merge(bucket: @bucket_name,
|
459
462
|
key: @key))
|
463
|
+
end
|
460
464
|
Object.new({
|
461
465
|
bucket_name: @bucket_name,
|
462
466
|
key: @key,
|
@@ -474,8 +478,10 @@ module Aws::S3
|
|
474
478
|
options, params = separate_params_and_options(options)
|
475
479
|
waiter = Waiters::ObjectNotExists.new(options)
|
476
480
|
yield_waiter_and_warn(waiter, &block) if block_given?
|
477
|
-
|
481
|
+
Aws::Plugins::UserAgent.feature('resource') do
|
482
|
+
waiter.wait(params.merge(bucket: @bucket_name,
|
478
483
|
key: @key))
|
484
|
+
end
|
479
485
|
Object.new({
|
480
486
|
bucket_name: @bucket_name,
|
481
487
|
key: @key,
|
@@ -577,7 +583,9 @@ module Aws::S3
|
|
577
583
|
:retry
|
578
584
|
end
|
579
585
|
end
|
580
|
-
Aws::
|
586
|
+
Aws::Plugins::UserAgent.feature('resource') do
|
587
|
+
Aws::Waiters::Waiter.new(options).wait({})
|
588
|
+
end
|
581
589
|
end
|
582
590
|
|
583
591
|
# @!group Actions
|
@@ -839,7 +847,9 @@ module Aws::S3
|
|
839
847
|
bucket: @bucket_name,
|
840
848
|
key: @key
|
841
849
|
)
|
842
|
-
resp =
|
850
|
+
resp = Aws::Plugins::UserAgent.feature('resource') do
|
851
|
+
@client.copy_object(options)
|
852
|
+
end
|
843
853
|
resp.data
|
844
854
|
end
|
845
855
|
|
@@ -884,7 +894,9 @@ module Aws::S3
|
|
884
894
|
bucket: @bucket_name,
|
885
895
|
key: @key
|
886
896
|
)
|
887
|
-
resp =
|
897
|
+
resp = Aws::Plugins::UserAgent.feature('resource') do
|
898
|
+
@client.delete_object(options)
|
899
|
+
end
|
888
900
|
resp.data
|
889
901
|
end
|
890
902
|
|
@@ -991,7 +1003,9 @@ module Aws::S3
|
|
991
1003
|
bucket: @bucket_name,
|
992
1004
|
key: @key
|
993
1005
|
)
|
994
|
-
resp =
|
1006
|
+
resp = Aws::Plugins::UserAgent.feature('resource') do
|
1007
|
+
@client.get_object(options, &block)
|
1008
|
+
end
|
995
1009
|
resp.data
|
996
1010
|
end
|
997
1011
|
|
@@ -1161,7 +1175,9 @@ module Aws::S3
|
|
1161
1175
|
bucket: @bucket_name,
|
1162
1176
|
key: @key
|
1163
1177
|
)
|
1164
|
-
resp =
|
1178
|
+
resp = Aws::Plugins::UserAgent.feature('resource') do
|
1179
|
+
@client.create_multipart_upload(options)
|
1180
|
+
end
|
1165
1181
|
MultipartUpload.new(
|
1166
1182
|
bucket_name: @bucket_name,
|
1167
1183
|
object_key: @key,
|
@@ -1472,7 +1488,9 @@ module Aws::S3
|
|
1472
1488
|
bucket: @bucket_name,
|
1473
1489
|
key: @key
|
1474
1490
|
)
|
1475
|
-
resp =
|
1491
|
+
resp = Aws::Plugins::UserAgent.feature('resource') do
|
1492
|
+
@client.put_object(options)
|
1493
|
+
end
|
1476
1494
|
resp.data
|
1477
1495
|
end
|
1478
1496
|
|
@@ -1605,7 +1623,9 @@ module Aws::S3
|
|
1605
1623
|
bucket: @bucket_name,
|
1606
1624
|
key: @key
|
1607
1625
|
)
|
1608
|
-
resp =
|
1626
|
+
resp = Aws::Plugins::UserAgent.feature('resource') do
|
1627
|
+
@client.restore_object(options)
|
1628
|
+
end
|
1609
1629
|
resp.data
|
1610
1630
|
end
|
1611
1631
|
|
@@ -1691,7 +1711,9 @@ module Aws::S3
|
|
1691
1711
|
bucket: @bucket_name,
|
1692
1712
|
key: @key
|
1693
1713
|
)
|
1694
|
-
resp =
|
1714
|
+
resp = Aws::Plugins::UserAgent.feature('resource') do
|
1715
|
+
@client.head_object(options)
|
1716
|
+
end
|
1695
1717
|
resp.data
|
1696
1718
|
end
|
1697
1719
|
|
@@ -1864,7 +1886,9 @@ module Aws::S3
|
|
1864
1886
|
key: item.key
|
1865
1887
|
}
|
1866
1888
|
end
|
1867
|
-
|
1889
|
+
Aws::Plugins::UserAgent.feature('resource') do
|
1890
|
+
batch[0].client.delete_objects(params)
|
1891
|
+
end
|
1868
1892
|
end
|
1869
1893
|
nil
|
1870
1894
|
end
|
@@ -75,10 +75,12 @@ module Aws::S3
|
|
75
75
|
#
|
76
76
|
# @return [self]
|
77
77
|
def load
|
78
|
-
resp =
|
78
|
+
resp = Aws::Plugins::UserAgent.feature('resource') do
|
79
|
+
@client.get_object_acl(
|
79
80
|
bucket: @bucket_name,
|
80
81
|
key: @object_key
|
81
82
|
)
|
83
|
+
end
|
82
84
|
@data = resp.data
|
83
85
|
self
|
84
86
|
end
|
@@ -193,7 +195,9 @@ module Aws::S3
|
|
193
195
|
:retry
|
194
196
|
end
|
195
197
|
end
|
196
|
-
Aws::
|
198
|
+
Aws::Plugins::UserAgent.feature('resource') do
|
199
|
+
Aws::Waiters::Waiter.new(options).wait({})
|
200
|
+
end
|
197
201
|
end
|
198
202
|
|
199
203
|
# @!group Actions
|
@@ -314,7 +318,9 @@ module Aws::S3
|
|
314
318
|
bucket: @bucket_name,
|
315
319
|
key: @object_key
|
316
320
|
)
|
317
|
-
resp =
|
321
|
+
resp = Aws::Plugins::UserAgent.feature('resource') do
|
322
|
+
@client.put_object_acl(options)
|
323
|
+
end
|
318
324
|
resp.data
|
319
325
|
end
|
320
326
|
|
@@ -28,11 +28,13 @@ module Aws
|
|
28
28
|
options[:bucket] = target_bucket
|
29
29
|
options[:key] = target_key
|
30
30
|
options[:copy_source] = copy_source(source)
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
31
|
+
Aws::Plugins::UserAgent.feature('s3-transfer') do
|
32
|
+
if options.delete(:multipart_copy)
|
33
|
+
apply_source_client(source, options)
|
34
|
+
ObjectMultipartCopier.new(@options).copy(options)
|
35
|
+
else
|
36
|
+
@object.client.copy_object(options)
|
37
|
+
end
|
36
38
|
end
|
37
39
|
end
|
38
40
|
|