aws-sdk-iam 1.33.0 → 1.38.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.
@@ -6,6 +6,7 @@
6
6
  # WARNING ABOUT GENERATED CODE
7
7
 
8
8
  module Aws::IAM
9
+
9
10
  class CurrentUser
10
11
 
11
12
  extend Aws::Deprecations
@@ -168,7 +169,8 @@ module Aws::IAM
168
169
  # Waiter polls an API operation until a resource enters a desired
169
170
  # state.
170
171
  #
171
- # @note The waiting operation is performed on a copy. The original resource remains unchanged
172
+ # @note The waiting operation is performed on a copy. The original resource
173
+ # remains unchanged.
172
174
  #
173
175
  # ## Basic Usage
174
176
  #
@@ -181,13 +183,15 @@ module Aws::IAM
181
183
  #
182
184
  # ## Example
183
185
  #
184
- # instance.wait_until(max_attempts:10, delay:5) {|instance| instance.state.name == 'running' }
186
+ # instance.wait_until(max_attempts:10, delay:5) do |instance|
187
+ # instance.state.name == 'running'
188
+ # end
185
189
  #
186
190
  # ## Configuration
187
191
  #
188
192
  # You can configure the maximum number of polling attempts, and the
189
- # delay (in seconds) between each polling attempt. The waiting condition is set
190
- # by passing a block to {#wait_until}:
193
+ # delay (in seconds) between each polling attempt. The waiting condition is
194
+ # set by passing a block to {#wait_until}:
191
195
  #
192
196
  # # poll for ~25 seconds
193
197
  # resource.wait_until(max_attempts:5,delay:5) {|resource|...}
@@ -218,17 +222,16 @@ module Aws::IAM
218
222
  # # resource did not enter the desired state in time
219
223
  # end
220
224
  #
225
+ # @yieldparam [Resource] resource to be used in the waiting condition.
221
226
  #
222
- # @yield param [Resource] resource to be used in the waiting condition
223
- #
224
- # @raise [Aws::Waiters::Errors::FailureStateError] Raised when the waiter terminates
225
- # because the waiter has entered a state that it will not transition
226
- # out of, preventing success.
227
+ # @raise [Aws::Waiters::Errors::FailureStateError] Raised when the waiter
228
+ # terminates because the waiter has entered a state that it will not
229
+ # transition out of, preventing success.
227
230
  #
228
231
  # yet successful.
229
232
  #
230
- # @raise [Aws::Waiters::Errors::UnexpectedError] Raised when an error is encountered
231
- # while polling for a resource that is not expected.
233
+ # @raise [Aws::Waiters::Errors::UnexpectedError] Raised when an error is
234
+ # encountered while polling for a resource that is not expected.
232
235
  #
233
236
  # @raise [NotImplementedError] Raised when the resource does not
234
237
  #
@@ -6,6 +6,55 @@
6
6
  # WARNING ABOUT GENERATED CODE
7
7
 
8
8
  module Aws::IAM
9
+
10
+ # When IAM returns an error response, the Ruby SDK constructs and raises an error.
11
+ # These errors all extend Aws::IAM::Errors::ServiceError < {Aws::Errors::ServiceError}
12
+ #
13
+ # You can rescue all IAM errors using ServiceError:
14
+ #
15
+ # begin
16
+ # # do stuff
17
+ # rescue Aws::IAM::Errors::ServiceError
18
+ # # rescues all IAM API errors
19
+ # end
20
+ #
21
+ #
22
+ # ## Request Context
23
+ # ServiceError objects have a {Aws::Errors::ServiceError#context #context} method that returns
24
+ # information about the request that generated the error.
25
+ # See {Seahorse::Client::RequestContext} for more information.
26
+ #
27
+ # ## Error Classes
28
+ # * {ConcurrentModificationException}
29
+ # * {CredentialReportExpiredException}
30
+ # * {CredentialReportNotPresentException}
31
+ # * {CredentialReportNotReadyException}
32
+ # * {DeleteConflictException}
33
+ # * {DuplicateCertificateException}
34
+ # * {DuplicateSSHPublicKeyException}
35
+ # * {EntityAlreadyExistsException}
36
+ # * {EntityTemporarilyUnmodifiableException}
37
+ # * {InvalidAuthenticationCodeException}
38
+ # * {InvalidCertificateException}
39
+ # * {InvalidInputException}
40
+ # * {InvalidPublicKeyException}
41
+ # * {InvalidUserTypeException}
42
+ # * {KeyPairMismatchException}
43
+ # * {LimitExceededException}
44
+ # * {MalformedCertificateException}
45
+ # * {MalformedPolicyDocumentException}
46
+ # * {NoSuchEntityException}
47
+ # * {PasswordPolicyViolationException}
48
+ # * {PolicyEvaluationException}
49
+ # * {PolicyNotAttachableException}
50
+ # * {ReportGenerationLimitExceededException}
51
+ # * {ServiceFailureException}
52
+ # * {ServiceNotSupportedException}
53
+ # * {UnmodifiableEntityException}
54
+ # * {UnrecognizedPublicKeyEncodingException}
55
+ #
56
+ # Additionally, error classes are dynamically generated for service errors based on the error code
57
+ # if they are not defined above.
9
58
  module Errors
