lib/aws-sdk-ecs/waiters.rb in aws-sdk-ecs-1.0.0.rc1 vs lib/aws-sdk-ecs/waiters.rb in aws-sdk-ecs-1.0.0.rc2

- old
+ new

@@ -1,200 +1,199 @@ # 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 ECS - module Waiters - class TasksRunning +module Aws::ECS + module Waiters - # @param [Hash] options - # @option options [required, Client] :client - # @option options [Integer] :max_attempts (100) - # @option options [Integer] :delay (6) - # @option options [Proc] :before_attempt - # @option options [Proc] :before_wait - def initialize(options) - @client = options.fetch(:client) - @waiter = Aws::Waiters::Waiter.new({ - max_attempts: 100, - delay: 6, - poller: Aws::Waiters::Poller.new( - operation_name: :describe_tasks, - acceptors: [ - { - "expected" => "STOPPED", - "matcher" => "pathAny", - "state" => "failure", - "argument" => "tasks[].last_status" - }, - { - "expected" => "MISSING", - "matcher" => "pathAny", - "state" => "failure", - "argument" => "failures[].reason" - }, - { - "expected" => "RUNNING", - "matcher" => "pathAll", - "state" => "success", - "argument" => "tasks[].last_status" - } - ] - ) - }.merge(options)) - end + class ServicesInactive - # @option (see Client#describe_tasks) - # @return (see Client#describe_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_services, + acceptors: [ + { + "expected" => "MISSING", + "matcher" => "pathAny", + "state" => "failure", + "argument" => "failures[].reason" + }, + { + "expected" => "INACTIVE", + "matcher" => "pathAny", + "state" => "success", + "argument" => "services[].status" + } + ] + ) + }.merge(options)) + end - # @api private - attr_reader :waiter - + # @option (see Client#describe_services) + # @return (see Client#describe_services) + def wait(params = {}) + @waiter.wait(client: @client, params: params) end - class TasksStopped + # @api private + attr_reader :waiter - # @param [Hash] options - # @option options [required, Client] :client - # @option options [Integer] :max_attempts (100) - # @option options [Integer] :delay (6) - # @option options [Proc] :before_attempt - # @option options [Proc] :before_wait - def initialize(options) - @client = options.fetch(:client) - @waiter = Aws::Waiters::Waiter.new({ - max_attempts: 100, - delay: 6, - poller: Aws::Waiters::Poller.new( - operation_name: :describe_tasks, - acceptors: [{ - "expected" => "STOPPED", - "matcher" => "pathAll", - "state" => "success", - "argument" => "tasks[].last_status" - }] - ) - }.merge(options)) - end + end - # @option (see Client#describe_tasks) - # @return (see Client#describe_tasks) - def wait(params = {}) - @waiter.wait(client: @client, params: params) - end + class ServicesStable - # @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_services, + acceptors: [ + { + "expected" => "MISSING", + "matcher" => "pathAny", + "state" => "failure", + "argument" => "failures[].reason" + }, + { + "expected" => "DRAINING", + "matcher" => "pathAny", + "state" => "failure", + "argument" => "services[].status" + }, + { + "expected" => "INACTIVE", + "matcher" => "pathAny", + "state" => "failure", + "argument" => "services[].status" + }, + { + "expected" => true, + "matcher" => "path", + "state" => "success", + "argument" => "length(services[?!(length(deployments) == `1` && running_count == desired_count)]) == `0`" + } + ] + ) + }.merge(options)) + end + # @option (see Client#describe_services) + # @return (see Client#describe_services) + def wait(params = {}) + @waiter.wait(client: @client, params: params) end - class ServicesStable + # @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_services, - acceptors: [ - { - "expected" => "MISSING", - "matcher" => "pathAny", - "state" => "failure", - "argument" => "failures[].reason" - }, - { - "expected" => "DRAINING", - "matcher" => "pathAny", - "state" => "failure", - "argument" => "services[].status" - }, - { - "expected" => "INACTIVE", - "matcher" => "pathAny", - "state" => "failure", - "argument" => "services[].status" - }, - { - "expected" => true, - "matcher" => "path", - "state" => "success", - "argument" => "length(services[?!(length(deployments) == `1` && running_count == desired_count)]) == `0`" - } - ] - ) - }.merge(options)) - end + end - # @option (see Client#describe_services) - # @return (see Client#describe_services) - def wait(params = {}) - @waiter.wait(client: @client, params: params) - end + class TasksRunning - # @api private - attr_reader :waiter + # @param [Hash] options + # @option options [required, Client] :client + # @option options [Integer] :max_attempts (100) + # @option options [Integer] :delay (6) + # @option options [Proc] :before_attempt + # @option options [Proc] :before_wait + def initialize(options) + @client = options.fetch(:client) + @waiter = Aws::Waiters::Waiter.new({ + max_attempts: 100, + delay: 6, + poller: Aws::Waiters::Poller.new( + operation_name: :describe_tasks, + acceptors: [ + { + "expected" => "STOPPED", + "matcher" => "pathAny", + "state" => "failure", + "argument" => "tasks[].last_status" + }, + { + "expected" => "MISSING", + "matcher" => "pathAny", + "state" => "failure", + "argument" => "failures[].reason" + }, + { + "expected" => "RUNNING", + "matcher" => "pathAll", + "state" => "success", + "argument" => "tasks[].last_status" + } + ] + ) + }.merge(options)) + end + # @option (see Client#describe_tasks) + # @return (see Client#describe_tasks) + def wait(params = {}) + @waiter.wait(client: @client, params: params) end - class ServicesInactive + # @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_services, - acceptors: [ - { - "expected" => "MISSING", - "matcher" => "pathAny", - "state" => "failure", - "argument" => "failures[].reason" - }, - { - "expected" => "INACTIVE", - "matcher" => "pathAny", - "state" => "success", - "argument" => "services[].status" - } - ] - ) - }.merge(options)) - end + end - # @option (see Client#describe_services) - # @return (see Client#describe_services) - def wait(params = {}) - @waiter.wait(client: @client, params: params) - end + class TasksStopped - # @api private - attr_reader :waiter + # @param [Hash] options + # @option options [required, Client] :client + # @option options [Integer] :max_attempts (100) + # @option options [Integer] :delay (6) + # @option options [Proc] :before_attempt + # @option options [Proc] :before_wait + def initialize(options) + @client = options.fetch(:client) + @waiter = Aws::Waiters::Waiter.new({ + max_attempts: 100, + delay: 6, + poller: Aws::Waiters::Poller.new( + operation_name: :describe_tasks, + acceptors: [{ + "expected" => "STOPPED", + "matcher" => "pathAll", + "state" => "success", + "argument" => "tasks[].last_status" + }] + ) + }.merge(options)) + end + # @option (see Client#describe_tasks) + # @return (see Client#describe_tasks) + def wait(params = {}) + @waiter.wait(client: @client, params: params) end + + # @api private + attr_reader :waiter + end end end