You are viewing documentation for version 3 of the AWS SDK for Ruby. Version 2 documentation can be found here.

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)


219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
# File 'gems/aws-sdk-cloudformation/lib/aws-sdk-cloudformation/waiters.rb', line 219

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:



244
245
246
# File 'gems/aws-sdk-cloudformation/lib/aws-sdk-cloudformation/waiters.rb', line 244

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