10
59
 
11
60
  extend Aws::Errors::DynamicErrors
@@ -23,7 +72,6 @@ module Aws::IAM
23
72
  def message
24
73
  @message || @data[:message]
25
74
  end
26
-
27
75
  end
28
76
 
29
77
  class CredentialReportExpiredException < ServiceError
@@ -39,7 +87,6 @@ module Aws::IAM
39
87
  def message
40
88
  @message || @data[:message]
41
89
  end
42
-
43
90
  end
44
91
 
45
92
  class CredentialReportNotPresentException < ServiceError
@@ -55,7 +102,6 @@ module Aws::IAM
55
102
  def message
56
103
  @message || @data[:message]
57
104
  end
58
-
59
105
  end
60
106
 
61
107
  class CredentialReportNotReadyException < ServiceError
@@ -71,7 +117,6 @@ module Aws::IAM
71
117
  def message
72
118
  @message || @data[:message]
73
119
  end
74
-
75
120
  end
76
121
 
77
122
  class DeleteConflictException < ServiceError
@@ -87,7 +132,6 @@ module Aws::IAM
87
132
  def message
88
133
  @message || @data[:message]
89
134
  end
90
-
91
135
  end
92
136
 
93
137
  class DuplicateCertificateException < ServiceError
@@ -103,7 +147,6 @@ module Aws::IAM
103
147
  def message
104
148
  @message || @data[:message]
105
149
  end
106
-
107
150
  end
108
151
 
109
152
  class DuplicateSSHPublicKeyException < ServiceError
@@ -119,7 +162,6 @@ module Aws::IAM
119
162
  def message
120
163
  @message || @data[:message]
121
164
  end
122
-
123
165
  end
124
166
 
125
167
  class EntityAlreadyExistsException < ServiceError
@@ -135,7 +177,6 @@ module Aws::IAM
135
177
  def message
136
178
  @message || @data[:message]
137
179
  end
138
-
139
180
  end
140
181
 
141
182
  class EntityTemporarilyUnmodifiableException < ServiceError
@@ -151,7 +192,6 @@ module Aws::IAM
151
192
  def message
152
193
  @message || @data[:message]
153
194
  end
154
-
155
195
  end
156
196
 
157
197
  class InvalidAuthenticationCodeException < ServiceError
@@ -167,7 +207,6 @@ module Aws::IAM
167
207
  def message
168
208
  @message || @data[:message]
169
209
  end
170
-
171
210
  end
172
211
 
173
212
  class InvalidCertificateException < ServiceError
@@ -183,7 +222,6 @@ module Aws::IAM
183
222
  def message
184
223
  @message || @data[:message]
185
224
  end
186
-
187
225
  end
188
226
 
189
227
  class InvalidInputException < ServiceError
@@ -199,7 +237,6 @@ module Aws::IAM
199
237
  def message
200
238
  @message || @data[:message]
201
239
  end
202
-
203
240
  end
204
241
 
205
242
  class InvalidPublicKeyException < ServiceError
@@ -215,7 +252,6 @@ module Aws::IAM
215
252
  def message
216
253
  @message || @data[:message]
217
254
  end
218
-
219
255
  end
220
256
 
221
257
  class InvalidUserTypeException < ServiceError
@@ -231,7 +267,6 @@ module Aws::IAM
231
267
  def message
232
268
  @message || @data[:message]
233
269
  end
234
-
235
270
  end
236
271
 
237
272
  class KeyPairMismatchException < ServiceError
@@ -247,7 +282,6 @@ module Aws::IAM
247
282
  def message
248
283
  @message || @data[:message]
249
284
  end
250
-
251
285
  end
252
286
 
253
287
  class LimitExceededException < ServiceError
@@ -263,7 +297,6 @@ module Aws::IAM
263
297
  def message
