Class: Aws::OpsWorks::StackSummary
- Inherits:
-
Object
- Object
- Aws::OpsWorks::StackSummary
- Extended by:
- Deprecations
- Defined in:
- lib/aws-sdk-opsworks/stack_summary.rb
Defined Under Namespace
Classes: Collection
Read-Only Attributes collapse
-
#apps_count ⇒ Integer
The number of apps.
-
#arn ⇒ String
The stack’s ARN.
-
#instances_count ⇒ Types::InstancesCount
An ‘InstancesCount` object with the number of instances in each status.
-
#layers_count ⇒ Integer
The number of layers.
-
#name ⇒ String
The stack name.
- #stack_id ⇒ String
Associations collapse
- #identifiers ⇒ Object deprecated private Deprecated.
- #stack ⇒ Stack
Instance Method Summary collapse
- #client ⇒ Client
-
#data ⇒ Types::StackSummary
Returns the data for this StackSummary.
-
#data_loaded? ⇒ Boolean
Returns ‘true` if this resource is loaded.
-
#initialize(*args) ⇒ StackSummary
constructor
A new instance of StackSummary.
-
#load ⇒ self
(also: #reload)
Loads, or reloads #data for the current StackSummary.
Constructor Details
#initialize(stack_id, options = {}) ⇒ StackSummary #initialize(options = {}) ⇒ StackSummary
Returns a new instance of StackSummary.
19 20 21 22 23 24 |
# File 'lib/aws-sdk-opsworks/stack_summary.rb', line 19 def initialize(*args) = Hash === args.last ? args.pop.dup : {} @stack_id = extract_stack_id(args, ) @data = .delete(:data) @client = .delete(:client) || Client.new() end |
Instance Method Details
#apps_count ⇒ Integer
The number of apps.
53 54 55 |
# File 'lib/aws-sdk-opsworks/stack_summary.rb', line 53 def apps_count data.apps_count end |
#arn ⇒ String
The stack’s ARN.
41 42 43 |
# File 'lib/aws-sdk-opsworks/stack_summary.rb', line 41 def arn data.arn end |
#client ⇒ Client
67 68 69 |
# File 'lib/aws-sdk-opsworks/stack_summary.rb', line 67 def client @client end |
#data ⇒ Types::StackSummary
Returns the data for this Aws::OpsWorks::StackSummary. Calls Client#describe_stack_summary if #data_loaded? is ‘false`.
87 88 89 90 |
# File 'lib/aws-sdk-opsworks/stack_summary.rb', line 87 def data load unless @data @data end |
#data_loaded? ⇒ Boolean
95 96 97 |
# File 'lib/aws-sdk-opsworks/stack_summary.rb', line 95 def data_loaded? !!@data end |
#identifiers ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
111 112 113 |
# File 'lib/aws-sdk-opsworks/stack_summary.rb', line 111 def identifiers { stack_id: @stack_id } end |
#instances_count ⇒ Types::InstancesCount
An ‘InstancesCount` object with the number of instances in each status.
60 61 62 |
# File 'lib/aws-sdk-opsworks/stack_summary.rb', line 60 def instances_count data.instances_count end |
#layers_count ⇒ Integer
The number of layers.
47 48 49 |
# File 'lib/aws-sdk-opsworks/stack_summary.rb', line 47 def layers_count data.layers_count end |
#load ⇒ self Also known as: reload
Loads, or reloads #data for the current Aws::OpsWorks::StackSummary. Returns ‘self` making it possible to chain methods.
stack_summary.reload.data
77 78 79 80 81 |
# File 'lib/aws-sdk-opsworks/stack_summary.rb', line 77 def load resp = @client.describe_stack_summary(stack_id: @stack_id) @data = resp.stack_summary self end |
#name ⇒ String
The stack name.
35 36 37 |
# File 'lib/aws-sdk-opsworks/stack_summary.rb', line 35 def name data.name end |
#stack ⇒ Stack
102 103 104 105 106 107 |
# File 'lib/aws-sdk-opsworks/stack_summary.rb', line 102 def stack Stack.new( id: @stack_id, client: @client ) end |
#stack_id ⇒ String
29 30 31 |
# File 'lib/aws-sdk-opsworks/stack_summary.rb', line 29 def stack_id @stack_id end |