lib/aws-sdk-ec2/image.rb in aws-sdk-ec2-1.151.0 vs lib/aws-sdk-ec2/image.rb in aws-sdk-ec2-1.152.0
- old
+ new
@@ -279,11 +279,12 @@
# @deprecated Use [Aws::EC2::Client] #wait_until instead
#
# Waiter polls an API operation until a resource enters a desired
# state.
#
- # @note The waiting operation is performed on a copy. The original resource remains unchanged
+ # @note The waiting operation is performed on a copy. The original resource
+ # remains unchanged.
#
# ## Basic Usage
#
# Waiter will polls until it is successful, it fails by
# entering a terminal state, or until a maximum number of attempts
@@ -292,17 +293,19 @@
# # polls in a loop until condition is true
# resource.wait_until(options) {|resource| condition}
#
# ## Example
#
- # instance.wait_until(max_attempts:10, delay:5) {|instance| instance.state.name == 'running' }
+ # instance.wait_until(max_attempts:10, delay:5) do |instance|
+ # instance.state.name == 'running'
+ # end
#
# ## Configuration
#
# You can configure the maximum number of polling attempts, and the
- # delay (in seconds) between each polling attempt. The waiting condition is set
- # by passing a block to {#wait_until}:
+ # delay (in seconds) between each polling attempt. The waiting condition is
+ # set by passing a block to {#wait_until}:
#
# # poll for ~25 seconds
# resource.wait_until(max_attempts:5,delay:5) {|resource|...}
#
# ## Callbacks
@@ -329,21 +332,20 @@
# resource.wait_until(...)
# rescue Aws::Waiters::Errors::WaiterFailed
# # resource did not enter the desired state in time
# end
#
+ # @yieldparam [Resource] resource to be used in the waiting condition.
#
- # @yield param [Resource] resource to be used in the waiting condition
+ # @raise [Aws::Waiters::Errors::FailureStateError] Raised when the waiter
+ # terminates because the waiter has entered a state that it will not
+ # transition out of, preventing success.
#
- # @raise [Aws::Waiters::Errors::FailureStateError] Raised when the waiter terminates
- # because the waiter has entered a state that it will not transition
- # out of, preventing success.
- #
# yet successful.
#
- # @raise [Aws::Waiters::Errors::UnexpectedError] Raised when an error is encountered
- # while polling for a resource that is not expected.
+ # @raise [Aws::Waiters::Errors::UnexpectedError] Raised when an error is
+ # encountered while polling for a resource that is not expected.
#
# @raise [NotImplementedError] Raised when the resource does not
#
# @option options [Integer] :max_attempts (10) Maximum number of
# attempts
@@ -610,10 +612,12 @@
end
yield(waiter.waiter)
end
def separate_params_and_options(options)
- opts = Set.new([:client, :max_attempts, :delay, :before_attempt, :before_wait])
+ opts = Set.new(
+ [:client, :max_attempts, :delay, :before_attempt, :before_wait]
+ )
waiter_opts = {}
waiter_params = {}
options.each_pair do |key, value|
if opts.include?(key)
waiter_opts[key] = value