aws-sdk-s3 1.122.0 → 1.123.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (35) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +5 -0
  3. data/VERSION +1 -1
  4. data/lib/aws-sdk-s3/bucket.rb +30 -10
  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 +6 -1
  17. data/lib/aws-sdk-s3/customizations/bucket.rb +3 -1
  18. data/lib/aws-sdk-s3/customizations/object.rb +28 -18
  19. data/lib/aws-sdk-s3/encryption/client.rb +6 -2
  20. data/lib/aws-sdk-s3/encryption/kms_cipher_provider.rb +13 -9
  21. data/lib/aws-sdk-s3/encryptionV2/client.rb +6 -2
  22. data/lib/aws-sdk-s3/encryptionV2/kms_cipher_provider.rb +10 -6
  23. data/lib/aws-sdk-s3/file_downloader.rb +14 -12
  24. data/lib/aws-sdk-s3/file_uploader.rb +8 -6
  25. data/lib/aws-sdk-s3/multipart_stream_uploader.rb +5 -3
  26. data/lib/aws-sdk-s3/multipart_upload.rb +12 -4
  27. data/lib/aws-sdk-s3/multipart_upload_part.rb +9 -3
  28. data/lib/aws-sdk-s3/object.rb +36 -12
  29. data/lib/aws-sdk-s3/object_acl.rb +9 -3
  30. data/lib/aws-sdk-s3/object_copier.rb +7 -5
  31. data/lib/aws-sdk-s3/object_summary.rb +30 -10
  32. data/lib/aws-sdk-s3/object_version.rb +15 -5
  33. data/lib/aws-sdk-s3/resource.rb +6 -2
  34. data/lib/aws-sdk-s3.rb +1 -1
  35. metadata +4 -4
@@ -68,11 +68,13 @@ module Aws
68
68
  # @see #copy_to
69
69
  #
70
70
  def copy_from(source, options = {})
