Class: Serverspec::Type::AWS::CloudFormation::Stack
- Inherits:
-
Base
- Object
- Base
- Serverspec::Type::AWS::CloudFormation::Stack
- Defined in:
- lib/resources/cloudformation/stack.rb
Overview
The Stack class exposes the CloudFormation::Stack resources
Instance Method Summary collapse
-
#capabilities ⇒ Array(String)
The capabilities allowed in the Stack.
-
#description ⇒ String
User defined description associated with the Stack.
-
#initialize(stack_name, instance = nil) ⇒ Stack
constructor
AWS SDK for Ruby v2 Aws::CloudFormation::Client wrapper for initializing a Stack resource.
-
#notification_arns ⇒ Array(String)
SNS topic ARNs to which Stack related events are published.
-
#ok? ⇒ Boolean
Check if the Stack is in CREATE_COMPLETE or UPDATE_COMPLETE status.
-
#outputs ⇒ Array(Hash)
A list of output structures.
-
#parameters ⇒ Array(Hash)
A list of Parameter structures.
-
#rollback_disabled? ⇒ Boolean
Check whether the rollback on Stack creation failures is disabled.
-
#stack_status ⇒ String
Current status of the Stack.
-
#tags ⇒ Array(Hash)
A list of tags that specify cost allocation information for the Stack.
-
#timeout_in_minutes ⇒ Integer
The amount of time within which Stack creation should complete.
-
#to_s ⇒ String
Returns the String representation of CloudFormation::Stack.
Constructor Details
#initialize(stack_name, instance = nil) ⇒ Stack
AWS SDK for Ruby v2 Aws::CloudFormation::Client wrapper for initializing a Stack resource
15 16 17 18 19 20 |
# File 'lib/resources/cloudformation/stack.rb', line 15 def initialize(stack_name, instance = nil) check_init_arg 'stack_name', 'CloudFormation::Stack', stack_name @stack_name = stack_name @aws = instance.nil? ? Aws::CloudFormation::Client.new : instance get_stack stack_name end |
Instance Method Details
#capabilities ⇒ Array(String)
The capabilities allowed in the Stack
71 72 73 |
# File 'lib/resources/cloudformation/stack.rb', line 71 def capabilities @stack.capabilities end |
#description ⇒ String
User defined description associated with the Stack
41 42 43 |
# File 'lib/resources/cloudformation/stack.rb', line 41 def description @stack.description end |
#notification_arns ⇒ Array(String)
SNS topic ARNs to which Stack related events are published
59 60 61 |
# File 'lib/resources/cloudformation/stack.rb', line 59 def notification_arns @stack.notification_arns end |
#ok? ⇒ Boolean
Check if the Stack is in CREATE_COMPLETE or UPDATE_COMPLETE status
34 35 36 37 |
# File 'lib/resources/cloudformation/stack.rb', line 34 def ok? @stack.stack_status == 'CREATE_COMPLETE' || @stack.stack_status == 'UPDATE_COMPLETE' end |
#outputs ⇒ Array(Hash)
A list of output structures
77 78 79 |
# File 'lib/resources/cloudformation/stack.rb', line 77 def outputs @stack.outputs end |
#parameters ⇒ Array(Hash)
A list of Parameter structures
47 48 49 |
# File 'lib/resources/cloudformation/stack.rb', line 47 def parameters @stack.parameters end |
#rollback_disabled? ⇒ Boolean
Check whether the rollback on Stack creation failures is disabled
29 30 31 |
# File 'lib/resources/cloudformation/stack.rb', line 29 def rollback_disabled? @stack.disable_rollback end |
#stack_status ⇒ String
Current status of the Stack
53 54 55 |
# File 'lib/resources/cloudformation/stack.rb', line 53 def stack_status @stack.stack_status end |
#tags ⇒ Array(Hash)
A list of tags that specify cost allocation information for the Stack
84 85 86 |
# File 'lib/resources/cloudformation/stack.rb', line 84 def @stack. end |
#timeout_in_minutes ⇒ Integer
The amount of time within which Stack creation should complete
65 66 67 |
# File 'lib/resources/cloudformation/stack.rb', line 65 def timeout_in_minutes @stack.timeout_in_minutes end |
#to_s ⇒ String
Returns the String representation of CloudFormation::Stack
24 25 26 |
# File 'lib/resources/cloudformation/stack.rb', line 24 def to_s "CloudFormation Stack: #{@stack_name}" end |