You are viewing documentation for version 2 of the AWS SDK for Ruby. Version 3 documentation can be found here.
Class: Aws::AutoScaling::Instance
- Inherits:
-
Resources::Resource
- Object
- Resources::Resource
- Aws::AutoScaling::Instance
- Defined in:
- (unknown)
Instance Attribute Summary collapse
-
#auto_scaling_group_name ⇒ String
readonly
The name of the Auto Scaling group for the instance.
-
#availability_zone ⇒ String
readonly
The Availability Zone for the instance.
-
#group_name ⇒ String
readonly
-
#health_status ⇒ String
readonly
The last reported health status of this instance.
-
#id ⇒ String
readonly
-
#instance_id ⇒ String
readonly
The ID of the instance.
-
#instance_type ⇒ String
readonly
The instance type of the EC2 instance.
-
#launch_configuration_name ⇒ String
readonly
The launch configuration used to launch the instance.
-
#launch_template ⇒ Types::LaunchTemplateSpecification
readonly
The launch template for the instance.
-
#lifecycle_state ⇒ String
readonly
The lifecycle state for the instance.
-
#protected_from_scale_in ⇒ Boolean
readonly
Indicates whether the instance is protected from termination by Amazon EC2 Auto Scaling when scaling in.
-
#weighted_capacity ⇒ String
readonly
The number of capacity units contributed by the instance based on its instance type.
Attributes inherited from Resources::Resource
Instance Method Summary collapse
-
#attach ⇒ Struct
Attaches one or more EC2 instances to the specified Auto Scaling group.
When you attach instances, Amazon EC2 Auto Scaling increases the desired capacity of the group by the number of instances being attached.
-
#detach(options = {}) ⇒ Array<Activity>
-
#enter_standby(options = {}) ⇒ Array<Activity>
-
#exit_standby ⇒ Array<Activity>
-
#group ⇒ AutoScalingGroup
-
#initialize ⇒ Object
constructor
-
#launch_configuration ⇒ LaunchConfiguration?
-
#set_health(options = {}) ⇒ Struct
Sets the health status of the specified instance.
For more information, see Health checks for Auto Scaling instances in the Amazon EC2 Auto Scaling User Guide.
. -
#terminate(options = {}) ⇒ Activity
Methods inherited from Resources::Resource
add_data_attribute, add_identifier, #data, data_attributes, #data_loaded?, identifiers, #load, #wait_until
Methods included from Resources::OperationMethods
#add_batch_operation, #add_operation, #batch_operation, #batch_operation_names, #batch_operations, #operation, #operation_names, #operations
Constructor Details
#initialize(group_name, id, options = {}) ⇒ Object #initialize(options = {}) ⇒ Object
Instance Attribute Details
#auto_scaling_group_name ⇒ String (readonly)
The name of the Auto Scaling group for the instance.
#availability_zone ⇒ String (readonly)
The Availability Zone for the instance.
#group_name ⇒ String (readonly)
#health_status ⇒ String (readonly)
The last reported health status of this instance. \"Healthy\" means that the instance is healthy and should remain in service. \"Unhealthy\" means that the instance is unhealthy and Amazon EC2 Auto Scaling should terminate and replace it.
#id ⇒ String (readonly)
#instance_id ⇒ String (readonly)
The ID of the instance.
#instance_type ⇒ String (readonly)
The instance type of the EC2 instance.
#launch_configuration_name ⇒ String (readonly)
The launch configuration used to launch the instance. This value is not available if you attached the instance to the Auto Scaling group.
#launch_template ⇒ Types::LaunchTemplateSpecification (readonly)
The launch template for the instance.
#lifecycle_state ⇒ String (readonly)
The lifecycle state for the instance.
#protected_from_scale_in ⇒ Boolean (readonly)
Indicates whether the instance is protected from termination by Amazon EC2 Auto Scaling when scaling in.
#weighted_capacity ⇒ String (readonly)
The number of capacity units contributed by the instance based on its instance type.
Valid Range: Minimum value of 1. Maximum value of 999.
Instance Method Details
#attach ⇒ Struct
Attaches one or more EC2 instances to the specified Auto Scaling group.
When you attach instances, Amazon EC2 Auto Scaling increases the desired capacity of the group by the number of instances being attached. If the number of instances being attached plus the desired capacity of the group exceeds the maximum size of the group, the operation fails.
If there is a Classic Load Balancer attached to your Auto Scaling group, the instances are also registered with the load balancer. If there are target groups attached to your Auto Scaling group, the instances are also registered with the target groups.
For more information, see Attach EC2 instances to your Auto Scaling group in the Amazon EC2 Auto Scaling User Guide.
#detach(options = {}) ⇒ Array<Activity>
#enter_standby(options = {}) ⇒ Array<Activity>
#exit_standby ⇒ Array<Activity>
#group ⇒ AutoScalingGroup
#launch_configuration ⇒ LaunchConfiguration?
#set_health(options = {}) ⇒ Struct
Sets the health status of the specified instance.
For more information, see Health checks for Auto Scaling instances in the Amazon EC2 Auto Scaling User Guide.