Class: AWS::CloudFormation::StackResourceCollection
- Inherits:
-
Object
- Object
- AWS::CloudFormation::StackResourceCollection
- Includes:
- AWS::Core::Collection::Simple
- Defined in:
- lib/aws/cloud_formation/stack_resource_collection.rb
Overview
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 #stack_resource.
You can also take a look at AWS::CloudFormation::Stack#resource_summaries for light-weight hashes of stack resource details.
Instance Attribute Summary collapse
- #stack ⇒ Stack readonly
Instance Method Summary collapse
-
#[](logical_resource_id) ⇒ StackResource
Returns a stack resource with the given logical resource id.
-
#initialize(stack, options = {}) ⇒ StackResourceCollection
constructor
A new instance of StackResourceCollection.
Methods included from AWS::Core::Collection
#each, #each_batch, #enum, #first, #in_groups_of, #page
Constructor Details
#initialize(stack, options = {}) ⇒ StackResourceCollection
Returns a new instance of StackResourceCollection.
49 50 51 52 |
# File 'lib/aws/cloud_formation/stack_resource_collection.rb', line 49 def initialize stack, = {} @stack = stack super end |
Instance Attribute Details
#stack ⇒ Stack (readonly)
55 56 57 |
# File 'lib/aws/cloud_formation/stack_resource_collection.rb', line 55 def stack @stack end |
Instance Method Details
#[](logical_resource_id) ⇒ StackResource
Returns a stack resource with the given logical resource id.
60 61 62 |
# File 'lib/aws/cloud_formation/stack_resource_collection.rb', line 60 def [] logical_resource_id StackResource.new(stack, logical_resource_id) end |