lib/aws-sdk-ec2/waiters.rb in aws-sdk-ec2-1.0.0.rc2 vs lib/aws-sdk-ec2/waiters.rb in aws-sdk-ec2-1.0.0.rc3

- old
+ new

@@ -1,1334 +1,1376 @@ # WARNING ABOUT GENERATED CODE # -# This file is generated. See the contributing for info on making contributions: +# This file is generated. See the contributing guide for more information: # https://github.com/aws/aws-sdk-ruby/blob/master/CONTRIBUTING.md # # WARNING ABOUT GENERATED CODE require 'aws-sdk-core/waiters' -module Aws - module EC2 - module Waiters - class InstanceExists +module Aws::EC2 + module Waiters - # @param [Hash] options - # @option options [required, Client] :client - # @option options [Integer] :max_attempts (40) - # @option options [Integer] :delay (5) - # @option options [Proc] :before_attempt - # @option options [Proc] :before_wait - def initialize(options) - @client = options.fetch(:client) - @waiter = Aws::Waiters::Waiter.new({ - max_attempts: 40, - delay: 5, - poller: Aws::Waiters::Poller.new( - operation_name: :describe_instances, - acceptors: [ - { - "matcher" => "path", - "expected" => true, - "argument" => "length(reservations[]) > `0`", - "state" => "success" - }, - { - "matcher" => "error", - "expected" => "InvalidInstanceID.NotFound", - "state" => "retry" - } - ] - ) - }.merge(options)) - end + class BundleTaskComplete - # @option (see Client#describe_instances) - # @return (see Client#describe_instances) - def wait(params = {}) - @waiter.wait(client: @client, params: params) - end + # @param [Hash] options + # @option options [required, Client] :client + # @option options [Integer] :max_attempts (40) + # @option options [Integer] :delay (15) + # @option options [Proc] :before_attempt + # @option options [Proc] :before_wait + def initialize(options) + @client = options.fetch(:client) + @waiter = Aws::Waiters::Waiter.new({ + max_attempts: 40, + delay: 15, + poller: Aws::Waiters::Poller.new( + operation_name: :describe_bundle_tasks, + acceptors: [ + { + "expected" => "complete", + "matcher" => "pathAll", + "state" => "success", + "argument" => "bundle_tasks[].state" + }, + { + "expected" => "failed", + "matcher" => "pathAny", + "state" => "failure", + "argument" => "bundle_tasks[].state" + } + ] + ) + }.merge(options)) + end - # @api private - attr_reader :waiter - + # @option (see Client#describe_bundle_tasks) + # @return (see Client#describe_bundle_tasks) + def wait(params = {}) + @waiter.wait(client: @client, params: params) end - class BundleTaskComplete + # @api private + attr_reader :waiter - # @param [Hash] options - # @option options [required, Client] :client - # @option options [Integer] :max_attempts (40) - # @option options [Integer] :delay (15) - # @option options [Proc] :before_attempt - # @option options [Proc] :before_wait - def initialize(options) - @client = options.fetch(:client) - @waiter = Aws::Waiters::Waiter.new({ - max_attempts: 40, - delay: 15, - poller: Aws::Waiters::Poller.new( - operation_name: :describe_bundle_tasks, - acceptors: [ - { - "expected" => "complete", - "matcher" => "pathAll", - "state" => "success", - "argument" => "bundle_tasks[].state" - }, - { - "expected" => "failed", - "matcher" => "pathAny", - "state" => "failure", - "argument" => "bundle_tasks[].state" - } - ] - ) - }.merge(options)) - end + end - # @option (see Client#describe_bundle_tasks) - # @return (see Client#describe_bundle_tasks) - def wait(params = {}) - @waiter.wait(client: @client, params: params) - end + class ConversionTaskCancelled - # @api private - attr_reader :waiter + # @param [Hash] options + # @option options [required, Client] :client + # @option options [Integer] :max_attempts (40) + # @option options [Integer] :delay (15) + # @option options [Proc] :before_attempt + # @option options [Proc] :before_wait + def initialize(options) + @client = options.fetch(:client) + @waiter = Aws::Waiters::Waiter.new({ + max_attempts: 40, + delay: 15, + poller: Aws::Waiters::Poller.new( + operation_name: :describe_conversion_tasks, + acceptors: [{ + "expected" => "cancelled", + "matcher" => "pathAll", + "state" => "success", + "argument" => "conversion_tasks[].state" + }] + ) + }.merge(options)) + end + # @option (see Client#describe_conversion_tasks) + # @return (see Client#describe_conversion_tasks) + def wait(params = {}) + @waiter.wait(client: @client, params: params) end - class ConversionTaskCancelled + # @api private + attr_reader :waiter - # @param [Hash] options - # @option options [required, Client] :client - # @option options [Integer] :max_attempts (40) - # @option options [Integer] :delay (15) - # @option options [Proc] :before_attempt - # @option options [Proc] :before_wait - def initialize(options) - @client = options.fetch(:client) - @waiter = Aws::Waiters::Waiter.new({ - max_attempts: 40, - delay: 15, - poller: Aws::Waiters::Poller.new( - operation_name: :describe_conversion_tasks, - acceptors: [{ - "expected" => "cancelled", + end + + class ConversionTaskCompleted + + # @param [Hash] options + # @option options [required, Client] :client + # @option options [Integer] :max_attempts (40) + # @option options [Integer] :delay (15) + # @option options [Proc] :before_attempt + # @option options [Proc] :before_wait + def initialize(options) + @client = options.fetch(:client) + @waiter = Aws::Waiters::Waiter.new({ + max_attempts: 40, + delay: 15, + poller: Aws::Waiters::Poller.new( + operation_name: :describe_conversion_tasks, + acceptors: [ + { + "expected" => "completed", "matcher" => "pathAll", "state" => "success", "argument" => "conversion_tasks[].state" - }] - ) - }.merge(options)) - end + }, + { + "expected" => "cancelled", + "matcher" => "pathAny", + "state" => "failure", + "argument" => "conversion_tasks[].state" + }, + { + "expected" => "cancelling", + "matcher" => "pathAny", + "state" => "failure", + "argument" => "conversion_tasks[].state" + } + ] + ) + }.merge(options)) + end - # @option (see Client#describe_conversion_tasks) - # @return (see Client#describe_conversion_tasks) - def wait(params = {}) - @waiter.wait(client: @client, params: params) - end - - # @api private - attr_reader :waiter - + # @option (see Client#describe_conversion_tasks) + # @return (see Client#describe_conversion_tasks) + def wait(params = {}) + @waiter.wait(client: @client, params: params) end - class ConversionTaskCompleted + # @api private + attr_reader :waiter - # @param [Hash] options - # @option options [required, Client] :client - # @option options [Integer] :max_attempts (40) - # @option options [Integer] :delay (15) - # @option options [Proc] :before_attempt - # @option options [Proc] :before_wait - def initialize(options) - @client = options.fetch(:client) - @waiter = Aws::Waiters::Waiter.new({ - max_attempts: 40, - delay: 15, - poller: Aws::Waiters::Poller.new( - operation_name: :describe_conversion_tasks, - acceptors: [ - { - "expected" => "completed", - "matcher" => "pathAll", - "state" => "success", - "argument" => "conversion_tasks[].state" - }, - { - "expected" => "cancelled", - "matcher" => "pathAny", - "state" => "failure", - "argument" => "conversion_tasks[].state" - }, - { - "expected" => "cancelling", - "matcher" => "pathAny", - "state" => "failure", - "argument" => "conversion_tasks[].state" - } - ] - ) - }.merge(options)) - end + end - # @option (see Client#describe_conversion_tasks) - # @return (see Client#describe_conversion_tasks) - def wait(params = {}) - @waiter.wait(client: @client, params: params) - end + class ConversionTaskDeleted - # @api private - attr_reader :waiter + # @param [Hash] options + # @option options [required, Client] :client + # @option options [Integer] :max_attempts (40) + # @option options [Integer] :delay (15) + # @option options [Proc] :before_attempt + # @option options [Proc] :before_wait + def initialize(options) + @client = options.fetch(:client) + @waiter = Aws::Waiters::Waiter.new({ + max_attempts: 40, + delay: 15, + poller: Aws::Waiters::Poller.new( + operation_name: :describe_conversion_tasks, + acceptors: [{ + "expected" => "deleted", + "matcher" => "pathAll", + "state" => "success", + "argument" => "conversion_tasks[].state" + }] + ) + }.merge(options)) + end + # @option (see Client#describe_conversion_tasks) + # @return (see Client#describe_conversion_tasks) + def wait(params = {}) + @waiter.wait(client: @client, params: params) end - class ConversionTaskDeleted + # @api private + attr_reader :waiter - # @param [Hash] options - # @option options [required, Client] :client - # @option options [Integer] :max_attempts (40) - # @option options [Integer] :delay (15) - # @option options [Proc] :before_attempt - # @option options [Proc] :before_wait - def initialize(options) - @client = options.fetch(:client) - @waiter = Aws::Waiters::Waiter.new({ - max_attempts: 40, - delay: 15, - poller: Aws::Waiters::Poller.new( - operation_name: :describe_conversion_tasks, - acceptors: [{ - "expected" => "deleted", + end + + class CustomerGatewayAvailable + + # @param [Hash] options + # @option options [required, Client] :client + # @option options [Integer] :max_attempts (40) + # @option options [Integer] :delay (15) + # @option options [Proc] :before_attempt + # @option options [Proc] :before_wait + def initialize(options) + @client = options.fetch(:client) + @waiter = Aws::Waiters::Waiter.new({ + max_attempts: 40, + delay: 15, + poller: Aws::Waiters::Poller.new( + operation_name: :describe_customer_gateways, + acceptors: [ + { + "expected" => "available", "matcher" => "pathAll", "state" => "success", - "argument" => "conversion_tasks[].state" - }] - ) - }.merge(options)) - end + "argument" => "customer_gateways[].state" + }, + { + "expected" => "deleted", + "matcher" => "pathAny", + "state" => "failure", + "argument" => "customer_gateways[].state" + }, + { + "expected" => "deleting", + "matcher" => "pathAny", + "state" => "failure", + "argument" => "customer_gateways[].state" + } + ] + ) + }.merge(options)) + end - # @option (see Client#describe_conversion_tasks) - # @return (see Client#describe_conversion_tasks) - def wait(params = {}) - @waiter.wait(client: @client, params: params) - end + # @option (see Client#describe_customer_gateways) + # @return (see Client#describe_customer_gateways) + def wait(params = {}) + @waiter.wait(client: @client, params: params) + end - # @api private - attr_reader :waiter + # @api private + attr_reader :waiter + end + + class ExportTaskCancelled + + # @param [Hash] options + # @option options [required, Client] :client + # @option options [Integer] :max_attempts (40) + # @option options [Integer] :delay (15) + # @option options [Proc] :before_attempt + # @option options [Proc] :before_wait + def initialize(options) + @client = options.fetch(:client) + @waiter = Aws::Waiters::Waiter.new({ + max_attempts: 40, + delay: 15, + poller: Aws::Waiters::Poller.new( + operation_name: :describe_export_tasks, + acceptors: [{ + "expected" => "cancelled", + "matcher" => "pathAll", + "state" => "success", + "argument" => "export_tasks[].state" + }] + ) + }.merge(options)) end - class CustomerGatewayAvailable + # @option (see Client#describe_export_tasks) + # @return (see Client#describe_export_tasks) + def wait(params = {}) + @waiter.wait(client: @client, params: params) + end - # @param [Hash] options - # @option options [required, Client] :client - # @option options [Integer] :max_attempts (40) - # @option options [Integer] :delay (15) - # @option options [Proc] :before_attempt - # @option options [Proc] :before_wait - def initialize(options) - @client = options.fetch(:client) - @waiter = Aws::Waiters::Waiter.new({ - max_attempts: 40, - delay: 15, - poller: Aws::Waiters::Poller.new( - operation_name: :describe_customer_gateways, - acceptors: [ - { - "expected" => "available", - "matcher" => "pathAll", - "state" => "success", - "argument" => "customer_gateways[].state" - }, - { - "expected" => "deleted", - "matcher" => "pathAny", - "state" => "failure", - "argument" => "customer_gateways[].state" - }, - { - "expected" => "deleting", - "matcher" => "pathAny", - "state" => "failure", - "argument" => "customer_gateways[].state" - } - ] - ) - }.merge(options)) - end + # @api private + attr_reader :waiter - # @option (see Client#describe_customer_gateways) - # @return (see Client#describe_customer_gateways) - def wait(params = {}) - @waiter.wait(client: @client, params: params) - end + end - # @api private - attr_reader :waiter + class ExportTaskCompleted + # @param [Hash] options + # @option options [required, Client] :client + # @option options [Integer] :max_attempts (40) + # @option options [Integer] :delay (15) + # @option options [Proc] :before_attempt + # @option options [Proc] :before_wait + def initialize(options) + @client = options.fetch(:client) + @waiter = Aws::Waiters::Waiter.new({ + max_attempts: 40, + delay: 15, + poller: Aws::Waiters::Poller.new( + operation_name: :describe_export_tasks, + acceptors: [{ + "expected" => "completed", + "matcher" => "pathAll", + "state" => "success", + "argument" => "export_tasks[].state" + }] + ) + }.merge(options)) end - class ExportTaskCancelled + # @option (see Client#describe_export_tasks) + # @return (see Client#describe_export_tasks) + def wait(params = {}) + @waiter.wait(client: @client, params: params) + end - # @param [Hash] options - # @option options [required, Client] :client - # @option options [Integer] :max_attempts (40) - # @option options [Integer] :delay (15) - # @option options [Proc] :before_attempt - # @option options [Proc] :before_wait - def initialize(options) - @client = options.fetch(:client) - @waiter = Aws::Waiters::Waiter.new({ - max_attempts: 40, - delay: 15, - poller: Aws::Waiters::Poller.new( - operation_name: :describe_export_tasks, - acceptors: [{ - "expected" => "cancelled", - "matcher" => "pathAll", - "state" => "success", - "argument" => "export_tasks[].state" - }] - ) - }.merge(options)) - end + # @api private + attr_reader :waiter - # @option (see Client#describe_export_tasks) - # @return (see Client#describe_export_tasks) - def wait(params = {}) - @waiter.wait(client: @client, params: params) - end + end - # @api private - attr_reader :waiter + class ImageAvailable + # @param [Hash] options + # @option options [required, Client] :client + # @option options [Integer] :max_attempts (40) + # @option options [Integer] :delay (15) + # @option options [Proc] :before_attempt + # @option options [Proc] :before_wait + def initialize(options) + @client = options.fetch(:client) + @waiter = Aws::Waiters::Waiter.new({ + max_attempts: 40, + delay: 15, + poller: Aws::Waiters::Poller.new( + operation_name: :describe_images, + acceptors: [ + { + "state" => "success", + "matcher" => "pathAll", + "argument" => "images[].state", + "expected" => "available" + }, + { + "state" => "failure", + "matcher" => "pathAny", + "argument" => "images[].state", + "expected" => "failed" + } + ] + ) + }.merge(options)) end - class ExportTaskCompleted + # @option (see Client#describe_images) + # @return (see Client#describe_images) + def wait(params = {}) + @waiter.wait(client: @client, params: params) + end - # @param [Hash] options - # @option options [required, Client] :client - # @option options [Integer] :max_attempts (40) - # @option options [Integer] :delay (15) - # @option options [Proc] :before_attempt - # @option options [Proc] :before_wait - def initialize(options) - @client = options.fetch(:client) - @waiter = Aws::Waiters::Waiter.new({ - max_attempts: 40, - delay: 15, - poller: Aws::Waiters::Poller.new( - operation_name: :describe_export_tasks, - acceptors: [{ - "expected" => "completed", - "matcher" => "pathAll", - "state" => "success", - "argument" => "export_tasks[].state" - }] - ) - }.merge(options)) - end + # @api private + attr_reader :waiter - # @option (see Client#describe_export_tasks) - # @return (see Client#describe_export_tasks) - def wait(params = {}) - @waiter.wait(client: @client, params: params) - end + end - # @api private - attr_reader :waiter + class ImageExists + # @param [Hash] options + # @option options [required, Client] :client + # @option options [Integer] :max_attempts (40) + # @option options [Integer] :delay (15) + # @option options [Proc] :before_attempt + # @option options [Proc] :before_wait + def initialize(options) + @client = options.fetch(:client) + @waiter = Aws::Waiters::Waiter.new({ + max_attempts: 40, + delay: 15, + poller: Aws::Waiters::Poller.new( + operation_name: :describe_images, + acceptors: [ + { + "matcher" => "path", + "expected" => true, + "argument" => "length(images[]) > `0`", + "state" => "success" + }, + { + "matcher" => "error", + "expected" => "InvalidAMIID.NotFound", + "state" => "retry" + } + ] + ) + }.merge(options)) end - class ImageExists + # @option (see Client#describe_images) + # @return (see Client#describe_images) + def wait(params = {}) + @waiter.wait(client: @client, params: params) + end - # @param [Hash] options - # @option options [required, Client] :client - # @option options [Integer] :max_attempts (40) - # @option options [Integer] :delay (15) - # @option options [Proc] :before_attempt - # @option options [Proc] :before_wait - def initialize(options) - @client = options.fetch(:client) - @waiter = Aws::Waiters::Waiter.new({ - max_attempts: 40, - delay: 15, - poller: Aws::Waiters::Poller.new( - operation_name: :describe_images, - acceptors: [ - { - "matcher" => "path", - "expected" => true, - "argument" => "length(images[]) > `0`", - "state" => "success" - }, - { - "matcher" => "error", - "expected" => "InvalidAMIID.NotFound", - "state" => "retry" - } - ] - ) - }.merge(options)) - end + # @api private + attr_reader :waiter - # @option (see Client#describe_images) - # @return (see Client#describe_images) - def wait(params = {}) - @waiter.wait(client: @client, params: params) - end + end - # @api private - attr_reader :waiter + class InstanceExists + # @param [Hash] options + # @option options [required, Client] :client + # @option options [Integer] :max_attempts (40) + # @option options [Integer] :delay (5) + # @option options [Proc] :before_attempt + # @option options [Proc] :before_wait + def initialize(options) + @client = options.fetch(:client) + @waiter = Aws::Waiters::Waiter.new({ + max_attempts: 40, + delay: 5, + poller: Aws::Waiters::Poller.new( + operation_name: :describe_instances, + acceptors: [ + { + "matcher" => "path", + "expected" => true, + "argument" => "length(reservations[]) > `0`", + "state" => "success" + }, + { + "matcher" => "error", + "expected" => "InvalidInstanceID.NotFound", + "state" => "retry" + } + ] + ) + }.merge(options)) end - class ImageAvailable + # @option (see Client#describe_instances) + # @return (see Client#describe_instances) + def wait(params = {}) + @waiter.wait(client: @client, params: params) + end - # @param [Hash] options - # @option options [required, Client] :client - # @option options [Integer] :max_attempts (40) - # @option options [Integer] :delay (15) - # @option options [Proc] :before_attempt - # @option options [Proc] :before_wait - def initialize(options) - @client = options.fetch(:client) - @waiter = Aws::Waiters::Waiter.new({ - max_attempts: 40, - delay: 15, - poller: Aws::Waiters::Poller.new( - operation_name: :describe_images, - acceptors: [ - { - "state" => "success", - "matcher" => "pathAll", - "argument" => "images[].state", - "expected" => "available" - }, - { - "state" => "failure", - "matcher" => "pathAny", - "argument" => "images[].state", - "expected" => "failed" - } - ] - ) - }.merge(options)) - end + # @api private + attr_reader :waiter - # @option (see Client#describe_images) - # @return (see Client#describe_images) - def wait(params = {}) - @waiter.wait(client: @client, params: params) - end + end - # @api private - attr_reader :waiter + class InstanceRunning + # @param [Hash] options + # @option options [required, Client] :client + # @option options [Integer] :max_attempts (40) + # @option options [Integer] :delay (15) + # @option options [Proc] :before_attempt + # @option options [Proc] :before_wait + def initialize(options) + @client = options.fetch(:client) + @waiter = Aws::Waiters::Waiter.new({ + max_attempts: 40, + delay: 15, + poller: Aws::Waiters::Poller.new( + operation_name: :describe_instances, + acceptors: [ + { + "expected" => "running", + "matcher" => "pathAll", + "state" => "success", + "argument" => "reservations[].instances[].state.name" + }, + { + "expected" => "shutting-down", + "matcher" => "pathAny", + "state" => "failure", + "argument" => "reservations[].instances[].state.name" + }, + { + "expected" => "terminated", + "matcher" => "pathAny", + "state" => "failure", + "argument" => "reservations[].instances[].state.name" + }, + { + "expected" => "stopping", + "matcher" => "pathAny", + "state" => "failure", + "argument" => "reservations[].instances[].state.name" + }, + { + "matcher" => "error", + "expected" => "InvalidInstanceID.NotFound", + "state" => "retry" + } + ] + ) + }.merge(options)) end - class InstanceRunning + # @option (see Client#describe_instances) + # @return (see Client#describe_instances) + def wait(params = {}) + @waiter.wait(client: @client, params: params) + end - # @param [Hash] options - # @option options [required, Client] :client - # @option options [Integer] :max_attempts (40) - # @option options [Integer] :delay (15) - # @option options [Proc] :before_attempt - # @option options [Proc] :before_wait - def initialize(options) - @client = options.fetch(:client) - @waiter = Aws::Waiters::Waiter.new({ - max_attempts: 40, - delay: 15, - poller: Aws::Waiters::Poller.new( - operation_name: :describe_instances, - acceptors: [ - { - "expected" => "running", - "matcher" => "pathAll", - "state" => "success", - "argument" => "reservations[].instances[].state.name" - }, - { - "expected" => "shutting-down", - "matcher" => "pathAny", - "state" => "failure", - "argument" => "reservations[].instances[].state.name" - }, - { - "expected" => "terminated", - "matcher" => "pathAny", - "state" => "failure", - "argument" => "reservations[].instances[].state.name" - }, - { - "expected" => "stopping", - "matcher" => "pathAny", - "state" => "failure", - "argument" => "reservations[].instances[].state.name" - }, - { - "matcher" => "error", - "expected" => "InvalidInstanceID.NotFound", - "state" => "retry" - } - ] - ) - }.merge(options)) - end + # @api private + attr_reader :waiter - # @option (see Client#describe_instances) - # @return (see Client#describe_instances) - def wait(params = {}) - @waiter.wait(client: @client, params: params) - end + end - # @api private - attr_reader :waiter + class InstanceStatusOk + # @param [Hash] options + # @option options [required, Client] :client + # @option options [Integer] :max_attempts (40) + # @option options [Integer] :delay (15) + # @option options [Proc] :before_attempt + # @option options [Proc] :before_wait + def initialize(options) + @client = options.fetch(:client) + @waiter = Aws::Waiters::Waiter.new({ + max_attempts: 40, + delay: 15, + poller: Aws::Waiters::Poller.new( + operation_name: :describe_instance_status, + acceptors: [ + { + "state" => "success", + "matcher" => "pathAll", + "argument" => "instance_statuses[].instance_status.status", + "expected" => "ok" + }, + { + "matcher" => "error", + "expected" => "InvalidInstanceID.NotFound", + "state" => "retry" + } + ] + ) + }.merge(options)) end - class InstanceStatusOk + # @option (see Client#describe_instance_status) + # @return (see Client#describe_instance_status) + def wait(params = {}) + @waiter.wait(client: @client, params: params) + end - # @param [Hash] options - # @option options [required, Client] :client - # @option options [Integer] :max_attempts (40) - # @option options [Integer] :delay (15) - # @option options [Proc] :before_attempt - # @option options [Proc] :before_wait - def initialize(options) - @client = options.fetch(:client) - @waiter = Aws::Waiters::Waiter.new({ - max_attempts: 40, - delay: 15, - poller: Aws::Waiters::Poller.new( - operation_name: :describe_instance_status, - acceptors: [ - { - "state" => "success", - "matcher" => "pathAll", - "argument" => "instance_statuses[].instance_status.status", - "expected" => "ok" - }, - { - "matcher" => "error", - "expected" => "InvalidInstanceID.NotFound", - "state" => "retry" - } - ] - ) - }.merge(options)) - end + # @api private + attr_reader :waiter - # @option (see Client#describe_instance_status) - # @return (see Client#describe_instance_status) - def wait(params = {}) - @waiter.wait(client: @client, params: params) - end + end - # @api private - attr_reader :waiter + class InstanceStopped + # @param [Hash] options + # @option options [required, Client] :client + # @option options [Integer] :max_attempts (40) + # @option options [Integer] :delay (15) + # @option options [Proc] :before_attempt + # @option options [Proc] :before_wait + def initialize(options) + @client = options.fetch(:client) + @waiter = Aws::Waiters::Waiter.new({ + max_attempts: 40, + delay: 15, + poller: Aws::Waiters::Poller.new( + operation_name: :describe_instances, + acceptors: [ + { + "expected" => "stopped", + "matcher" => "pathAll", + "state" => "success", + "argument" => "reservations[].instances[].state.name" + }, + { + "expected" => "pending", + "matcher" => "pathAny", + "state" => "failure", + "argument" => "reservations[].instances[].state.name" + }, + { + "expected" => "terminated", + "matcher" => "pathAny", + "state" => "failure", + "argument" => "reservations[].instances[].state.name" + } + ] + ) + }.merge(options)) end - class InstanceStopped + # @option (see Client#describe_instances) + # @return (see Client#describe_instances) + def wait(params = {}) + @waiter.wait(client: @client, params: params) + end - # @param [Hash] options - # @option options [required, Client] :client - # @option options [Integer] :max_attempts (40) - # @option options [Integer] :delay (15) - # @option options [Proc] :before_attempt - # @option options [Proc] :before_wait - def initialize(options) - @client = options.fetch(:client) - @waiter = Aws::Waiters::Waiter.new({ - max_attempts: 40, - delay: 15, - poller: Aws::Waiters::Poller.new( - operation_name: :describe_instances, - acceptors: [ - { - "expected" => "stopped", - "matcher" => "pathAll", - "state" => "success", - "argument" => "reservations[].instances[].state.name" - }, - { - "expected" => "pending", - "matcher" => "pathAny", - "state" => "failure", - "argument" => "reservations[].instances[].state.name" - }, - { - "expected" => "terminated", - "matcher" => "pathAny", - "state" => "failure", - "argument" => "reservations[].instances[].state.name" - } - ] - ) - }.merge(options)) - end + # @api private + attr_reader :waiter - # @option (see Client#describe_instances) - # @return (see Client#describe_instances) - def wait(params = {}) - @waiter.wait(client: @client, params: params) - end + end - # @api private - attr_reader :waiter + class InstanceTerminated + # @param [Hash] options + # @option options [required, Client] :client + # @option options [Integer] :max_attempts (40) + # @option options [Integer] :delay (15) + # @option options [Proc] :before_attempt + # @option options [Proc] :before_wait + def initialize(options) + @client = options.fetch(:client) + @waiter = Aws::Waiters::Waiter.new({ + max_attempts: 40, + delay: 15, + poller: Aws::Waiters::Poller.new( + operation_name: :describe_instances, + acceptors: [ + { + "expected" => "terminated", + "matcher" => "pathAll", + "state" => "success", + "argument" => "reservations[].instances[].state.name" + }, + { + "expected" => "pending", + "matcher" => "pathAny", + "state" => "failure", + "argument" => "reservations[].instances[].state.name" + }, + { + "expected" => "stopping", + "matcher" => "pathAny", + "state" => "failure", + "argument" => "reservations[].instances[].state.name" + } + ] + ) + }.merge(options)) end - class InstanceTerminated + # @option (see Client#describe_instances) + # @return (see Client#describe_instances) + def wait(params = {}) + @waiter.wait(client: @client, params: params) + end - # @param [Hash] options - # @option options [required, Client] :client - # @option options [Integer] :max_attempts (40) - # @option options [Integer] :delay (15) - # @option options [Proc] :before_attempt - # @option options [Proc] :before_wait - def initialize(options) - @client = options.fetch(:client) - @waiter = Aws::Waiters::Waiter.new({ - max_attempts: 40, - delay: 15, - poller: Aws::Waiters::Poller.new( - operation_name: :describe_instances, - acceptors: [ - { - "expected" => "terminated", - "matcher" => "pathAll", - "state" => "success", - "argument" => "reservations[].instances[].state.name" - }, - { - "expected" => "pending", - "matcher" => "pathAny", - "state" => "failure", - "argument" => "reservations[].instances[].state.name" - }, - { - "expected" => "stopping", - "matcher" => "pathAny", - "state" => "failure", - "argument" => "reservations[].instances[].state.name" - } - ] - ) - }.merge(options)) - end + # @api private + attr_reader :waiter - # @option (see Client#describe_instances) - # @return (see Client#describe_instances) - def wait(params = {}) - @waiter.wait(client: @client, params: params) - end + end - # @api private - attr_reader :waiter + class KeyPairExists + # @param [Hash] options + # @option options [required, Client] :client + # @option options [Integer] :max_attempts (6) + # @option options [Integer] :delay (5) + # @option options [Proc] :before_attempt + # @option options [Proc] :before_wait + def initialize(options) + @client = options.fetch(:client) + @waiter = Aws::Waiters::Waiter.new({ + max_attempts: 6, + delay: 5, + poller: Aws::Waiters::Poller.new( + operation_name: :describe_key_pairs, + acceptors: [ + { + "expected" => true, + "matcher" => "path", + "state" => "success", + "argument" => "length(key_pairs[].key_name) > `0`" + }, + { + "expected" => "InvalidKeyPair.NotFound", + "matcher" => "error", + "state" => "retry" + } + ] + ) + }.merge(options)) end - class KeyPairExists + # @option (see Client#describe_key_pairs) + # @return (see Client#describe_key_pairs) + def wait(params = {}) + @waiter.wait(client: @client, params: params) + end - # @param [Hash] options - # @option options [required, Client] :client - # @option options [Integer] :max_attempts (6) - # @option options [Integer] :delay (5) - # @option options [Proc] :before_attempt - # @option options [Proc] :before_wait - def initialize(options) - @client = options.fetch(:client) - @waiter = Aws::Waiters::Waiter.new({ - max_attempts: 6, - delay: 5, - poller: Aws::Waiters::Poller.new( - operation_name: :describe_key_pairs, - acceptors: [ - { - "expected" => true, - "matcher" => "pathAll", - "state" => "success", - "argument" => "length(key_pairs[].key_name) > `0`" - }, - { - "expected" => "InvalidKeyPair.NotFound", - "matcher" => "error", - "state" => "retry" - } - ] - ) - }.merge(options)) - end + # @api private + attr_reader :waiter - # @option (see Client#describe_key_pairs) - # @return (see Client#describe_key_pairs) - def wait(params = {}) - @waiter.wait(client: @client, params: params) - end + end - # @api private - attr_reader :waiter + class NatGatewayAvailable + # @param [Hash] options + # @option options [required, Client] :client + # @option options [Integer] :max_attempts (40) + # @option options [Integer] :delay (15) + # @option options [Proc] :before_attempt + # @option options [Proc] :before_wait + def initialize(options) + @client = options.fetch(:client) + @waiter = Aws::Waiters::Waiter.new({ + max_attempts: 40, + delay: 15, + poller: Aws::Waiters::Poller.new( + operation_name: :describe_nat_gateways, + acceptors: [ + { + "state" => "success", + "matcher" => "pathAll", + "argument" => "nat_gateways[].state", + "expected" => "available" + }, + { + "state" => "failure", + "matcher" => "pathAny", + "argument" => "nat_gateways[].state", + "expected" => "failed" + }, + { + "state" => "failure", + "matcher" => "pathAny", + "argument" => "nat_gateways[].state", + "expected" => "deleting" + }, + { + "state" => "failure", + "matcher" => "pathAny", + "argument" => "nat_gateways[].state", + "expected" => "deleted" + }, + { + "state" => "retry", + "matcher" => "error", + "expected" => "NatGatewayNotFound" + } + ] + ) + }.merge(options)) end - class NatGatewayAvailable + # @option (see Client#describe_nat_gateways) + # @return (see Client#describe_nat_gateways) + def wait(params = {}) + @waiter.wait(client: @client, params: params) + end - # @param [Hash] options - # @option options [required, Client] :client - # @option options [Integer] :max_attempts (40) - # @option options [Integer] :delay (15) - # @option options [Proc] :before_attempt - # @option options [Proc] :before_wait - def initialize(options) - @client = options.fetch(:client) - @waiter = Aws::Waiters::Waiter.new({ - max_attempts: 40, - delay: 15, - poller: Aws::Waiters::Poller.new( - operation_name: :describe_nat_gateways, - acceptors: [ - { - "state" => "success", - "matcher" => "pathAll", - "argument" => "nat_gateways[].state", - "expected" => "available" - }, - { - "state" => "failure", - "matcher" => "pathAny", - "argument" => "nat_gateways[].state", - "expected" => "failed" - }, - { - "state" => "failure", - "matcher" => "pathAny", - "argument" => "nat_gateways[].state", - "expected" => "deleting" - }, - { - "state" => "failure", - "matcher" => "pathAny", - "argument" => "nat_gateways[].state", - "expected" => "deleted" - }, - { - "state" => "retry", - "matcher" => "error", - "expected" => "NatGatewayNotFound" - } - ] - ) - }.merge(options)) - end + # @api private + attr_reader :waiter - # @option (see Client#describe_nat_gateways) - # @return (see Client#describe_nat_gateways) - def wait(params = {}) - @waiter.wait(client: @client, params: params) - end + end - # @api private - attr_reader :waiter + class NetworkInterfaceAvailable + # @param [Hash] options + # @option options [required, Client] :client + # @option options [Integer] :max_attempts (10) + # @option options [Integer] :delay (20) + # @option options [Proc] :before_attempt + # @option options [Proc] :before_wait + def initialize(options) + @client = options.fetch(:client) + @waiter = Aws::Waiters::Waiter.new({ + max_attempts: 10, + delay: 20, + poller: Aws::Waiters::Poller.new( + operation_name: :describe_network_interfaces, + acceptors: [ + { + "expected" => "available", + "matcher" => "pathAll", + "state" => "success", + "argument" => "network_interfaces[].status" + }, + { + "expected" => "InvalidNetworkInterfaceID.NotFound", + "matcher" => "error", + "state" => "failure" + } + ] + ) + }.merge(options)) end - class NetworkInterfaceAvailable + # @option (see Client#describe_network_interfaces) + # @return (see Client#describe_network_interfaces) + def wait(params = {}) + @waiter.wait(client: @client, params: params) + end - # @param [Hash] options - # @option options [required, Client] :client - # @option options [Integer] :max_attempts (10) - # @option options [Integer] :delay (20) - # @option options [Proc] :before_attempt - # @option options [Proc] :before_wait - def initialize(options) - @client = options.fetch(:client) - @waiter = Aws::Waiters::Waiter.new({ - max_attempts: 10, - delay: 20, - poller: Aws::Waiters::Poller.new( - operation_name: :describe_network_interfaces, - acceptors: [ - { - "expected" => "available", - "matcher" => "pathAll", - "state" => "success", - "argument" => "network_interfaces[].status" - }, - { - "expected" => "InvalidNetworkInterfaceID.NotFound", - "matcher" => "error", - "state" => "failure" - } - ] - ) - }.merge(options)) - end + # @api private + attr_reader :waiter - # @option (see Client#describe_network_interfaces) - # @return (see Client#describe_network_interfaces) - def wait(params = {}) - @waiter.wait(client: @client, params: params) - end + end - # @api private - attr_reader :waiter + class PasswordDataAvailable + # @param [Hash] options + # @option options [required, Client] :client + # @option options [Integer] :max_attempts (40) + # @option options [Integer] :delay (15) + # @option options [Proc] :before_attempt + # @option options [Proc] :before_wait + def initialize(options) + @client = options.fetch(:client) + @waiter = Aws::Waiters::Waiter.new({ + max_attempts: 40, + delay: 15, + poller: Aws::Waiters::Poller.new( + operation_name: :get_password_data, + acceptors: [{ + "state" => "success", + "matcher" => "path", + "argument" => "length(password_data) > `0`", + "expected" => true + }] + ) + }.merge(options)) end - class PasswordDataAvailable + # @option (see Client#get_password_data) + # @return (see Client#get_password_data) + def wait(params = {}) + @waiter.wait(client: @client, params: params) + end - # @param [Hash] options - # @option options [required, Client] :client - # @option options [Integer] :max_attempts (40) - # @option options [Integer] :delay (15) - # @option options [Proc] :before_attempt - # @option options [Proc] :before_wait - def initialize(options) - @client = options.fetch(:client) - @waiter = Aws::Waiters::Waiter.new({ - max_attempts: 40, - delay: 15, - poller: Aws::Waiters::Poller.new( - operation_name: :get_password_data, - acceptors: [{ - "state" => "success", - "matcher" => "path", - "argument" => "length(password_data) > `0`", - "expected" => true - }] - ) - }.merge(options)) - end + # @api private + attr_reader :waiter - # @option (see Client#get_password_data) - # @return (see Client#get_password_data) - def wait(params = {}) - @waiter.wait(client: @client, params: params) - end + end - # @api private - attr_reader :waiter + class SnapshotCompleted + # @param [Hash] options + # @option options [required, Client] :client + # @option options [Integer] :max_attempts (40) + # @option options [Integer] :delay (15) + # @option options [Proc] :before_attempt + # @option options [Proc] :before_wait + def initialize(options) + @client = options.fetch(:client) + @waiter = Aws::Waiters::Waiter.new({ + max_attempts: 40, + delay: 15, + poller: Aws::Waiters::Poller.new( + operation_name: :describe_snapshots, + acceptors: [{ + "expected" => "completed", + "matcher" => "pathAll", + "state" => "success", + "argument" => "snapshots[].state" + }] + ) + }.merge(options)) end - class SnapshotCompleted + # @option (see Client#describe_snapshots) + # @return (see Client#describe_snapshots) + def wait(params = {}) + @waiter.wait(client: @client, params: params) + end - # @param [Hash] options - # @option options [required, Client] :client - # @option options [Integer] :max_attempts (40) - # @option options [Integer] :delay (15) - # @option options [Proc] :before_attempt - # @option options [Proc] :before_wait - def initialize(options) - @client = options.fetch(:client) - @waiter = Aws::Waiters::Waiter.new({ - max_attempts: 40, - delay: 15, - poller: Aws::Waiters::Poller.new( - operation_name: :describe_snapshots, - acceptors: [{ - "expected" => "completed", - "matcher" => "pathAll", - "state" => "success", - "argument" => "snapshots[].state" - }] - ) - }.merge(options)) - end + # @api private + attr_reader :waiter - # @option (see Client#describe_snapshots) - # @return (see Client#describe_snapshots) - def wait(params = {}) - @waiter.wait(client: @client, params: params) - end + end - # @api private - attr_reader :waiter + class SpotInstanceRequestFulfilled + # @param [Hash] options + # @option options [required, Client] :client + # @option options [Integer] :max_attempts (40) + # @option options [Integer] :delay (15) + # @option options [Proc] :before_attempt + # @option options [Proc] :before_wait + def initialize(options) + @client = options.fetch(:client) + @waiter = Aws::Waiters::Waiter.new({ + max_attempts: 40, + delay: 15, + poller: Aws::Waiters::Poller.new( + operation_name: :describe_spot_instance_requests, + acceptors: [ + { + "state" => "success", + "matcher" => "pathAll", + "argument" => "spot_instance_requests[].status.code", + "expected" => "fulfilled" + }, + { + "state" => "failure", + "matcher" => "pathAny", + "argument" => "spot_instance_requests[].status.code", + "expected" => "schedule-expired" + }, + { + "state" => "failure", + "matcher" => "pathAny", + "argument" => "spot_instance_requests[].status.code", + "expected" => "canceled-before-fulfillment" + }, + { + "state" => "failure", + "matcher" => "pathAny", + "argument" => "spot_instance_requests[].status.code", + "expected" => "bad-parameters" + }, + { + "state" => "failure", + "matcher" => "pathAny", + "argument" => "spot_instance_requests[].status.code", + "expected" => "system-error" + } + ] + ) + }.merge(options)) end - class SpotInstanceRequestFulfilled + # @option (see Client#describe_spot_instance_requests) + # @return (see Client#describe_spot_instance_requests) + def wait(params = {}) + @waiter.wait(client: @client, params: params) + end - # @param [Hash] options - # @option options [required, Client] :client - # @option options [Integer] :max_attempts (40) - # @option options [Integer] :delay (15) - # @option options [Proc] :before_attempt - # @option options [Proc] :before_wait - def initialize(options) - @client = options.fetch(:client) - @waiter = Aws::Waiters::Waiter.new({ - max_attempts: 40, - delay: 15, - poller: Aws::Waiters::Poller.new( - operation_name: :describe_spot_instance_requests, - acceptors: [ - { - "state" => "success", - "matcher" => "pathAll", - "argument" => "spot_instance_requests[].status.code", - "expected" => "fulfilled" - }, - { - "state" => "failure", - "matcher" => "pathAny", - "argument" => "spot_instance_requests[].status.code", - "expected" => "schedule-expired" - }, - { - "state" => "failure", - "matcher" => "pathAny", - "argument" => "spot_instance_requests[].status.code", - "expected" => "canceled-before-fulfillment" - }, - { - "state" => "failure", - "matcher" => "pathAny", - "argument" => "spot_instance_requests[].status.code", - "expected" => "bad-parameters" - }, - { - "state" => "failure", - "matcher" => "pathAny", - "argument" => "spot_instance_requests[].status.code", - "expected" => "system-error" - } - ] - ) - }.merge(options)) - end + # @api private + attr_reader :waiter - # @option (see Client#describe_spot_instance_requests) - # @return (see Client#describe_spot_instance_requests) - def wait(params = {}) - @waiter.wait(client: @client, params: params) - end + end - # @api private - attr_reader :waiter + class SubnetAvailable + # @param [Hash] options + # @option options [required, Client] :client + # @option options [Integer] :max_attempts (40) + # @option options [Integer] :delay (15) + # @option options [Proc] :before_attempt + # @option options [Proc] :before_wait + def initialize(options) + @client = options.fetch(:client) + @waiter = Aws::Waiters::Waiter.new({ + max_attempts: 40, + delay: 15, + poller: Aws::Waiters::Poller.new( + operation_name: :describe_subnets, + acceptors: [{ + "expected" => "available", + "matcher" => "pathAll", + "state" => "success", + "argument" => "subnets[].state" + }] + ) + }.merge(options)) end - class SubnetAvailable + # @option (see Client#describe_subnets) + # @return (see Client#describe_subnets) + def wait(params = {}) + @waiter.wait(client: @client, params: params) + end - # @param [Hash] options - # @option options [required, Client] :client - # @option options [Integer] :max_attempts (40) - # @option options [Integer] :delay (15) - # @option options [Proc] :before_attempt - # @option options [Proc] :before_wait - def initialize(options) - @client = options.fetch(:client) - @waiter = Aws::Waiters::Waiter.new({ - max_attempts: 40, - delay: 15, - poller: Aws::Waiters::Poller.new( - operation_name: :describe_subnets, - acceptors: [{ - "expected" => "available", - "matcher" => "pathAll", - "state" => "success", - "argument" => "subnets[].state" - }] - ) - }.merge(options)) - end + # @api private + attr_reader :waiter - # @option (see Client#describe_subnets) - # @return (see Client#describe_subnets) - def wait(params = {}) - @waiter.wait(client: @client, params: params) - end + end - # @api private - attr_reader :waiter + class SystemStatusOk + # @param [Hash] options + # @option options [required, Client] :client + # @option options [Integer] :max_attempts (40) + # @option options [Integer] :delay (15) + # @option options [Proc] :before_attempt + # @option options [Proc] :before_wait + def initialize(options) + @client = options.fetch(:client) + @waiter = Aws::Waiters::Waiter.new({ + max_attempts: 40, + delay: 15, + poller: Aws::Waiters::Poller.new( + operation_name: :describe_instance_status, + acceptors: [{ + "state" => "success", + "matcher" => "pathAll", + "argument" => "instance_statuses[].system_status.status", + "expected" => "ok" + }] + ) + }.merge(options)) end - class SystemStatusOk + # @option (see Client#describe_instance_status) + # @return (see Client#describe_instance_status) + def wait(params = {}) + @waiter.wait(client: @client, params: params) + end - # @param [Hash] options - # @option options [required, Client] :client - # @option options [Integer] :max_attempts (40) - # @option options [Integer] :delay (15) - # @option options [Proc] :before_attempt - # @option options [Proc] :before_wait - def initialize(options) - @client = options.fetch(:client) - @waiter = Aws::Waiters::Waiter.new({ - max_attempts: 40, - delay: 15, - poller: Aws::Waiters::Poller.new( - operation_name: :describe_instance_status, - acceptors: [{ - "state" => "success", - "matcher" => "pathAll", - "argument" => "instance_statuses[].system_status.status", - "expected" => "ok" - }] - ) - }.merge(options)) - end + # @api private + attr_reader :waiter - # @option (see Client#describe_instance_status) - # @return (see Client#describe_instance_status) - def wait(params = {}) - @waiter.wait(client: @client, params: params) - end + end - # @api private - attr_reader :waiter + class VolumeAvailable + # @param [Hash] options + # @option options [required, Client] :client + # @option options [Integer] :max_attempts (40) + # @option options [Integer] :delay (15) + # @option options [Proc] :before_attempt + # @option options [Proc] :before_wait + def initialize(options) + @client = options.fetch(:client) + @waiter = Aws::Waiters::Waiter.new({ + max_attempts: 40, + delay: 15, + poller: Aws::Waiters::Poller.new( + operation_name: :describe_volumes, + acceptors: [ + { + "expected" => "available", + "matcher" => "pathAll", + "state" => "success", + "argument" => "volumes[].state" + }, + { + "expected" => "deleted", + "matcher" => "pathAny", + "state" => "failure", + "argument" => "volumes[].state" + } + ] + ) + }.merge(options)) end - class VolumeAvailable + # @option (see Client#describe_volumes) + # @return (see Client#describe_volumes) + def wait(params = {}) + @waiter.wait(client: @client, params: params) + end - # @param [Hash] options - # @option options [required, Client] :client - # @option options [Integer] :max_attempts (40) - # @option options [Integer] :delay (15) - # @option options [Proc] :before_attempt - # @option options [Proc] :before_wait - def initialize(options) - @client = options.fetch(:client) - @waiter = Aws::Waiters::Waiter.new({ - max_attempts: 40, - delay: 15, - poller: Aws::Waiters::Poller.new( - operation_name: :describe_volumes, - acceptors: [ - { - "expected" => "available", - "matcher" => "pathAll", - "state" => "success", - "argument" => "volumes[].state" - }, - { - "expected" => "deleted", - "matcher" => "pathAny", - "state" => "failure", - "argument" => "volumes[].state" - } - ] - ) - }.merge(options)) - end + # @api private + attr_reader :waiter - # @option (see Client#describe_volumes) - # @return (see Client#describe_volumes) - def wait(params = {}) - @waiter.wait(client: @client, params: params) - end + end - # @api private - attr_reader :waiter + class VolumeDeleted + # @param [Hash] options + # @option options [required, Client] :client + # @option options [Integer] :max_attempts (40) + # @option options [Integer] :delay (15) + # @option options [Proc] :before_attempt + # @option options [Proc] :before_wait + def initialize(options) + @client = options.fetch(:client) + @waiter = Aws::Waiters::Waiter.new({ + max_attempts: 40, + delay: 15, + poller: Aws::Waiters::Poller.new( + operation_name: :describe_volumes, + acceptors: [ + { + "expected" => "deleted", + "matcher" => "pathAll", + "state" => "success", + "argument" => "volumes[].state" + }, + { + "matcher" => "error", + "expected" => "InvalidVolume.NotFound", + "state" => "success" + } + ] + ) + }.merge(options)) end - class VolumeDeleted + # @option (see Client#describe_volumes) + # @return (see Client#describe_volumes) + def wait(params = {}) + @waiter.wait(client: @client, params: params) + end - # @param [Hash] options - # @option options [required, Client] :client - # @option options [Integer] :max_attempts (40) - # @option options [Integer] :delay (15) - # @option options [Proc] :before_attempt - # @option options [Proc] :before_wait - def initialize(options) - @client = options.fetch(:client) - @waiter = Aws::Waiters::Waiter.new({ - max_attempts: 40, - delay: 15, - poller: Aws::Waiters::Poller.new( - operation_name: :describe_volumes, - acceptors: [ - { - "expected" => "deleted", - "matcher" => "pathAll", - "state" => "success", - "argument" => "volumes[].state" - }, - { - "matcher" => "error", - "expected" => "InvalidVolume.NotFound", - "state" => "success" - } - ] - ) - }.merge(options)) - end + # @api private + attr_reader :waiter - # @option (see Client#describe_volumes) - # @return (see Client#describe_volumes) - def wait(params = {}) - @waiter.wait(client: @client, params: params) - end + end - # @api private - attr_reader :waiter + class VolumeInUse + # @param [Hash] options + # @option options [required, Client] :client + # @option options [Integer] :max_attempts (40) + # @option options [Integer] :delay (15) + # @option options [Proc] :before_attempt + # @option options [Proc] :before_wait + def initialize(options) + @client = options.fetch(:client) + @waiter = Aws::Waiters::Waiter.new({ + max_attempts: 40, + delay: 15, + poller: Aws::Waiters::Poller.new( + operation_name: :describe_volumes, + acceptors: [ + { + "expected" => "in-use", + "matcher" => "pathAll", + "state" => "success", + "argument" => "volumes[].state" + }, + { + "expected" => "deleted", + "matcher" => "pathAny", + "state" => "failure", + "argument" => "volumes[].state" + } + ] + ) + }.merge(options)) end - class VolumeInUse + # @option (see Client#describe_volumes) + # @return (see Client#describe_volumes) + def wait(params = {}) + @waiter.wait(client: @client, params: params) + end - # @param [Hash] options - # @option options [required, Client] :client - # @option options [Integer] :max_attempts (40) - # @option options [Integer] :delay (15) - # @option options [Proc] :before_attempt - # @option options [Proc] :before_wait - def initialize(options) - @client = options.fetch(:client) - @waiter = Aws::Waiters::Waiter.new({ - max_attempts: 40, - delay: 15, - poller: Aws::Waiters::Poller.new( - operation_name: :describe_volumes, - acceptors: [ - { - "expected" => "in-use", - "matcher" => "pathAll", - "state" => "success", - "argument" => "volumes[].state" - }, - { - "expected" => "deleted", - "matcher" => "pathAny", - "state" => "failure", - "argument" => "volumes[].state" - } - ] - ) - }.merge(options)) - end + # @api private + attr_reader :waiter - # @option (see Client#describe_volumes) - # @return (see Client#describe_volumes) - def wait(params = {}) - @waiter.wait(client: @client, params: params) - end + end - # @api private - attr_reader :waiter + class VpcAvailable + # @param [Hash] options + # @option options [required, Client] :client + # @option options [Integer] :max_attempts (40) + # @option options [Integer] :delay (15) + # @option options [Proc] :before_attempt + # @option options [Proc] :before_wait + def initialize(options) + @client = options.fetch(:client) + @waiter = Aws::Waiters::Waiter.new({ + max_attempts: 40, + delay: 15, + poller: Aws::Waiters::Poller.new( + operation_name: :describe_vpcs, + acceptors: [{ + "expected" => "available", + "matcher" => "pathAll", + "state" => "success", + "argument" => "vpcs[].state" + }] + ) + }.merge(options)) end - class VpcAvailable + # @option (see Client#describe_vpcs) + # @return (see Client#describe_vpcs) + def wait(params = {}) + @waiter.wait(client: @client, params: params) + end - # @param [Hash] options - # @option options [required, Client] :client - # @option options [Integer] :max_attempts (40) - # @option options [Integer] :delay (15) - # @option options [Proc] :before_attempt - # @option options [Proc] :before_wait - def initialize(options) - @client = options.fetch(:client) - @waiter = Aws::Waiters::Waiter.new({ - max_attempts: 40, - delay: 15, - poller: Aws::Waiters::Poller.new( - operation_name: :describe_vpcs, - acceptors: [{ - "expected" => "available", - "matcher" => "pathAll", - "state" => "success", - "argument" => "vpcs[].state" - }] - ) - }.merge(options)) - end + # @api private + attr_reader :waiter - # @option (see Client#describe_vpcs) - # @return (see Client#describe_vpcs) - def wait(params = {}) - @waiter.wait(client: @client, params: params) - end + end - # @api private - attr_reader :waiter + class VpcExists + # @param [Hash] options + # @option options [required, Client] :client + # @option options [Integer] :max_attempts (5) + # @option options [Integer] :delay (1) + # @option options [Proc] :before_attempt + # @option options [Proc] :before_wait + def initialize(options) + @client = options.fetch(:client) + @waiter = Aws::Waiters::Waiter.new({ + max_attempts: 5, + delay: 1, + poller: Aws::Waiters::Poller.new( + operation_name: :describe_vpcs, + acceptors: [ + { + "matcher" => "status", + "expected" => 200, + "state" => "success" + }, + { + "matcher" => "error", + "expected" => "InvalidVpcID.NotFound", + "state" => "retry" + } + ] + ) + }.merge(options)) end - class VpcExists + # @option (see Client#describe_vpcs) + # @return (see Client#describe_vpcs) + def wait(params = {}) + @waiter.wait(client: @client, params: params) + end - # @param [Hash] options - # @option options [required, Client] :client - # @option options [Integer] :max_attempts (5) - # @option options [Integer] :delay (1) - # @option options [Proc] :before_attempt - # @option options [Proc] :before_wait - def initialize(options) - @client = options.fetch(:client) - @waiter = Aws::Waiters::Waiter.new({ - max_attempts: 5, - delay: 1, - poller: Aws::Waiters::Poller.new( - operation_name: :describe_vpcs, - acceptors: [ - { - "matcher" => "status", - "expected" => 200, - "state" => "success" - }, - { - "matcher" => "error", - "expected" => "InvalidVpcID.NotFound", - "state" => "retry" - } - ] - ) - }.merge(options)) - end + # @api private + attr_reader :waiter - # @option (see Client#describe_vpcs) - # @return (see Client#describe_vpcs) - def wait(params = {}) - @waiter.wait(client: @client, params: params) - end + end - # @api private - attr_reader :waiter + class VpcPeeringConnectionDeleted + # @param [Hash] options + # @option options [required, Client] :client + # @option options [Integer] :max_attempts (40) + # @option options [Integer] :delay (15) + # @option options [Proc] :before_attempt + # @option options [Proc] :before_wait + def initialize(options) + @client = options.fetch(:client) + @waiter = Aws::Waiters::Waiter.new({ + max_attempts: 40, + delay: 15, + poller: Aws::Waiters::Poller.new( + operation_name: :describe_vpc_peering_connections, + acceptors: [ + { + "expected" => "deleted", + "matcher" => "pathAll", + "state" => "success", + "argument" => "vpc_peering_connections[].status.code" + }, + { + "matcher" => "error", + "expected" => "InvalidVpcPeeringConnectionID.NotFound", + "state" => "success" + } + ] + ) + }.merge(options)) end - class VpnConnectionAvailable + # @option (see Client#describe_vpc_peering_connections) + # @return (see Client#describe_vpc_peering_connections) + def wait(params = {}) + @waiter.wait(client: @client, params: params) + end - # @param [Hash] options - # @option options [required, Client] :client - # @option options [Integer] :max_attempts (40) - # @option options [Integer] :delay (15) - # @option options [Proc] :before_attempt - # @option options [Proc] :before_wait - def initialize(options) - @client = options.fetch(:client) - @waiter = Aws::Waiters::Waiter.new({ - max_attempts: 40, - delay: 15, - poller: Aws::Waiters::Poller.new( - operation_name: :describe_vpn_connections, - acceptors: [ - { - "expected" => "available", - "matcher" => "pathAll", - "state" => "success", - "argument" => "vpn_connections[].state" - }, - { - "expected" => "deleting", - "matcher" => "pathAny", - "state" => "failure", - "argument" => "vpn_connections[].state" - }, - { - "expected" => "deleted", - "matcher" => "pathAny", - "state" => "failure", - "argument" => "vpn_connections[].state" - } - ] - ) - }.merge(options)) - end + # @api private + attr_reader :waiter - # @option (see Client#describe_vpn_connections) - # @return (see Client#describe_vpn_connections) - def wait(params = {}) - @waiter.wait(client: @client, params: params) - end + end - # @api private - attr_reader :waiter + class VpcPeeringConnectionExists + # @param [Hash] options + # @option options [required, Client] :client + # @option options [Integer] :max_attempts (40) + # @option options [Integer] :delay (15) + # @option options [Proc] :before_attempt + # @option options [Proc] :before_wait + def initialize(options) + @client = options.fetch(:client) + @waiter = Aws::Waiters::Waiter.new({ + max_attempts: 40, + delay: 15, + poller: Aws::Waiters::Poller.new( + operation_name: :describe_vpc_peering_connections, + acceptors: [ + { + "matcher" => "status", + "expected" => 200, + "state" => "success" + }, + { + "matcher" => "error", + "expected" => "InvalidVpcPeeringConnectionID.NotFound", + "state" => "retry" + } + ] + ) + }.merge(options)) end - class VpnConnectionDeleted + # @option (see Client#describe_vpc_peering_connections) + # @return (see Client#describe_vpc_peering_connections) + def wait(params = {}) + @waiter.wait(client: @client, params: params) + end - # @param [Hash] options - # @option options [required, Client] :client - # @option options [Integer] :max_attempts (40) - # @option options [Integer] :delay (15) - # @option options [Proc] :before_attempt - # @option options [Proc] :before_wait - def initialize(options) - @client = options.fetch(:client) - @waiter = Aws::Waiters::Waiter.new({ - max_attempts: 40, - delay: 15, - poller: Aws::Waiters::Poller.new( - operation_name: :describe_vpn_connections, - acceptors: [ - { - "expected" => "deleted", - "matcher" => "pathAll", - "state" => "success", - "argument" => "vpn_connections[].state" - }, - { - "expected" => "pending", - "matcher" => "pathAny", - "state" => "failure", - "argument" => "vpn_connections[].state" - } - ] - ) - }.merge(options)) - end + # @api private + attr_reader :waiter - # @option (see Client#describe_vpn_connections) - # @return (see Client#describe_vpn_connections) - def wait(params = {}) - @waiter.wait(client: @client, params: params) - end + end - # @api private - attr_reader :waiter + class VpnConnectionAvailable + # @param [Hash] options + # @option options [required, Client] :client + # @option options [Integer] :max_attempts (40) + # @option options [Integer] :delay (15) + # @option options [Proc] :before_attempt + # @option options [Proc] :before_wait + def initialize(options) + @client = options.fetch(:client) + @waiter = Aws::Waiters::Waiter.new({ + max_attempts: 40, + delay: 15, + poller: Aws::Waiters::Poller.new( + operation_name: :describe_vpn_connections, + acceptors: [ + { + "expected" => "available", + "matcher" => "pathAll", + "state" => "success", + "argument" => "vpn_connections[].state" + }, + { + "expected" => "deleting", + "matcher" => "pathAny", + "state" => "failure", + "argument" => "vpn_connections[].state" + }, + { + "expected" => "deleted", + "matcher" => "pathAny", + "state" => "failure", + "argument" => "vpn_connections[].state" + } + ] + ) + }.merge(options)) end - class VpcPeeringConnectionExists + # @option (see Client#describe_vpn_connections) + # @return (see Client#describe_vpn_connections) + def wait(params = {}) + @waiter.wait(client: @client, params: params) + end - # @param [Hash] options - # @option options [required, Client] :client - # @option options [Integer] :max_attempts (40) - # @option options [Integer] :delay (15) - # @option options [Proc] :before_attempt - # @option options [Proc] :before_wait - def initialize(options) - @client = options.fetch(:client) - @waiter = Aws::Waiters::Waiter.new({ - max_attempts: 40, - delay: 15, - poller: Aws::Waiters::Poller.new( - operation_name: :describe_vpc_peering_connections, - acceptors: [ - { - "matcher" => "status", - "expected" => 200, - "state" => "success" - }, - { - "matcher" => "error", - "expected" => "InvalidVpcPeeringConnectionID.NotFound", - "state" => "retry" - } - ] - ) - }.merge(options)) - end + # @api private + attr_reader :waiter - # @option (see Client#describe_vpc_peering_connections) - # @return (see Client#describe_vpc_peering_connections) - def wait(params = {}) - @waiter.wait(client: @client, params: params) - end + end - # @api private - attr_reader :waiter + class VpnConnectionDeleted + # @param [Hash] options + # @option options [required, Client] :client + # @option options [Integer] :max_attempts (40) + # @option options [Integer] :delay (15) + # @option options [Proc] :before_attempt + # @option options [Proc] :before_wait + def initialize(options) + @client = options.fetch(:client) + @waiter = Aws::Waiters::Waiter.new({ + max_attempts: 40, + delay: 15, + poller: Aws::Waiters::Poller.new( + operation_name: :describe_vpn_connections, + acceptors: [ + { + "expected" => "deleted", + "matcher" => "pathAll", + "state" => "success", + "argument" => "vpn_connections[].state" + }, + { + "expected" => "pending", + "matcher" => "pathAny", + "state" => "failure", + "argument" => "vpn_connections[].state" + } + ] + ) + }.merge(options)) end + + # @option (see Client#describe_vpn_connections) + # @return (see Client#describe_vpn_connections) + def wait(params = {}) + @waiter.wait(client: @client, params: params) + end + + # @api private + attr_reader :waiter + end end end