Class: Aws::Proton::Waiters::ServiceInstanceDeployed

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

Overview

Wait until a ServiceInstance is deployed. Use this after invoking CreateService or UpdateServiceInstance

Instance Method Summary collapse

Constructor Details

#initialize(options) ⇒ ServiceInstanceDeployed

Returns a new instance of ServiceInstanceDeployed.

Parameters:

  • options (Hash)

Options Hash (options):

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


380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
# File 'gems/aws-sdk-proton/lib/aws-sdk-proton/waiters.rb', line 380

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_instance,
      acceptors: [
        {
          "matcher" => "path",
          "argument" => "service_instance.deployment_status",
          "state" => "success",
          "expected" => "SUCCEEDED"
        },
        {
          "matcher" => "path",
          "argument" => "service_instance.deployment_status",
          "state" => "failure",
          "expected" => "FAILED"
        }
      ]
    )
  }.merge(options))
end

Instance Method Details

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

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 a service instance that you want to get the detailed data for.

  • :service_name (required, String)

    The name of the service that you want the service instance input for.

Returns:



407
408
409
# File 'gems/aws-sdk-proton/lib/aws-sdk-proton/waiters.rb', line 407

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