264
298
  @message || @data[:message]
265
299
  end
266
-
267
300
  end
268
301
 
269
302
  class MalformedCertificateException < ServiceError
@@ -279,7 +312,6 @@ module Aws::IAM
279
312
  def message
280
313
  @message || @data[:message]
281
314
  end
282
-
283
315
  end
284
316
 
285
317
  class MalformedPolicyDocumentException < ServiceError
@@ -295,7 +327,6 @@ module Aws::IAM
295
327
  def message
296
328
  @message || @data[:message]
297
329
  end
298
-
299
330
  end
300
331
 
301
332
  class NoSuchEntityException < ServiceError
@@ -311,7 +342,6 @@ module Aws::IAM
311
342
  def message
312
343
  @message || @data[:message]
313
344
  end
314
-
315
345
  end
316
346
 
317
347
  class PasswordPolicyViolationException < ServiceError
@@ -327,7 +357,6 @@ module Aws::IAM
327
357
  def message
328
358
  @message || @data[:message]
329
359
  end
330
-
331
360
  end
332
361
 
333
362
  class PolicyEvaluationException < ServiceError
@@ -343,7 +372,6 @@ module Aws::IAM
343
372
  def message
344
373
  @message || @data[:message]
345
374
  end
346
-
347
375
  end
348
376
 
349
377
  class PolicyNotAttachableException < ServiceError
@@ -359,7 +387,6 @@ module Aws::IAM
359
387
  def message
360
388
  @message || @data[:message]
361
389
  end
362
-
363
390
  end
364
391
 
365
392
  class ReportGenerationLimitExceededException < ServiceError
@@ -375,7 +402,6 @@ module Aws::IAM
375
402
  def message
376
403
  @message || @data[:message]
377
404
  end
378
-
379
405
  end
380
406
 
381
407
  class ServiceFailureException < ServiceError
@@ -391,7 +417,6 @@ module Aws::IAM
391
417
  def message
392
418
  @message || @data[:message]
393
419
  end
394
-
395
420
  end
396
421
 
397
422
  class ServiceNotSupportedException < ServiceError
@@ -407,7 +432,6 @@ module Aws::IAM
407
432
  def message
408
433
  @message || @data[:message]
409
434
  end
410
-
411
435
  end
412
436
 
413
437
  class UnmodifiableEntityException < ServiceError
@@ -423,7 +447,6 @@ module Aws::IAM
423
447
  def message
424
448
  @message || @data[:message]
425
449
  end
426
-
427
450
  end
428
451
 
429
452
  class UnrecognizedPublicKeyEncodingException < ServiceError
@@ -439,7 +462,6 @@ module Aws::IAM
439
462
  def message
440
463
  @message || @data[:message]
441
464
  end
442
-
443
465
  end
444
466
 
445
467
  end
@@ -6,6 +6,7 @@
6
6
  # WARNING ABOUT GENERATED CODE
7
7
 
8
8
  module Aws::IAM
9
+
9
10
  class Group
10
11
 
11
12
  extend Aws::Deprecations
@@ -118,7 +119,8 @@ module Aws::IAM
118
119
  # Waiter polls an API operation until a resource enters a desired
119
120
  # state.
120
121
  #
121
- # @note The waiting operation is performed on a copy. The original resource remains unchanged
122
+ # @note The waiting operation is performed on a copy. The original resource
123
+ # remains unchanged.
122
124
  #
123
125
  # ## Basic Usage
124
126
  #
@@ -131,13 +133,15 @@ module Aws::IAM
131
133
  #
132
134
  # ## Example
133
135
  #
134
- # instance.wait_until(max_attempts:10, delay:5) {|instance| instance.state.name == 'running' }
136
+ # instance.wait_until(max_attempts:10, delay:5) do |instance|
137
+ # instance.state.name == 'running'
138
+ # end
135
139
  #
136
140
  # ## Configuration
137
141
  #
138
142
  # You can configure the maximum number of polling attempts, and the
139
- # delay (in seconds) between each polling attempt. The waiting condition is set
140
- # by passing a block to {#wait_until}:
143
+ # delay (in seconds) between each polling attempt. The waiting condition is
144
+ # set by passing a block to {#wait_until}:
141
145
  #
142
146
  # # poll for ~25 seconds
143
147
  # resource.wait_until(max_attempts:5,delay:5) {|resource|...}
@@ -168,17 +172,16 @@ module Aws::IAM
168
172
  # # resource did not enter the desired state in time
169
173
  # end
170
174
  #