71
- if Hash === source && source[:copy_source]
72
- # for backwards compatibility
73
- @client.copy_object(source.merge(bucket: bucket_name, key: key))
74
- else
75
- ObjectCopier.new(self, options).copy_from(source, options)
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
- ObjectCopier.new(self, options).copy_to(target, options)
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
- uploader.upload(
375
- uploading_options.merge(bucket: bucket_name, key: key),
376
- &block
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 = uploader.upload(
444
- source,
445
- uploading_options.merge(bucket: bucket_name, key: key)
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
- downloader.download(
484
- destination,
485
- options.merge(bucket: bucket_name, key: key)
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
- req.send_request
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
- req.send_request(target: block)
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 = @kms_client.generate_data_key(
21
- key_id: @kms_key_id,
22
- encryption_context: encryption_context,
23
- key_spec: 'AES_256',
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 = @kms_client.decrypt(
62
- ciphertext_blob: decode64(envelope['x-amz-key-v2']),
63
- encryption_context: encryption_context
64
- ).plaintext
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
- req.send_request
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
- req.send_request(target: block)
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 = @kms_client.generate_data_key(
28
- key_id: @kms_key_id,
29
- encryption_context: encryption_context,
30
- key_spec: 'AES_256'
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 = @kms_client.decrypt(decrypt_options).plaintext
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
- case @mode
36
- when 'auto' then multipart_download
37
- when 'single_request' then single_request
38
- when 'get_range'
39
- if @chunk_size
40
- resp = @client.head_object(@params)
41
- multithreaded_get_by_ranges(construct_chunks(resp.content_length))
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 = 'In :get_range mode, :chunk_size must be provided'
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
 
@@ -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
- if File.size(source) >= multipart_threshold
41
- MultipartFileUploader.new(@options).upload(source, options)
42
- else
43
- # remove multipart parameters not supported by put_object
44
- options.delete(:thread_count)
45
- put_object(source, options)
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
- upload_id = initiate_upload(options)
49
- parts = upload_parts(upload_id, options, &block)
50
- complete_upload(upload_id, parts, options)
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::Waiters::Waiter.new(options).wait({})
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 = @client.abort_multipart_upload(options)
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
- @client.complete_multipart_upload(options)
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 = @client.list_parts(options)
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::Waiters::Waiter.new(options).wait({})
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 = @client.upload_part_copy(options)
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 = @client.upload_part(options)
528
+ resp = Aws::Plugins::UserAgent.feature('resource') do
529
+ @client.upload_part(options)
530
+ end
525
531
  resp.data
526
532
  end
527
533
 
@@ -407,10 +407,12 @@ module Aws::S3
407
407
  #
408
408
  # @return [self]
409
409
  def load
410
- resp = @client.head_object(
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
- waiter.wait(params.merge(bucket: @bucket_name,
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
- waiter.wait(params.merge(bucket: @bucket_name,
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::Waiters::Waiter.new(options).wait({})
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 = @client.copy_object(options)
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 = @client.delete_object(options)
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 = @client.get_object(options, &block)
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 = @client.create_multipart_upload(options)
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 = @client.put_object(options)
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 = @client.restore_object(options)
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 = @client.head_object(options)
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
- batch[0].client.delete_objects(params)
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 = @client.get_object_acl(
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::Waiters::Waiter.new(options).wait({})
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 = @client.put_object_acl(options)
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
- if options.delete(:multipart_copy)
32
- apply_source_client(source, options)
33
- ObjectMultipartCopier.new(@options).copy(options)
34
- else
35
- @object.client.copy_object(options)
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
 
@@ -152,8 +152,10 @@ module Aws::S3
152
152
  options, params = separate_params_and_options(options)
153
153
  waiter = Waiters::ObjectExists.new(options)
154
154
  yield_waiter_and_warn(waiter, &block) if block_given?
155
- waiter.wait(params.merge(bucket: @bucket_name,
155
+ Aws::Plugins::UserAgent.feature('resource') do
156
+ waiter.wait(params.merge(bucket: @bucket_name,
156
157
  key: @key))
158
+ end
157
159
  ObjectSummary.new({
158
160
  bucket_name: @bucket_name,
159
161
  key: @key,
@@ -171,8 +173,10 @@ module Aws::S3
171
173
  options, params = separate_params_and_options(options)
172
174
  waiter = Waiters::ObjectNotExists.new(options)
173
175
  yield_waiter_and_warn(waiter, &block) if block_given?
174
- waiter.wait(params.merge(bucket: @bucket_name,
176
+ Aws::Plugins::UserAgent.feature('resource') do
177
+ waiter.wait(params.merge(bucket: @bucket_name,
175
178
  key: @key))
179
+ end
176
180
  ObjectSummary.new({
177
181
  bucket_name: @bucket_name,
178
182
  key: @key,
@@ -274,7 +278,9 @@ module Aws::S3
274
278
  :retry
275
279
  end
276
280
  end
277
- Aws::Waiters::Waiter.new(options).wait({})
281
+ Aws::Plugins::UserAgent.feature('resource') do
282
+ Aws::Waiters::Waiter.new(options).wait({})
283
+ end
278
284
  end
279
285
 
280
286
  # @!group Actions
@@ -536,7 +542,9 @@ module Aws::S3
536
542
  bucket: @bucket_name,
537
543
  key: @key
538
544
  )
539
- resp = @client.copy_object(options)
545
+ resp = Aws::Plugins::UserAgent.feature('resource') do
546
+ @client.copy_object(options)
547
+ end
540
548
  resp.data
541
549
  end
542
550
 
@@ -581,7 +589,9 @@ module Aws::S3
581
589
  bucket: @bucket_name,
582
590
  key: @key
583
591
  )
584
- resp = @client.delete_object(options)
592
+ resp = Aws::Plugins::UserAgent.feature('resource') do
593
+ @client.delete_object(options)
594
+ end
585
595
  resp.data
586
596
  end
587
597
 
@@ -688,7 +698,9 @@ module Aws::S3
688
698
  bucket: @bucket_name,
689
699
  key: @key
690
700
  )
691
- resp = @client.get_object(options, &block)
701
+ resp = Aws::Plugins::UserAgent.feature('resource') do
702
+ @client.get_object(options, &block)
703
+ end
692
704
  resp.data
693
705
  end
694
706
 
@@ -858,7 +870,9 @@ module Aws::S3
858
870
  bucket: @bucket_name,
859
871
  key: @key
860
872
  )
861
- resp = @client.create_multipart_upload(options)
873
+ resp = Aws::Plugins::UserAgent.feature('resource') do
874
+ @client.create_multipart_upload(options)
875
+ end
862
876
  MultipartUpload.new(
863
877
  bucket_name: @bucket_name,
864
878
  object_key: @key,
@@ -1169,7 +1183,9 @@ module Aws::S3
1169
1183
  bucket: @bucket_name,
1170
1184
  key: @key
1171
1185
  )
1172
- resp = @client.put_object(options)
1186
+ resp = Aws::Plugins::UserAgent.feature('resource') do
1187
+ @client.put_object(options)
1188
+ end
1173
1189
  resp.data
1174
1190
  end
1175
1191
 
@@ -1302,7 +1318,9 @@ module Aws::S3
1302
1318
  bucket: @bucket_name,
1303
1319
  key: @key
1304
1320
  )
1305
- resp = @client.restore_object(options)
1321
+ resp = Aws::Plugins::UserAgent.feature('resource') do
1322
+ @client.restore_object(options)
1323
+ end
1306
1324
  resp.data
1307
1325
  end
1308
1326
 
@@ -1484,7 +1502,9 @@ module Aws::S3
1484
1502
  key: item.key
1485
1503
  }
1486
1504
  end
1487
- batch[0].client.delete_objects(params)
1505
+ Aws::Plugins::UserAgent.feature('resource') do
1506
+ batch[0].client.delete_objects(params)
1507
+ end
1488
1508
  end
1489
1509
  nil
1490
1510
  end