class AWS::CloudFormation::StackSummaryCollection
end
# …
cf.stack_summaries.with_status(statuses).each do |summary|
statuses = %w(delete_in_progress delete_failed delete_complete)
# enumerate stacks with various delete statuses
end
# …
cfm.stack_summaries.with_status(:create_failed).each do |summary|
will be enumerated.
to filter the results by. Only stacks with the given status(es)
You can optionally provide one or more stack stasus values
== Filtering Stack Summaries
end
puts summary.to_yaml
cfm.stack_summaries.each do |summary|
cfm = AWS::CloudFormation.new
methods. Yielded summaries are simple hashes.
You can enumerate all available summaries using enumerable
== Enumerating Stack Summaries
about deleted stacks for up to 90 days.
for by one or more statuses. You can even get information
stacks. You can filter the stacks you want summary information
Stack summaries contain information about CloudFormation
= Stack Summaries
def _each_item options = {}
def _each_item options = {} next_token = nil begin client_opts = {} client_opts[:next_token] = next_token if next_token client_opts[:stack_status_filter] = @filters if @filters resp = client.list_stacks(client_opts) resp.stack_summaries.each do |summary| yield(summary.to_hash) end next_token = resp.data[:next_token] end while next_token end
def initialize options = {}
- Private: -
def initialize options = {} @filters = options[:filters] super end
def with_status *status_filters
-
(StackSummaryCollection)
- Returns a new stack summary
Parameters:
-
status_filters
(Symbol, String
) -- One or more statuses to filter
def with_status *status_filters StackSummaryCollection.new( :filters => status_filters.flatten.map(&:to_s).map(&:upcase), :config => config) end