Class AWS::CloudFormation::StackResourceCollection
In: lib/aws/cloud_formation/stack_resource_collection.rb
Parent: Object

StackResourceCollection

This collection represents the resources for a single {Stack}. You can enumerate resources, or request a specific resource by its logical resource id.

Other Ways to Get Resource Details

If you want to get a {StackResource} by its physical resource id, then you should use {CloudFormation#get_resource}.

You can also take a look at {Stack#resource_summaries} for light-weight hashes of stack resource details.

@example Enumerating stack resources

  # enumerating all resources for a stack
  stack.resources.each do |resource|
    puts resource.resource_type + " " + resource.physical_resource_id
  end

@example Getting a stack resource by its logical resource id

  resource = stack.resources['web']

Methods

[]   _each_item   new  

Included Modules

Core::Collection::Simple StackOptions

Attributes

stack  [R]  @return [Stack]

Public Class methods

@param [Stack] stack @param [Hash] options

Public Instance methods

@param [String] logical_resource_id @return [StackResource] Returns a stack resource with the given

  logical resource id.

Protected Instance methods

[Validate]