Class: Aws::Waiters::Poller Private
- Inherits:
-
Object
- Object
- Aws::Waiters::Poller
- Defined in:
- lib/aws-sdk-core/waiters/poller.rb
Overview
This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.
Polls a single API operation inspecting the response data and/or error for states matching one of its acceptors.
Constant Summary collapse
- RAISE_HANDLER =
This constant is part of a private API. You should avoid using this constant if possible, as it may be removed or be changed in the future.
Seahorse::Client::Plugins::RaiseResponseErrors::Handler
Instance Attribute Summary collapse
- #operation_name ⇒ Symbol readonly private
Instance Method Summary collapse
-
#call(options = {}) ⇒ Array<Symbol,Response>
private
Makes an API call, returning the resultant state and the response.
-
#initialize(options = {}) ⇒ Poller
constructor
private
A new instance of Poller.
Constructor Details
#initialize(options = {}) ⇒ Poller
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Returns a new instance of Poller.
17 18 19 20 |
# File 'lib/aws-sdk-core/waiters/poller.rb', line 17 def initialize( = {}) @operation_name = .fetch(:operation_name) @acceptors = .fetch(:acceptors) end |
Instance Attribute Details
#operation_name ⇒ Symbol (readonly)
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
23 24 25 |
# File 'lib/aws-sdk-core/waiters/poller.rb', line 23 def operation_name @operation_name end |
Instance Method Details
#call(options = {}) ⇒ Array<Symbol,Response>
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Makes an API call, returning the resultant state and the response.
-
‘:success` - A success state has been matched.
-
‘:failure` - A terminate failure state has been matched.
-
‘:retry` - The waiter may be retried.
-
‘:error` - The waiter encountered an un-expected error.
50 51 52 53 54 55 56 57 58 |
# File 'lib/aws-sdk-core/waiters/poller.rb', line 50 def call( = {}) response = send_request() @acceptors.each do |acceptor| if acceptor_matches?(acceptor, response) return [acceptor['state'].to_sym, response] end end [response.error ? :error : :retry, response] end |