aws-sdk-iam 1.77.0 → 1.78.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -150,7 +150,9 @@ module Aws::IAM
150
150
  #
151
151
  # @return [self]
152
152
  def load
153
- resp = @client.get_user(user_name: @name)
153
+ resp = Aws::Plugins::UserAgent.feature('resource') do
154
+ @client.get_user(user_name: @name)
155
+ end
154
156
  @data = resp.user
155
157
  self
156
158
  end
@@ -195,7 +197,9 @@ module Aws::IAM
195
197
  options, params = separate_params_and_options(options)
196
198
  waiter = Waiters::UserExists.new(options)
197
199
  yield_waiter_and_warn(waiter, &block) if block_given?
198
- waiter.wait(params.merge(user_name: @name))
200
+ Aws::Plugins::UserAgent.feature('resource') do
201
+ waiter.wait(params.merge(user_name: @name))
202
+ end
199
203
  User.new({
200
204
  name: @name,
201
205
  client: @client
@@ -296,7 +300,9 @@ module Aws::IAM
296
300
  :retry
297
301
  end
298
302
  end
299
- Aws::Waiters::Waiter.new(options).wait({})
303
+ Aws::Plugins::UserAgent.feature('resource') do
304
+ Aws::Waiters::Waiter.new(options).wait({})
305
+ end
300
306
  end
301
307
 
302
308
  # @!group Actions
@@ -321,7 +327,9 @@ module Aws::IAM
321
327
  # @return [EmptyStructure]
322
328
  def add_group(options = {})
323
329
  options = options.merge(user_name: @name)
324
- resp = @client.add_user_to_group(options)
330
+ resp = Aws::Plugins::UserAgent.feature('resource') do
331
+ @client.add_user_to_group(options)
332
+ end
325
333
  resp.data
326
334
  end
327
335
 
@@ -343,7 +351,9 @@ module Aws::IAM
343
351
  # @return [EmptyStructure]
344
352
  def attach_policy(options = {})
345
353
  options = options.merge(user_name: @name)
346
- resp = @client.attach_user_policy(options)
354
+ resp = Aws::Plugins::UserAgent.feature('resource') do
355
+ @client.attach_user_policy(options)
356
+ end
347
357
  resp.data
348
358
  end
349
359
 
@@ -413,7 +423,9 @@ module Aws::IAM
413
423
  # @return [User]
414
424
  def create(options = {})
415
425
  options = options.merge(user_name: @name)
416
- resp = @client.create_user(options)
426
+ resp = Aws::Plugins::UserAgent.feature('resource') do
427
+ @client.create_user(options)
428
+ end
417
429
  User.new(
418
430
  name: options[:user_name],
419
431
  data: resp.data.user,
@@ -428,7 +440,9 @@ module Aws::IAM
428
440
  # @return [AccessKeyPair]
429
441
  def create_access_key_pair(options = {})
430
442
  options = options.merge(user_name: @name)
431
- resp = @client.create_access_key(options)
443
+ resp = Aws::Plugins::UserAgent.feature('resource') do
444
+ @client.create_access_key(options)
445
+ end
432
446
  AccessKeyPair.new(
433
447
  user_name: @name,
434
448
  id: resp.data.access_key.access_key_id,
@@ -467,7 +481,9 @@ module Aws::IAM
467
481
  # @return [LoginProfile]
468
482
  def create_login_profile(options = {})
469
483
  options = options.merge(user_name: @name)
470
- resp = @client.create_login_profile(options)
484
+ resp = Aws::Plugins::UserAgent.feature('resource') do
485
+ @client.create_login_profile(options)
486
+ end
471
487
  LoginProfile.new(
472
488
  user_name: resp.data.login_profile.user_name,
473
489
  data: resp.data.login_profile,
@@ -519,7 +535,9 @@ module Aws::IAM
519
535
  # @return [UserPolicy]
520
536
  def create_policy(options = {})
521
537
  options = options.merge(user_name: @name)
522
- @client.put_user_policy(options)
538
+ Aws::Plugins::UserAgent.feature('resource') do
539
+ @client.put_user_policy(options)
540
+ end
523
541
  UserPolicy.new(
524
542
  user_name: @name,
525
543
  name: options[:policy_name],
@@ -534,7 +552,9 @@ module Aws::IAM
534
552
  # @return [EmptyStructure]
535
553
  def delete(options = {})
536
554
  options = options.merge(user_name: @name)
537
- resp = @client.delete_user(options)
555
+ resp = Aws::Plugins::UserAgent.feature('resource') do
556
+ @client.delete_user(options)
557
+ end
538
558
  resp.data
539
559
  end
540
560
 
@@ -556,7 +576,9 @@ module Aws::IAM
556
576
  # @return [EmptyStructure]
557
577
  def detach_policy(options = {})
558
578
  options = options.merge(user_name: @name)
559
- resp = @client.detach_user_policy(options)
579
+ resp = Aws::Plugins::UserAgent.feature('resource') do
580
+ @client.detach_user_policy(options)
581
+ end
560
582
  resp.data
561
583
  end
562
584
 
@@ -613,7 +635,9 @@ module Aws::IAM
613
635
  # @return [MfaDevice]
614
636
  def enable_mfa(options = {})
615
637
  options = options.merge(user_name: @name)
616
- @client.enable_mfa_device(options)
638
+ Aws::Plugins::UserAgent.feature('resource') do
639
+ @client.enable_mfa_device(options)
640
+ end
617
641
  MfaDevice.new(
618
642
  user_name: @name,
619
643
  serial_number: options[:serial_number],
@@ -641,7 +665,9 @@ module Aws::IAM
641
665
  # @return [EmptyStructure]
642
666
  def remove_group(options = {})
643
667
  options = options.merge(user_name: @name)
644
- resp = @client.remove_user_from_group(options)
668
+ resp = Aws::Plugins::UserAgent.feature('resource') do
669
+ @client.remove_user_from_group(options)
670
+ end
645
671
  resp.data
646
672
  end
647
673
 
@@ -676,7 +702,9 @@ module Aws::IAM
676
702
  # @return [User]
677
703
  def update(options = {})
678
704
  options = options.merge(user_name: @name)
679
- @client.update_user(options)
705
+ Aws::Plugins::UserAgent.feature('resource') do
706
+ @client.update_user(options)
707
+ end
680
708
  User.new(
681
709
  name: options[:new_user_name],
682
710
  client: @client
@@ -703,7 +731,9 @@ module Aws::IAM
703
731
  def access_keys(options = {})
704
732
  batches = Enumerator.new do |y|
705
733
  options = options.merge(user_name: @name)
706
- resp = @client.list_access_keys(options)
734
+ resp = Aws::Plugins::UserAgent.feature('resource') do
735
+ @client.list_access_keys(options)
736
+ end
707
737
  resp.each_page do |page|
708
738
  batch = []
709
739
  page.data.access_key_metadata.each do |a|
@@ -745,7 +775,9 @@ module Aws::IAM
745
775
  def attached_policies(options = {})
746
776
  batches = Enumerator.new do |y|
747
777
  options = options.merge(user_name: @name)
748
- resp = @client.list_attached_user_policies(options)
778
+ resp = Aws::Plugins::UserAgent.feature('resource') do
779
+ @client.list_attached_user_policies(options)
780
+ end
749
781
  resp.each_page do |page|
750
782
  batch = []
751
783
  page.data.attached_policies.each do |a|
@@ -768,7 +800,9 @@ module Aws::IAM
768
800
  def groups(options = {})
769
801
  batches = Enumerator.new do |y|
770
802
  options = options.merge(user_name: @name)
771
- resp = @client.list_groups_for_user(options)
803
+ resp = Aws::Plugins::UserAgent.feature('resource') do
804
+ @client.list_groups_for_user(options)
805
+ end
772
806
  resp.each_page do |page|
773
807
  batch = []
774
808
  page.data.groups.each do |g|
@@ -810,7 +844,9 @@ module Aws::IAM
810
844
  def mfa_devices(options = {})
811
845
  batches = Enumerator.new do |y|
812
846
  options = options.merge(user_name: @name)
813
- resp = @client.list_mfa_devices(options)
847
+ resp = Aws::Plugins::UserAgent.feature('resource') do
848
+ @client.list_mfa_devices(options)
849
+ end
814
850
  resp.each_page do |page|
815
851
  batch = []
816
852
  page.data.mfa_devices.each do |m|
@@ -835,7 +871,9 @@ module Aws::IAM
835
871
  def policies(options = {})
836
872
  batches = Enumerator.new do |y|
837
873
  options = options.merge(user_name: @name)
838
- resp = @client.list_user_policies(options)
874
+ resp = Aws::Plugins::UserAgent.feature('resource') do
875
+ @client.list_user_policies(options)
876
+ end
839
877
  resp.each_page do |page|
840
878
  batch = []
841
879
  page.data.policy_names.each do |p|
@@ -879,7 +917,9 @@ module Aws::IAM
879
917
  def signing_certificates(options = {})
880
918
  batches = Enumerator.new do |y|
881
919
  options = options.merge(user_name: @name)
882
- resp = @client.list_signing_certificates(options)
920
+ resp = Aws::Plugins::UserAgent.feature('resource') do
921
+ @client.list_signing_certificates(options)
922
+ end
883
923
  resp.each_page do |page|
884
924
  batch = []
885
925
  page.data.certificates.each do |c|
@@ -68,10 +68,12 @@ module Aws::IAM
68
68
  #
69
69
  # @return [self]
70
70
  def load
71
- resp = @client.get_user_policy(
71
+ resp = Aws::Plugins::UserAgent.feature('resource') do
72
+ @client.get_user_policy(
72
73
  user_name: @user_name,
73
74
  policy_name: @name
74
75
  )
76
+ end
75
77
  @data = resp.data
76
78
  self
77
79
  end
@@ -186,7 +188,9 @@ module Aws::IAM
186
188
  :retry
187
189
  end
188
190
  end
189
- Aws::Waiters::Waiter.new(options).wait({})
191
+ Aws::Plugins::UserAgent.feature('resource') do
192
+ Aws::Waiters::Waiter.new(options).wait({})
193
+ end
190
194
  end
191
195
 
192
196
  # @!group Actions
@@ -201,7 +205,9 @@ module Aws::IAM
201
205
  user_name: @user_name,
202
206
  policy_name: @name
203
207
  )
204
- resp = @client.delete_user_policy(options)
208
+ resp = Aws::Plugins::UserAgent.feature('resource') do
209
+ @client.delete_user_policy(options)
210
+ end
205
211
  resp.data
206
212
  end
207
213
 
@@ -240,7 +246,9 @@ module Aws::IAM
240
246
  user_name: @user_name,
241
247
  policy_name: @name
242
248
  )
243
- resp = @client.put_user_policy(options)
249
+ resp = Aws::Plugins::UserAgent.feature('resource') do
250
+ @client.put_user_policy(options)
251
+ end
244
252
  resp.data
245
253
  end
246
254
 
@@ -198,7 +198,9 @@ module Aws::IAM
198
198
  :retry
199
199
  end
200
200
  end
201
- Aws::Waiters::Waiter.new(options).wait({})
201
+ Aws::Plugins::UserAgent.feature('resource') do
202
+ Aws::Waiters::Waiter.new(options).wait({})
203
+ end
202
204
  end
203
205
 
204
206
  # @!group Actions
@@ -210,7 +212,9 @@ module Aws::IAM
210
212
  # @return [EmptyStructure]
211
213
  def delete(options = {})
212
214
  options = options.merge(serial_number: @serial_number)
213
- resp = @client.delete_virtual_mfa_device(options)
215
+ resp = Aws::Plugins::UserAgent.feature('resource') do
216
+ @client.delete_virtual_mfa_device(options)
217
+ end
214
218
  resp.data
215
219
  end
216
220
 
data/lib/aws-sdk-iam.rb CHANGED
@@ -74,6 +74,6 @@ require_relative 'aws-sdk-iam/customizations'
74
74
  # @!group service
75
75
  module Aws::IAM
76
76
 
77
- GEM_VERSION = '1.77.0'
77
+ GEM_VERSION = '1.78.0'
78
78
 
79
79
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: aws-sdk-iam
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.77.0
4
+ version: 1.78.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Amazon Web Services
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-03-22 00:00:00.000000000 Z
11
+ date: 2023-05-31 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: aws-sdk-core
@@ -19,7 +19,7 @@ dependencies:
19
19
  version: '3'
20
20
  - - ">="
21
21
  - !ruby/object:Gem::Version
22
- version: 3.165.0
22
+ version: 3.174.0
23
23
  type: :runtime
24
24
  prerelease: false
25
25
  version_requirements: !ruby/object:Gem::Requirement
@@ -29,7 +29,7 @@ dependencies:
29
29
  version: '3'
30
30
  - - ">="
31
31
  - !ruby/object:Gem::Version
32
- version: 3.165.0
32
+ version: 3.174.0
33
33
  - !ruby/object:Gem::Dependency
34
34
  name: aws-sigv4
35
35
  requirement: !ruby/object:Gem::Requirement