aws-sdk-iam 1.34.0 → 1.39.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/lib/aws-sdk-iam.rb +1 -1
- data/lib/aws-sdk-iam/access_key.rb +13 -11
- data/lib/aws-sdk-iam/access_key_pair.rb +13 -11
- data/lib/aws-sdk-iam/account_password_policy.rb +13 -11
- data/lib/aws-sdk-iam/account_summary.rb +13 -11
- data/lib/aws-sdk-iam/assume_role_policy.rb +13 -11
- data/lib/aws-sdk-iam/client.rb +141 -31
- data/lib/aws-sdk-iam/client_api.rb +15 -0
- data/lib/aws-sdk-iam/current_user.rb +13 -11
- data/lib/aws-sdk-iam/group.rb +15 -13
- data/lib/aws-sdk-iam/group_policy.rb +13 -11
- data/lib/aws-sdk-iam/instance_profile.rb +18 -14
- data/lib/aws-sdk-iam/login_profile.rb +13 -11
- data/lib/aws-sdk-iam/mfa_device.rb +13 -11
- data/lib/aws-sdk-iam/policy.rb +13 -11
- data/lib/aws-sdk-iam/policy_version.rb +13 -11
- data/lib/aws-sdk-iam/resource.rb +8 -3
- data/lib/aws-sdk-iam/role.rb +13 -11
- data/lib/aws-sdk-iam/role_policy.rb +13 -11
- data/lib/aws-sdk-iam/saml_provider.rb +13 -11
- data/lib/aws-sdk-iam/server_certificate.rb +14 -12
- data/lib/aws-sdk-iam/signing_certificate.rb +13 -11
- data/lib/aws-sdk-iam/types.rb +123 -8
- data/lib/aws-sdk-iam/user.rb +21 -17
- data/lib/aws-sdk-iam/user_policy.rb +13 -11
- data/lib/aws-sdk-iam/virtual_mfa_device.rb +13 -11
- data/lib/aws-sdk-iam/waiters.rb +64 -0
- metadata +3 -3
@@ -11,6 +11,7 @@ module Aws::IAM
|
|
11
11
|
|
12
12
|
include Seahorse::Model
|
13
13
|
|
14
|
+
AccessAdvisorUsageGranularityType = Shapes::StringShape.new(name: 'AccessAdvisorUsageGranularityType')
|
14
15
|
AccessDetail = Shapes::StructureShape.new(name: 'AccessDetail')
|
15
16
|
AccessDetails = Shapes::ListShape.new(name: 'AccessDetails')
|
16
17
|
AccessKey = Shapes::StructureShape.new(name: 'AccessKey')
|
@@ -320,6 +321,8 @@ module Aws::IAM
|
|
320
321
|
Tag = Shapes::StructureShape.new(name: 'Tag')
|
321
322
|
TagRoleRequest = Shapes::StructureShape.new(name: 'TagRoleRequest')
|
322
323
|
TagUserRequest = Shapes::StructureShape.new(name: 'TagUserRequest')
|
324
|
+
TrackedActionLastAccessed = Shapes::StructureShape.new(name: 'TrackedActionLastAccessed')
|
325
|
+
TrackedActionsLastAccessed = Shapes::ListShape.new(name: 'TrackedActionsLastAccessed')
|
323
326
|
UnmodifiableEntityException = Shapes::StructureShape.new(name: 'UnmodifiableEntityException')
|
324
327
|
UnrecognizedPublicKeyEncodingException = Shapes::StructureShape.new(name: 'UnrecognizedPublicKeyEncodingException')
|
325
328
|
UntagRoleRequest = Shapes::StructureShape.new(name: 'UntagRoleRequest')
|
@@ -833,6 +836,7 @@ module Aws::IAM
|
|
833
836
|
GenerateOrganizationsAccessReportResponse.struct_class = Types::GenerateOrganizationsAccessReportResponse
|
834
837
|
|
835
838
|
GenerateServiceLastAccessedDetailsRequest.add_member(:arn, Shapes::ShapeRef.new(shape: arnType, required: true, location_name: "Arn"))
|
839
|
+
GenerateServiceLastAccessedDetailsRequest.add_member(:granularity, Shapes::ShapeRef.new(shape: AccessAdvisorUsageGranularityType, location_name: "Granularity"))
|
836
840
|
GenerateServiceLastAccessedDetailsRequest.struct_class = Types::GenerateServiceLastAccessedDetailsRequest
|
837
841
|
|
838
842
|
GenerateServiceLastAccessedDetailsResponse.add_member(:job_id, Shapes::ShapeRef.new(shape: jobIDType, location_name: "JobId"))
|
@@ -993,6 +997,7 @@ module Aws::IAM
|
|
993
997
|
GetServiceLastAccessedDetailsRequest.struct_class = Types::GetServiceLastAccessedDetailsRequest
|
994
998
|
|
995
999
|
GetServiceLastAccessedDetailsResponse.add_member(:job_status, Shapes::ShapeRef.new(shape: jobStatusType, required: true, location_name: "JobStatus"))
|
1000
|
+
GetServiceLastAccessedDetailsResponse.add_member(:job_type, Shapes::ShapeRef.new(shape: AccessAdvisorUsageGranularityType, location_name: "JobType"))
|
996
1001
|
GetServiceLastAccessedDetailsResponse.add_member(:job_creation_date, Shapes::ShapeRef.new(shape: dateType, required: true, location_name: "JobCreationDate"))
|
997
1002
|
GetServiceLastAccessedDetailsResponse.add_member(:services_last_accessed, Shapes::ShapeRef.new(shape: ServicesLastAccessed, required: true, location_name: "ServicesLastAccessed"))
|
998
1003
|
GetServiceLastAccessedDetailsResponse.add_member(:job_completion_date, Shapes::ShapeRef.new(shape: dateType, required: true, location_name: "JobCompletionDate"))
|
@@ -1626,7 +1631,9 @@ module Aws::IAM
|
|
1626
1631
|
ServiceLastAccessed.add_member(:last_authenticated, Shapes::ShapeRef.new(shape: dateType, location_name: "LastAuthenticated"))
|
1627
1632
|
ServiceLastAccessed.add_member(:service_namespace, Shapes::ShapeRef.new(shape: serviceNamespaceType, required: true, location_name: "ServiceNamespace"))
|
1628
1633
|
ServiceLastAccessed.add_member(:last_authenticated_entity, Shapes::ShapeRef.new(shape: arnType, location_name: "LastAuthenticatedEntity"))
|
1634
|
+
ServiceLastAccessed.add_member(:last_authenticated_region, Shapes::ShapeRef.new(shape: stringType, location_name: "LastAuthenticatedRegion"))
|
1629
1635
|
ServiceLastAccessed.add_member(:total_authenticated_entities, Shapes::ShapeRef.new(shape: integerType, location_name: "TotalAuthenticatedEntities"))
|
1636
|
+
ServiceLastAccessed.add_member(:tracked_actions_last_accessed, Shapes::ShapeRef.new(shape: TrackedActionsLastAccessed, location_name: "TrackedActionsLastAccessed"))
|
1630
1637
|
ServiceLastAccessed.struct_class = Types::ServiceLastAccessed
|
1631
1638
|
|
1632
1639
|
ServiceNotSupportedException.add_member(:message, Shapes::ShapeRef.new(shape: serviceNotSupportedMessage, location_name: "message"))
|
@@ -1721,6 +1728,14 @@ module Aws::IAM
|
|
1721
1728
|
TagUserRequest.add_member(:tags, Shapes::ShapeRef.new(shape: tagListType, required: true, location_name: "Tags"))
|
1722
1729
|
TagUserRequest.struct_class = Types::TagUserRequest
|
1723
1730
|
|
1731
|
+
TrackedActionLastAccessed.add_member(:action_name, Shapes::ShapeRef.new(shape: stringType, location_name: "ActionName"))
|
1732
|
+
TrackedActionLastAccessed.add_member(:last_accessed_entity, Shapes::ShapeRef.new(shape: arnType, location_name: "LastAccessedEntity"))
|
1733
|
+
TrackedActionLastAccessed.add_member(:last_accessed_time, Shapes::ShapeRef.new(shape: dateType, location_name: "LastAccessedTime"))
|
1734
|
+
TrackedActionLastAccessed.add_member(:last_accessed_region, Shapes::ShapeRef.new(shape: stringType, location_name: "LastAccessedRegion"))
|
1735
|
+
TrackedActionLastAccessed.struct_class = Types::TrackedActionLastAccessed
|
1736
|
+
|
1737
|
+
TrackedActionsLastAccessed.member = Shapes::ShapeRef.new(shape: TrackedActionLastAccessed)
|
1738
|
+
|
1724
1739
|
UnmodifiableEntityException.add_member(:message, Shapes::ShapeRef.new(shape: unmodifiableEntityMessage, location_name: "message"))
|
1725
1740
|
UnmodifiableEntityException.struct_class = Types::UnmodifiableEntityException
|
1726
1741
|
|
@@ -169,7 +169,8 @@ module Aws::IAM
|
|
169
169
|
# Waiter polls an API operation until a resource enters a desired
|
170
170
|
# state.
|
171
171
|
#
|
172
|
-
# @note The waiting operation is performed on a copy. The original resource
|
172
|
+
# @note The waiting operation is performed on a copy. The original resource
|
173
|
+
# remains unchanged.
|
173
174
|
#
|
174
175
|
# ## Basic Usage
|
175
176
|
#
|
@@ -182,13 +183,15 @@ module Aws::IAM
|
|
182
183
|
#
|
183
184
|
# ## Example
|
184
185
|
#
|
185
|
-
# instance.wait_until(max_attempts:10, delay:5)
|
186
|
+
# instance.wait_until(max_attempts:10, delay:5) do |instance|
|
187
|
+
# instance.state.name == 'running'
|
188
|
+
# end
|
186
189
|
#
|
187
190
|
# ## Configuration
|
188
191
|
#
|
189
192
|
# You can configure the maximum number of polling attempts, and the
|
190
|
-
# delay (in seconds) between each polling attempt. The waiting condition is
|
191
|
-
# 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}:
|
192
195
|
#
|
193
196
|
# # poll for ~25 seconds
|
194
197
|
# resource.wait_until(max_attempts:5,delay:5) {|resource|...}
|
@@ -219,17 +222,16 @@ module Aws::IAM
|
|
219
222
|
# # resource did not enter the desired state in time
|
220
223
|
# end
|
221
224
|
#
|
225
|
+
# @yieldparam [Resource] resource to be used in the waiting condition.
|
222
226
|
#
|
223
|
-
# @
|
224
|
-
#
|
225
|
-
#
|
226
|
-
# because the waiter has entered a state that it will not transition
|
227
|
-
# 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.
|
228
230
|
#
|
229
231
|
# yet successful.
|
230
232
|
#
|
231
|
-
# @raise [Aws::Waiters::Errors::UnexpectedError] Raised when an error is
|
232
|
-
# 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.
|
233
235
|
#
|
234
236
|
# @raise [NotImplementedError] Raised when the resource does not
|
235
237
|
#
|
data/lib/aws-sdk-iam/group.rb
CHANGED
@@ -119,7 +119,8 @@ module Aws::IAM
|
|
119
119
|
# Waiter polls an API operation until a resource enters a desired
|
120
120
|
# state.
|
121
121
|
#
|
122
|
-
# @note The waiting operation is performed on a copy. The original resource
|
122
|
+
# @note The waiting operation is performed on a copy. The original resource
|
123
|
+
# remains unchanged.
|
123
124
|
#
|
124
125
|
# ## Basic Usage
|
125
126
|
#
|
@@ -132,13 +133,15 @@ module Aws::IAM
|
|
132
133
|
#
|
133
134
|
# ## Example
|
134
135
|
#
|
135
|
-
# instance.wait_until(max_attempts:10, delay:5)
|
136
|
+
# instance.wait_until(max_attempts:10, delay:5) do |instance|
|
137
|
+
# instance.state.name == 'running'
|
138
|
+
# end
|
136
139
|
#
|
137
140
|
# ## Configuration
|
138
141
|
#
|
139
142
|
# You can configure the maximum number of polling attempts, and the
|
140
|
-
# delay (in seconds) between each polling attempt. The waiting condition is
|
141
|
-
# 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}:
|
142
145
|
#
|
143
146
|
# # poll for ~25 seconds
|
144
147
|
# resource.wait_until(max_attempts:5,delay:5) {|resource|...}
|
@@ -169,17 +172,16 @@ module Aws::IAM
|
|
169
172
|
# # resource did not enter the desired state in time
|
170
173
|
# end
|
171
174
|
#
|
175
|
+
# @yieldparam [Resource] resource to be used in the waiting condition.
|
172
176
|
#
|
173
|
-
# @
|
174
|
-
#
|
175
|
-
#
|
176
|
-
# because the waiter has entered a state that it will not transition
|
177
|
-
# 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.
|
178
180
|
#
|
179
181
|
# yet successful.
|
180
182
|
#
|
181
|
-
# @raise [Aws::Waiters::Errors::UnexpectedError] Raised when an error is
|
182
|
-
# 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.
|
183
185
|
#
|
184
186
|
# @raise [NotImplementedError] Raised when the resource does not
|
185
187
|
#
|
@@ -336,7 +338,7 @@ module Aws::IAM
|
|
336
338
|
# @return [GroupPolicy]
|
337
339
|
def create_policy(options = {})
|
338
340
|
options = options.merge(group_name: @name)
|
339
|
-
|
341
|
+
@client.put_group_policy(options)
|
340
342
|
GroupPolicy.new(
|
341
343
|
group_name: @name,
|
342
344
|
name: options[:policy_name],
|
@@ -432,7 +434,7 @@ module Aws::IAM
|
|
432
434
|
# @return [Group]
|
433
435
|
def update(options = {})
|
434
436
|
options = options.merge(group_name: @name)
|
435
|
-
|
437
|
+
@client.update_group(options)
|
436
438
|
Group.new(
|
437
439
|
name: options[:new_group_name],
|
438
440
|
client: @client
|
@@ -95,7 +95,8 @@ module Aws::IAM
|
|
95
95
|
# Waiter polls an API operation until a resource enters a desired
|
96
96
|
# state.
|
97
97
|
#
|
98
|
-
# @note The waiting operation is performed on a copy. The original resource
|
98
|
+
# @note The waiting operation is performed on a copy. The original resource
|
99
|
+
# remains unchanged.
|
99
100
|
#
|
100
101
|
# ## Basic Usage
|
101
102
|
#
|
@@ -108,13 +109,15 @@ module Aws::IAM
|
|
108
109
|
#
|
109
110
|
# ## Example
|
110
111
|
#
|
111
|
-
# instance.wait_until(max_attempts:10, delay:5)
|
112
|
+
# instance.wait_until(max_attempts:10, delay:5) do |instance|
|
113
|
+
# instance.state.name == 'running'
|
114
|
+
# end
|
112
115
|
#
|
113
116
|
# ## Configuration
|
114
117
|
#
|
115
118
|
# You can configure the maximum number of polling attempts, and the
|
116
|
-
# delay (in seconds) between each polling attempt. The waiting condition is
|
117
|
-
# 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}:
|
118
121
|
#
|
119
122
|
# # poll for ~25 seconds
|
120
123
|
# resource.wait_until(max_attempts:5,delay:5) {|resource|...}
|
@@ -145,17 +148,16 @@ module Aws::IAM
|
|
145
148
|
# # resource did not enter the desired state in time
|
146
149
|
# end
|
147
150
|
#
|
151
|
+
# @yieldparam [Resource] resource to be used in the waiting condition.
|
148
152
|
#
|
149
|
-
# @
|
150
|
-
#
|
151
|
-
#
|
152
|
-
# because the waiter has entered a state that it will not transition
|
153
|
-
# 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.
|
154
156
|
#
|
155
157
|
# yet successful.
|
156
158
|
#
|
157
|
-
# @raise [Aws::Waiters::Errors::UnexpectedError] Raised when an error is
|
158
|
-
# 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.
|
159
161
|
#
|
160
162
|
# @raise [NotImplementedError] Raised when the resource does not
|
161
163
|
#
|
@@ -145,7 +145,8 @@ module Aws::IAM
|
|
145
145
|
# Waiter polls an API operation until a resource enters a desired
|
146
146
|
# state.
|
147
147
|
#
|
148
|
-
# @note The waiting operation is performed on a copy. The original resource
|
148
|
+
# @note The waiting operation is performed on a copy. The original resource
|
149
|
+
# remains unchanged.
|
149
150
|
#
|
150
151
|
# ## Basic Usage
|
151
152
|
#
|
@@ -158,13 +159,15 @@ module Aws::IAM
|
|
158
159
|
#
|
159
160
|
# ## Example
|
160
161
|
#
|
161
|
-
# instance.wait_until(max_attempts:10, delay:5)
|
162
|
+
# instance.wait_until(max_attempts:10, delay:5) do |instance|
|
163
|
+
# instance.state.name == 'running'
|
164
|
+
# end
|
162
165
|
#
|
163
166
|
# ## Configuration
|
164
167
|
#
|
165
168
|
# You can configure the maximum number of polling attempts, and the
|
166
|
-
# delay (in seconds) between each polling attempt. The waiting condition is
|
167
|
-
# by passing a block to {#wait_until}:
|
169
|
+
# delay (in seconds) between each polling attempt. The waiting condition is
|
170
|
+
# set by passing a block to {#wait_until}:
|
168
171
|
#
|
169
172
|
# # poll for ~25 seconds
|
170
173
|
# resource.wait_until(max_attempts:5,delay:5) {|resource|...}
|
@@ -195,17 +198,16 @@ module Aws::IAM
|
|
195
198
|
# # resource did not enter the desired state in time
|
196
199
|
# end
|
197
200
|
#
|
201
|
+
# @yieldparam [Resource] resource to be used in the waiting condition.
|
198
202
|
#
|
199
|
-
# @
|
200
|
-
#
|
201
|
-
#
|
202
|
-
# because the waiter has entered a state that it will not transition
|
203
|
-
# out of, preventing success.
|
203
|
+
# @raise [Aws::Waiters::Errors::FailureStateError] Raised when the waiter
|
204
|
+
# terminates because the waiter has entered a state that it will not
|
205
|
+
# transition out of, preventing success.
|
204
206
|
#
|
205
207
|
# yet successful.
|
206
208
|
#
|
207
|
-
# @raise [Aws::Waiters::Errors::UnexpectedError] Raised when an error is
|
208
|
-
# while polling for a resource that is not expected.
|
209
|
+
# @raise [Aws::Waiters::Errors::UnexpectedError] Raised when an error is
|
210
|
+
# encountered while polling for a resource that is not expected.
|
209
211
|
#
|
210
212
|
# @raise [NotImplementedError] Raised when the resource does not
|
211
213
|
#
|
@@ -333,8 +335,8 @@ module Aws::IAM
|
|
333
335
|
|
334
336
|
def yield_waiter_and_warn(waiter, &block)
|
335
337
|
if !@waiter_block_warned
|
336
|
-
msg = "pass options to configure the waiter; "
|
337
|
-
|
338
|
+
msg = "pass options to configure the waiter; "\
|
339
|
+
"yielding the waiter is deprecated"
|
338
340
|
warn(msg)
|
339
341
|
@waiter_block_warned = true
|
340
342
|
end
|
@@ -342,7 +344,9 @@ module Aws::IAM
|
|
342
344
|
end
|
343
345
|
|
344
346
|
def separate_params_and_options(options)
|
345
|
-
opts = Set.new(
|
347
|
+
opts = Set.new(
|
348
|
+
[:client, :max_attempts, :delay, :before_attempt, :before_wait]
|
349
|
+
)
|
346
350
|
waiter_opts = {}
|
347
351
|
waiter_params = {}
|
348
352
|
options.each_pair do |key, value|
|
@@ -85,7 +85,8 @@ module Aws::IAM
|
|
85
85
|
# Waiter polls an API operation until a resource enters a desired
|
86
86
|
# state.
|
87
87
|
#
|
88
|
-
# @note The waiting operation is performed on a copy. The original resource
|
88
|
+
# @note The waiting operation is performed on a copy. The original resource
|
89
|
+
# remains unchanged.
|
89
90
|
#
|
90
91
|
# ## Basic Usage
|
91
92
|
#
|
@@ -98,13 +99,15 @@ module Aws::IAM
|
|
98
99
|
#
|
99
100
|
# ## Example
|
100
101
|
#
|
101
|
-
# instance.wait_until(max_attempts:10, delay:5)
|
102
|
+
# instance.wait_until(max_attempts:10, delay:5) do |instance|
|
103
|
+
# instance.state.name == 'running'
|
104
|
+
# end
|
102
105
|
#
|
103
106
|
# ## Configuration
|
104
107
|
#
|
105
108
|
# You can configure the maximum number of polling attempts, and the
|
106
|
-
# delay (in seconds) between each polling attempt. The waiting condition is
|
107
|
-
# by passing a block to {#wait_until}:
|
109
|
+
# delay (in seconds) between each polling attempt. The waiting condition is
|
110
|
+
# set by passing a block to {#wait_until}:
|
108
111
|
#
|
109
112
|
# # poll for ~25 seconds
|
110
113
|
# resource.wait_until(max_attempts:5,delay:5) {|resource|...}
|
@@ -135,17 +138,16 @@ module Aws::IAM
|
|
135
138
|
# # resource did not enter the desired state in time
|
136
139
|
# end
|
137
140
|
#
|
141
|
+
# @yieldparam [Resource] resource to be used in the waiting condition.
|
138
142
|
#
|
139
|
-
# @
|
140
|
-
#
|
141
|
-
#
|
142
|
-
# because the waiter has entered a state that it will not transition
|
143
|
-
# out of, preventing success.
|
143
|
+
# @raise [Aws::Waiters::Errors::FailureStateError] Raised when the waiter
|
144
|
+
# terminates because the waiter has entered a state that it will not
|
145
|
+
# transition out of, preventing success.
|
144
146
|
#
|
145
147
|
# yet successful.
|
146
148
|
#
|
147
|
-
# @raise [Aws::Waiters::Errors::UnexpectedError] Raised when an error is
|
148
|
-
# while polling for a resource that is not expected.
|
149
|
+
# @raise [Aws::Waiters::Errors::UnexpectedError] Raised when an error is
|
150
|
+
# encountered while polling for a resource that is not expected.
|
149
151
|
#
|
150
152
|
# @raise [NotImplementedError] Raised when the resource does not
|
151
153
|
#
|
@@ -81,7 +81,8 @@ module Aws::IAM
|
|
81
81
|
# Waiter polls an API operation until a resource enters a desired
|
82
82
|
# state.
|
83
83
|
#
|
84
|
-
# @note The waiting operation is performed on a copy. The original resource
|
84
|
+
# @note The waiting operation is performed on a copy. The original resource
|
85
|
+
# remains unchanged.
|
85
86
|
#
|
86
87
|
# ## Basic Usage
|
87
88
|
#
|
@@ -94,13 +95,15 @@ module Aws::IAM
|
|
94
95
|
#
|
95
96
|
# ## Example
|
96
97
|
#
|
97
|
-
# instance.wait_until(max_attempts:10, delay:5)
|
98
|
+
# instance.wait_until(max_attempts:10, delay:5) do |instance|
|
99
|
+
# instance.state.name == 'running'
|
100
|
+
# end
|
98
101
|
#
|
99
102
|
# ## Configuration
|
100
103
|
#
|
101
104
|
# You can configure the maximum number of polling attempts, and the
|
102
|
-
# delay (in seconds) between each polling attempt. The waiting condition is
|
103
|
-
# by passing a block to {#wait_until}:
|
105
|
+
# delay (in seconds) between each polling attempt. The waiting condition is
|
106
|
+
# set by passing a block to {#wait_until}:
|
104
107
|
#
|
105
108
|
# # poll for ~25 seconds
|
106
109
|
# resource.wait_until(max_attempts:5,delay:5) {|resource|...}
|
@@ -131,17 +134,16 @@ module Aws::IAM
|
|
131
134
|
# # resource did not enter the desired state in time
|
132
135
|
# end
|
133
136
|
#
|
137
|
+
# @yieldparam [Resource] resource to be used in the waiting condition.
|
134
138
|
#
|
135
|
-
# @
|
136
|
-
#
|
137
|
-
#
|
138
|
-
# because the waiter has entered a state that it will not transition
|
139
|
-
# out of, preventing success.
|
139
|
+
# @raise [Aws::Waiters::Errors::FailureStateError] Raised when the waiter
|
140
|
+
# terminates because the waiter has entered a state that it will not
|
141
|
+
# transition out of, preventing success.
|
140
142
|
#
|
141
143
|
# yet successful.
|
142
144
|
#
|
143
|
-
# @raise [Aws::Waiters::Errors::UnexpectedError] Raised when an error is
|
144
|
-
# while polling for a resource that is not expected.
|
145
|
+
# @raise [Aws::Waiters::Errors::UnexpectedError] Raised when an error is
|
146
|
+
# encountered while polling for a resource that is not expected.
|
145
147
|
#
|
146
148
|
# @raise [NotImplementedError] Raised when the resource does not
|
147
149
|
#
|
data/lib/aws-sdk-iam/policy.rb
CHANGED
@@ -175,7 +175,8 @@ module Aws::IAM
|
|
175
175
|
# Waiter polls an API operation until a resource enters a desired
|
176
176
|
# state.
|
177
177
|
#
|
178
|
-
# @note The waiting operation is performed on a copy. The original resource
|
178
|
+
# @note The waiting operation is performed on a copy. The original resource
|
179
|
+
# remains unchanged.
|
179
180
|
#
|
180
181
|
# ## Basic Usage
|
181
182
|
#
|
@@ -188,13 +189,15 @@ module Aws::IAM
|
|
188
189
|
#
|
189
190
|
# ## Example
|
190
191
|
#
|
191
|
-
# instance.wait_until(max_attempts:10, delay:5)
|
192
|
+
# instance.wait_until(max_attempts:10, delay:5) do |instance|
|
193
|
+
# instance.state.name == 'running'
|
194
|
+
# end
|
192
195
|
#
|
193
196
|
# ## Configuration
|
194
197
|
#
|
195
198
|
# You can configure the maximum number of polling attempts, and the
|
196
|
-
# delay (in seconds) between each polling attempt. The waiting condition is
|
197
|
-
# by passing a block to {#wait_until}:
|
199
|
+
# delay (in seconds) between each polling attempt. The waiting condition is
|
200
|
+
# set by passing a block to {#wait_until}:
|
198
201
|
#
|
199
202
|
# # poll for ~25 seconds
|
200
203
|
# resource.wait_until(max_attempts:5,delay:5) {|resource|...}
|
@@ -225,17 +228,16 @@ module Aws::IAM
|
|
225
228
|
# # resource did not enter the desired state in time
|
226
229
|
# end
|
227
230
|
#
|
231
|
+
# @yieldparam [Resource] resource to be used in the waiting condition.
|
228
232
|
#
|
229
|
-
# @
|
230
|
-
#
|
231
|
-
#
|
232
|
-
# because the waiter has entered a state that it will not transition
|
233
|
-
# out of, preventing success.
|
233
|
+
# @raise [Aws::Waiters::Errors::FailureStateError] Raised when the waiter
|
234
|
+
# terminates because the waiter has entered a state that it will not
|
235
|
+
# transition out of, preventing success.
|
234
236
|
#
|
235
237
|
# yet successful.
|
236
238
|
#
|
237
|
-
# @raise [Aws::Waiters::Errors::UnexpectedError] Raised when an error is
|
238
|
-
# while polling for a resource that is not expected.
|
239
|
+
# @raise [Aws::Waiters::Errors::UnexpectedError] Raised when an error is
|
240
|
+
# encountered while polling for a resource that is not expected.
|
239
241
|
#
|
240
242
|
# @raise [NotImplementedError] Raised when the resource does not
|
241
243
|
#
|