Class: Aws::EndUserMessaging::Waiters::JobSuccess
- Inherits:
-
Object
- Object
- Aws::EndUserMessaging::Waiters::JobSuccess
- Defined in:
- gems/aws-sdk-endusermessaging/lib/aws-sdk-endusermessaging/waiters.rb
Overview
Wait until an async job reaches the SUCCESS terminal state.
Instance Method Summary collapse
-
#initialize(options) ⇒ JobSuccess
constructor
A new instance of JobSuccess.
-
#wait(params = {}) ⇒ Types::Job
Returns a response object which responds to the following methods:.
Constructor Details
#initialize(options) ⇒ JobSuccess
Returns a new instance of JobSuccess.
143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 |
# File 'gems/aws-sdk-endusermessaging/lib/aws-sdk-endusermessaging/waiters.rb', line 143 def initialize() @client = .fetch(:client) @waiter = Aws::Waiters::Waiter.new({ max_attempts: 5, delay: 30, poller: Aws::Waiters::Poller.new( operation_name: :get_job, acceptors: [ { "matcher" => "path", "argument" => "status", "state" => "success", "expected" => "SUCCESS" }, { "matcher" => "path", "argument" => "status", "state" => "failure", "expected" => "FAILED" } ] ) }.merge()) end |
Instance Method Details
#wait(params = {}) ⇒ Types::Job
Returns a response object which responds to the following methods:
- #job_id => String
- #status => String
- #operation_type => String
- #created_at => Time
- #updated_at => Time
- #brand_profile_id => String
- #error_code => String
- #error_message => String
- #resources => Array<Types::JobResource>
170 171 172 |
# File 'gems/aws-sdk-endusermessaging/lib/aws-sdk-endusermessaging/waiters.rb', line 170 def wait(params = {}) @waiter.wait(client: @client, params: params) end |