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.
48 49 50 51 |
# File 'lib/aws/cloud_formation/stack_resource_collection.rb', line 48 def initialize stack, = {} @stack = stack super end |
Instance Attribute Details
#stack ⇒ Stack (readonly)
54 55 56 |
# File 'lib/aws/cloud_formation/stack_resource_collection.rb', line 54 def stack @stack end |
Instance Method Details
#[](logical_resource_id) ⇒ StackResource
Returns a stack resource with the given logical resource id.
59 60 61 |
# File 'lib/aws/cloud_formation/stack_resource_collection.rb', line 59 def [] logical_resource_id StackResource.new(stack, logical_resource_id) end |