Class: Aws::CloudFormation::Waiters::StackExists

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

Instance Method Summary collapse

Constructor Details

#initialize(options) ⇒ StackExists

Returns a new instance of StackExists.

Parameters:

  • options (Hash)

Options Hash (options):

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


295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
# File 'gems/aws-sdk-cloudformation/lib/aws-sdk-cloudformation/waiters.rb', line 295

def initialize(options)
  @client = options.fetch(:client)
  @waiter = Aws::Waiters::Waiter.new({
    max_attempts: 20,
    delay: 5,
    poller: Aws::Waiters::Poller.new(
      operation_name: :describe_stacks,
      acceptors: [
        {
          "matcher" => "status",
          "expected" => 200,
          "state" => "success"
        },
        {
          "matcher" => "error",
          "expected" => "ValidationError",
          "state" => "retry"
        }
      ]
    )
  }.merge(options))
end

Instance Method Details

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

Returns a response object which responds to the following methods:

Parameters:

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

    a customizable set of options

Options Hash (params):

  • :stack_name (String)

    The name or the unique stack ID that is associated with the stack, which are not always interchangeable:

    • Running stacks: You can specify either the stack's name or its unique stack ID.

    • Deleted stacks: You must specify the unique stack ID.

    Default: There is no default value.

  • :next_token (String)

    A string that identifies the next page of stacks that you want to retrieve.

Returns:



320
321
322
# File 'gems/aws-sdk-cloudformation/lib/aws-sdk-cloudformation/waiters.rb', line 320

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