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.
13 14 15 16 |
# File 'lib/aws-sdk-core/waiters/poller.rb', line 13 def initialize( = {}) @operation_name = underscore(['operation']).to_sym @acceptors = ['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.
19 20 21 |
# File 'lib/aws-sdk-core/waiters/poller.rb', line 19 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.
46 47 48 49 50 51 52 53 54 |
# File 'lib/aws-sdk-core/waiters/poller.rb', line 46 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 |