lib/aws-sdk-emr/waiters.rb in aws-sdk-emr-1.0.0.rc1 vs lib/aws-sdk-emr/waiters.rb in aws-sdk-emr-1.0.0.rc2
- old
+ new
@@ -1,126 +1,169 @@
# 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 EMR
- module Waiters
- class ClusterRunning
+module Aws::EMR
+ module Waiters
- # @param [Hash] options
- # @option options [required, Client] :client
- # @option options [Integer] :max_attempts (60)
- # @option options [Integer] :delay (30)
- # @option options [Proc] :before_attempt
- # @option options [Proc] :before_wait
- def initialize(options)
- @client = options.fetch(:client)
- @waiter = Aws::Waiters::Waiter.new({
- max_attempts: 60,
- delay: 30,
- poller: Aws::Waiters::Poller.new(
- operation_name: :describe_cluster,
- acceptors: [
- {
- "state" => "success",
- "matcher" => "path",
- "argument" => "cluster.status.state",
- "expected" => "RUNNING"
- },
- {
- "state" => "success",
- "matcher" => "path",
- "argument" => "cluster.status.state",
- "expected" => "WAITING"
- },
- {
- "state" => "failure",
- "matcher" => "path",
- "argument" => "cluster.status.state",
- "expected" => "TERMINATING"
- },
- {
- "state" => "failure",
- "matcher" => "path",
- "argument" => "cluster.status.state",
- "expected" => "TERMINATED"
- },
- {
- "state" => "failure",
- "matcher" => "path",
- "argument" => "cluster.status.state",
- "expected" => "TERMINATED_WITH_ERRORS"
- }
- ]
- )
- }.merge(options))
- end
+ class ClusterRunning
- # @option (see Client#describe_cluster)
- # @return (see Client#describe_cluster)
- def wait(params = {})
- @waiter.wait(client: @client, params: params)
- end
+ # @param [Hash] options
+ # @option options [required, Client] :client
+ # @option options [Integer] :max_attempts (60)
+ # @option options [Integer] :delay (30)
+ # @option options [Proc] :before_attempt
+ # @option options [Proc] :before_wait
+ def initialize(options)
+ @client = options.fetch(:client)
+ @waiter = Aws::Waiters::Waiter.new({
+ max_attempts: 60,
+ delay: 30,
+ poller: Aws::Waiters::Poller.new(
+ operation_name: :describe_cluster,
+ acceptors: [
+ {
+ "state" => "success",
+ "matcher" => "path",
+ "argument" => "cluster.status.state",
+ "expected" => "RUNNING"
+ },
+ {
+ "state" => "success",
+ "matcher" => "path",
+ "argument" => "cluster.status.state",
+ "expected" => "WAITING"
+ },
+ {
+ "state" => "failure",
+ "matcher" => "path",
+ "argument" => "cluster.status.state",
+ "expected" => "TERMINATING"
+ },
+ {
+ "state" => "failure",
+ "matcher" => "path",
+ "argument" => "cluster.status.state",
+ "expected" => "TERMINATED"
+ },
+ {
+ "state" => "failure",
+ "matcher" => "path",
+ "argument" => "cluster.status.state",
+ "expected" => "TERMINATED_WITH_ERRORS"
+ }
+ ]
+ )
+ }.merge(options))
+ end
- # @api private
- attr_reader :waiter
+ # @option (see Client#describe_cluster)
+ # @return (see Client#describe_cluster)
+ def wait(params = {})
+ @waiter.wait(client: @client, params: params)
+ end
+ # @api private
+ attr_reader :waiter
+
+ end
+
+ class ClusterTerminated
+
+ # @param [Hash] options
+ # @option options [required, Client] :client
+ # @option options [Integer] :max_attempts (60)
+ # @option options [Integer] :delay (30)
+ # @option options [Proc] :before_attempt
+ # @option options [Proc] :before_wait
+ def initialize(options)
+ @client = options.fetch(:client)
+ @waiter = Aws::Waiters::Waiter.new({
+ max_attempts: 60,
+ delay: 30,
+ poller: Aws::Waiters::Poller.new(
+ operation_name: :describe_cluster,
+ acceptors: [
+ {
+ "state" => "success",
+ "matcher" => "path",
+ "argument" => "cluster.status.state",
+ "expected" => "TERMINATED"
+ },
+ {
+ "state" => "failure",
+ "matcher" => "path",
+ "argument" => "cluster.status.state",
+ "expected" => "TERMINATED_WITH_ERRORS"
+ }
+ ]
+ )
+ }.merge(options))
end
- class StepComplete
+ # @option (see Client#describe_cluster)
+ # @return (see Client#describe_cluster)
+ def wait(params = {})
+ @waiter.wait(client: @client, params: params)
+ end
- # @param [Hash] options
- # @option options [required, Client] :client
- # @option options [Integer] :max_attempts (60)
- # @option options [Integer] :delay (30)
- # @option options [Proc] :before_attempt
- # @option options [Proc] :before_wait
- def initialize(options)
- @client = options.fetch(:client)
- @waiter = Aws::Waiters::Waiter.new({
- max_attempts: 60,
- delay: 30,
- poller: Aws::Waiters::Poller.new(
- operation_name: :describe_step,
- acceptors: [
- {
- "state" => "success",
- "matcher" => "path",
- "argument" => "step.status.state",
- "expected" => "COMPLETED"
- },
- {
- "state" => "failure",
- "matcher" => "path",
- "argument" => "step.status.state",
- "expected" => "FAILED"
- },
- {
- "state" => "failure",
- "matcher" => "path",
- "argument" => "step.status.state",
- "expected" => "CANCELLED"
- }
- ]
- )
- }.merge(options))
- end
+ # @api private
+ attr_reader :waiter
- # @option (see Client#describe_step)
- # @return (see Client#describe_step)
- def wait(params = {})
- @waiter.wait(client: @client, params: params)
- end
+ end
- # @api private
- attr_reader :waiter
+ class StepComplete
+ # @param [Hash] options
+ # @option options [required, Client] :client
+ # @option options [Integer] :max_attempts (60)
+ # @option options [Integer] :delay (30)
+ # @option options [Proc] :before_attempt
+ # @option options [Proc] :before_wait
+ def initialize(options)
+ @client = options.fetch(:client)
+ @waiter = Aws::Waiters::Waiter.new({
+ max_attempts: 60,
+ delay: 30,
+ poller: Aws::Waiters::Poller.new(
+ operation_name: :describe_step,
+ acceptors: [
+ {
+ "state" => "success",
+ "matcher" => "path",
+ "argument" => "step.status.state",
+ "expected" => "COMPLETED"
+ },
+ {
+ "state" => "failure",
+ "matcher" => "path",
+ "argument" => "step.status.state",
+ "expected" => "FAILED"
+ },
+ {
+ "state" => "failure",
+ "matcher" => "path",
+ "argument" => "step.status.state",
+ "expected" => "CANCELLED"
+ }
+ ]
+ )
+ }.merge(options))
end
+
+ # @option (see Client#describe_step)
+ # @return (see Client#describe_step)
+ def wait(params = {})
+ @waiter.wait(client: @client, params: params)
+ end
+
+ # @api private
+ attr_reader :waiter
+
end
end
end