175
+ # @yieldparam [Resource] resource to be used in the waiting condition.
171
176
  #
172
- # @yield param [Resource] resource to be used in the waiting condition
173
- #
174
- # @raise [Aws::Waiters::Errors::FailureStateError] Raised when the waiter terminates
175
- # because the waiter has entered a state that it will not transition
176
- # out of, preventing success.
177
+ # @raise [Aws::Waiters::Errors::FailureStateError] Raised when the waiter
178
+ # terminates because the waiter has entered a state that it will not
179
+ # transition out of, preventing success.
177
180
  #
178
181
  # yet successful.
179
182
  #
180
- # @raise [Aws::Waiters::Errors::UnexpectedError] Raised when an error is encountered
181
- # while polling for a resource that is not expected.
183
+ # @raise [Aws::Waiters::Errors::UnexpectedError] Raised when an error is
184
+ # encountered while polling for a resource that is not expected.
182
185
  #
183
186
  # @raise [NotImplementedError] Raised when the resource does not
184
187
  #
@@ -335,7 +338,7 @@ module Aws::IAM
335
338
  # @return [GroupPolicy]
336
339
  def create_policy(options = {})
337
340
  options = options.merge(group_name: @name)
338
- resp = @client.put_group_policy(options)
341
+ @client.put_group_policy(options)
339
342
  GroupPolicy.new(
340
343
  group_name: @name,
341
344
  name: options[:policy_name],
@@ -431,7 +434,7 @@ module Aws::IAM
431
434
  # @return [Group]
432
435
  def update(options = {})
433
436
  options = options.merge(group_name: @name)
434
- resp = @client.update_group(options)
437
+ @client.update_group(options)
435
438
  Group.new(
436
439
  name: options[:new_group_name],
437
440
  client: @client
@@ -6,6 +6,7 @@
6
6
  # WARNING ABOUT GENERATED CODE
7
7
 
8
8
  module Aws::IAM
9
+
9
10
  class GroupPolicy
10
11
 
11
12
  extend Aws::Deprecations
@@ -94,7 +95,8 @@ module Aws::IAM
94
95
  # Waiter polls an API operation until a resource enters a desired
95
96
  # state.
96
97
  #
97
- # @note The waiting operation is performed on a copy. The original resource remains unchanged
98
+ # @note The waiting operation is performed on a copy. The original resource
99
+ # remains unchanged.
98
100
  #
99
101
  # ## Basic Usage
100
102
  #
@@ -107,13 +109,15 @@ module Aws::IAM
107
109
  #
108
110
  # ## Example
109
111
  #
110
- # instance.wait_until(max_attempts:10, delay:5) {|instance| instance.state.name == 'running' }
112
+ # instance.wait_until(max_attempts:10, delay:5) do |instance|
113
+ # instance.state.name == 'running'
114
+ # end
111
115
  #
112
116
  # ## Configuration
113
117
  #
114
118
  # You can configure the maximum number of polling attempts, and the
115
- # delay (in seconds) between each polling attempt. The waiting condition is set
116
- # by passing a block to {#wait_until}:
119
+ # delay (in seconds) between each polling attempt. The waiting condition is
120
+ # set by passing a block to {#wait_until}:
117
121
  #
118
122
  # # poll for ~25 seconds
119
123
  # resource.wait_until(max_attempts:5,delay:5) {|resource|...}
@@ -144,17 +148,16 @@ module Aws::IAM
144
148
  # # resource did not enter the desired state in time
145
149
  # end
146
150
  #
151
+ # @yieldparam [Resource] resource to be used in the waiting condition.
147
152
  #
148
- # @yield param [Resource] resource to be used in the waiting condition
149
- #
150
- # @raise [Aws::Waiters::Errors::FailureStateError] Raised when the waiter terminates
151
- # because the waiter has entered a state that it will not transition
152
- # out of, preventing success.
153
+ # @raise [Aws::Waiters::Errors::FailureStateError] Raised when the waiter
154
+ # terminates because the waiter has entered a state that it will not
155
+ # transition out of, preventing success.
153
156
  #
154
157
  # yet successful.
155
158
  #
156
- # @raise [Aws::Waiters::Errors::UnexpectedError] Raised when an error is encountered
157
- # while polling for a resource that is not expected.
159
+ # @raise [Aws::Waiters::Errors::UnexpectedError] Raised when an error is
160
+ # encountered while polling for a resource that is not expected.
158
161
  #
159
162
  # @raise [NotImplementedError] Raised when the resource does not
160
163
  #