Class: Cliaws::Ec2::Instance
- Inherits:
-
Object
- Object
- Cliaws::Ec2::Instance
- Defined in:
- lib/cliaws/ec2.rb
Instance Attribute Summary collapse
-
#raw_data ⇒ Object
readonly
Returns the value of attribute raw_data.
Instance Method Summary collapse
- #groups ⇒ Object
-
#initialize(raw_data) ⇒ Instance
constructor
A new instance of Instance.
- #instance_id ⇒ Object
- #private_dns_name ⇒ Object
- #public_dns_name ⇒ Object
- #running? ⇒ Boolean
- #state ⇒ Object
Constructor Details
#initialize(raw_data) ⇒ Instance
Returns a new instance of Instance.
55 56 57 |
# File 'lib/cliaws/ec2.rb', line 55 def initialize(raw_data) @raw_data = raw_data end |
Instance Attribute Details
#raw_data ⇒ Object (readonly)
Returns the value of attribute raw_data.
53 54 55 |
# File 'lib/cliaws/ec2.rb', line 53 def raw_data @raw_data end |
Instance Method Details
#groups ⇒ Object
79 80 81 |
# File 'lib/cliaws/ec2.rb', line 79 def groups @raw_data[:aws_groups] end |
#instance_id ⇒ Object
63 64 65 |
# File 'lib/cliaws/ec2.rb', line 63 def instance_id @raw_data[:aws_instance_id] end |
#private_dns_name ⇒ Object
71 72 73 |
# File 'lib/cliaws/ec2.rb', line 71 def private_dns_name @raw_data[:aws_private_dns_name] end |
#public_dns_name ⇒ Object
67 68 69 |
# File 'lib/cliaws/ec2.rb', line 67 def public_dns_name @raw_data[:dns_name] end |
#running? ⇒ Boolean
59 60 61 |
# File 'lib/cliaws/ec2.rb', line 59 def running? @raw_data[:aws_state] == "running" end |
#state ⇒ Object
75 76 77 |
# File 'lib/cliaws/ec2.rb', line 75 def state @raw_data[:aws_state] end |