class Aws::CloudFormation::Waiters::StackImportComplete

Wait until stack status is IMPORT_COMPLETE.

Attributes

waiter[R]

@api private

Public Class Methods

new(options) click to toggle source

@param [Hash] options @option options [required, Client] :client @option options [Integer] :max_attempts (120) @option options [Integer] :delay (30) @option options [Proc] :before_attempt @option options [Proc] :before_wait

# File lib/aws-sdk-cloudformation/waiters.rb, line 338
def initialize(options)
  @client = options.fetch(:client)
  @waiter = Aws::Waiters::Waiter.new({
    max_attempts: 120,
    delay: 30,
    poller: Aws::Waiters::Poller.new(
      operation_name: :describe_stacks,
      acceptors: [
        {
          "argument" => "stacks[].stack_status",
          "expected" => "IMPORT_COMPLETE",
          "matcher" => "pathAll",
          "state" => "success"
        },
        {
          "expected" => "ROLLBACK_COMPLETE",
          "matcher" => "pathAny",
          "state" => "failure",
          "argument" => "stacks[].stack_status"
        },
        {
          "expected" => "ROLLBACK_FAILED",
          "matcher" => "pathAny",
          "state" => "failure",
          "argument" => "stacks[].stack_status"
        },
        {
          "argument" => "stacks[].stack_status",
          "expected" => "IMPORT_ROLLBACK_IN_PROGRESS",
          "matcher" => "pathAny",
          "state" => "failure"
        },
        {
          "argument" => "stacks[].stack_status",
          "expected" => "IMPORT_ROLLBACK_FAILED",
          "matcher" => "pathAny",
          "state" => "failure"
        },
        {
          "expected" => "IMPORT_ROLLBACK_COMPLETE",
          "matcher" => "pathAny",
          "state" => "failure",
          "argument" => "stacks[].stack_status"
        },
        {
          "expected" => "ValidationError",
          "matcher" => "error",
          "state" => "failure"
        }
      ]
    )
  }.merge(options))
end

Public Instance Methods

wait(params = {}) click to toggle source

@option (see Client#describe_stacks) @return (see Client#describe_stacks)

# File lib/aws-sdk-cloudformation/waiters.rb, line 394
def wait(params = {})
  @waiter.wait(client: @client, params: params)
end