class AWS::CloudFormation::StackCollection

def [] stack_name

def [] stack_name
  Stack.new(stack_name, :config => config)
end

def _each_item next_token, options = {}

def _each_item next_token, options = {}
  options[:next_token] = next_token if next_token
  if @status_filters.empty?
    api_method = :describe_stacks
    resp_key = :stacks
  else
    api_method = :list_stacks
    resp_key = :stack_summaries
    options[:stack_status_filter] = @status_filters
  end
  resp = client.send(api_method, options)
  resp[resp_key].each do |data|
    stack = Stack.new_from(
      api_method,
      data,
      data[:stack_name],
      :config => config)
    yield(stack)
  end
  resp[:next_token]
end

def create stack_name, template, options = {}

Returns:
  • (Stack) -

Options Hash: (**options)
  • :timeout (Integer) -- The number of minutes
  • :parameters (Hash) -- A hash that specifies the
  • :notify (Object) -- One or more SNS topics ARN
  • :disable_rollback (Boolean) --
  • :capabilities (Array) -- The list of capabilities

Parameters:
  • options (Hash) --
  • template (String, URI, S3::S3Object, Object) -- The stack template.
  • stack_name (String) --

Other tags:
    Example: Creating a stack with 3 parameters. -
    Example: Creating a stack from an S3 object. -
    Example: Creating a stack with a template string. -
def create stack_name, template, options = {}
  client_opts = options.dup
  client_opts[:template] = template
  apply_stack_name(stack_name, client_opts)
  apply_template(client_opts)
  apply_disable_rollback(client_opts)
  apply_notification_arns(client_opts)
  apply_parameters(client_opts)
  apply_timeout(client_opts)
  resp = client.create_stack(client_opts)
  Stack.new(stack_name, :config => config, :stack_id => resp.stack_id)
end

def initialize options = {}

Other tags:
    Api: - private
def initialize options = {}
  @status_filters = options[:status_filters] || []
  super
end

def with_status status_filter

Returns:
  • (StackCollection) - Returns a new stack collection that

Parameters:
  • status_filter (Symbol, String) -- A status to filter stacks with.
def with_status status_filter
  StackCollection.new(
    :status_filters => @status_filters + [status_filter.to_s.upcase],
    :config => config)
end