Class: Fog::AWS::AutoScaling::Instance
- Inherits:
-
Model
- Object
- Model
- Fog::AWS::AutoScaling::Instance
- Defined in:
- lib/fog/aws/models/auto_scaling/instance.rb
Instance Method Summary collapse
- #configuration ⇒ Object
- #group ⇒ Object
- #healthy? ⇒ Boolean
-
#initialize(attributes = {}) ⇒ Instance
constructor
A new instance of Instance.
- #ready? ⇒ Boolean
- #reload ⇒ Object
- #set_health(health_status, options) ⇒ Object
- #terminate(should_decrement_desired_capacity) ⇒ Object
Constructor Details
#initialize(attributes = {}) ⇒ Instance
Returns a new instance of Instance.
12 13 14 |
# File 'lib/fog/aws/models/auto_scaling/instance.rb', line 12 def initialize(attributes={}) super end |
Instance Method Details
#configuration ⇒ Object
20 21 22 |
# File 'lib/fog/aws/models/auto_scaling/instance.rb', line 20 def configuration service.configurations.get(attributes['LaunchConfigurationName']) end |
#group ⇒ Object
16 17 18 |
# File 'lib/fog/aws/models/auto_scaling/instance.rb', line 16 def group service.groups.get(attributes['AutoScalingGroupName']) end |
#healthy? ⇒ Boolean
36 37 38 |
# File 'lib/fog/aws/models/auto_scaling/instance.rb', line 36 def healthy? health_status == 'Healthy' end |
#ready? ⇒ Boolean
40 41 42 |
# File 'lib/fog/aws/models/auto_scaling/instance.rb', line 40 def ready? life_cycle_state == 'InService' end |
#reload ⇒ Object
44 45 46 47 |
# File 'lib/fog/aws/models/auto_scaling/instance.rb', line 44 def reload super self end |
#set_health(health_status, options) ⇒ Object
24 25 26 27 28 |
# File 'lib/fog/aws/models/auto_scaling/instance.rb', line 24 def set_health(health_status, ) requires :id service.set_instance_health(health_status, id, ) reload end |
#terminate(should_decrement_desired_capacity) ⇒ Object
30 31 32 33 34 |
# File 'lib/fog/aws/models/auto_scaling/instance.rb', line 30 def terminate(should_decrement_desired_capacity) requires :id service.terminate_instance_in_auto_scaling_group(id, should_decrement_desired_capacity) reload end |