Class: Aws::Proton::Waiters::ServiceCreated

Inherits:
Object
  • Object
show all
Defined in:
gems/aws-sdk-proton/lib/aws-sdk-proton/waiters.rb

Overview

Wait until an Service has deployed its instances and possibly pipeline. Use this after invoking CreateService

Instance Method Summary collapse

Constructor Details

#initialize(options) ⇒ ServiceCreated

Returns a new instance of ServiceCreated.

Parameters:

  • options (Hash)

Options Hash (options):

  • :client (required, Client)
  • :max_attempts (Integer) — default: 999
  • :delay (Integer) — default: 5
  • :before_attempt (Proc)
  • :before_wait (Proc)


279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
# File 'gems/aws-sdk-proton/lib/aws-sdk-proton/waiters.rb', line 279

def initialize(options)
  @client = options.fetch(:client)
  @waiter = Aws::Waiters::Waiter.new({
    max_attempts: 999,
    delay: 5,
    poller: Aws::Waiters::Poller.new(
      operation_name: :get_service,
      acceptors: [
        {
          "matcher" => "path",
          "argument" => "service.status",
          "state" => "success",
          "expected" => "ACTIVE"
        },
        {
          "matcher" => "path",
          "argument" => "service.status",
          "state" => "failure",
          "expected" => "CREATE_FAILED_CLEANUP_COMPLETE"
        },
        {
          "matcher" => "path",
          "argument" => "service.status",
          "state" => "failure",
          "expected" => "CREATE_FAILED_CLEANUP_FAILED"
        },
        {
          "matcher" => "path",
          "argument" => "service.status",
          "state" => "failure",
          "expected" => "CREATE_FAILED"
        }
      ]
    )
  }.merge(options))
end

Instance Method Details

#wait(params = {}) ⇒ Types::GetServiceOutput

Returns a response object which responds to the following methods:

Parameters:

  • params (Hash) (defaults to: {})

    a customizable set of options

Options Hash (params):

  • :name (required, String)

    The name of the service that you want to get the detailed data for.

Returns:



318
319
320
# File 'gems/aws-sdk-proton/lib/aws-sdk-proton/waiters.rb', line 318

def wait(params = {})
  @waiter.wait(client: @client, params: params)
end