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.
15 16 17 |
# File 'lib/fog/aws/models/auto_scaling/instance.rb', line 15 def initialize(attributes={}) super end |
Instance Method Details
#configuration ⇒ Object
23 24 25 |
# File 'lib/fog/aws/models/auto_scaling/instance.rb', line 23 def configuration service.configurations.get(attributes['LaunchConfigurationName']) end |
#group ⇒ Object
19 20 21 |
# File 'lib/fog/aws/models/auto_scaling/instance.rb', line 19 def group service.groups.get(attributes['AutoScalingGroupName']) end |
#healthy? ⇒ Boolean
39 40 41 |
# File 'lib/fog/aws/models/auto_scaling/instance.rb', line 39 def healthy? health_status == 'HEALTHY' end |
#ready? ⇒ Boolean
43 44 45 |
# File 'lib/fog/aws/models/auto_scaling/instance.rb', line 43 def ready? life_cycle_state == 'InService' end |
#reload ⇒ Object
47 48 49 50 |
# File 'lib/fog/aws/models/auto_scaling/instance.rb', line 47 def reload super self end |
#set_health(health_status, options) ⇒ Object
27 28 29 30 31 |
# File 'lib/fog/aws/models/auto_scaling/instance.rb', line 27 def set_health(health_status, ) requires :id service.set_instance_health(health_status, id, ) reload end |
#terminate(should_decrement_desired_capacity) ⇒ Object
33 34 35 36 37 |
# File 'lib/fog/aws/models/auto_scaling/instance.rb', line 33 def terminate(should_decrement_desired_capacity) requires :id service.terminate_instance_in_auto_scaling_group(id, should_decrement_desired_capacity) reload end |