Class Instance
- All Implemented Interfaces:
Serializable,Cloneable
Describes an EC2 instance.
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionclone()booleanThe Availability Zone in which the instance is running.The health status of the instance.The ID of the instance.The launch configuration associated with the instance.A description of the current lifecycle state.Indicates whether the instance is protected from termination by Auto Scaling when scaling in.inthashCode()Indicates whether the instance is protected from termination by Auto Scaling when scaling in.voidsetAvailabilityZone(String availabilityZone) The Availability Zone in which the instance is running.voidsetHealthStatus(String healthStatus) The health status of the instance.voidsetInstanceId(String instanceId) The ID of the instance.voidsetLaunchConfigurationName(String launchConfigurationName) The launch configuration associated with the instance.voidsetLifecycleState(LifecycleState lifecycleState) A description of the current lifecycle state.voidsetLifecycleState(String lifecycleState) A description of the current lifecycle state.voidsetProtectedFromScaleIn(Boolean protectedFromScaleIn) Indicates whether the instance is protected from termination by Auto Scaling when scaling in.toString()Returns a string representation of this object; useful for testing and debugging.withAvailabilityZone(String availabilityZone) The Availability Zone in which the instance is running.withHealthStatus(String healthStatus) The health status of the instance.withInstanceId(String instanceId) The ID of the instance.withLaunchConfigurationName(String launchConfigurationName) The launch configuration associated with the instance.withLifecycleState(LifecycleState lifecycleState) A description of the current lifecycle state.withLifecycleState(String lifecycleState) A description of the current lifecycle state.withProtectedFromScaleIn(Boolean protectedFromScaleIn) Indicates whether the instance is protected from termination by Auto Scaling when scaling in.
-
Constructor Details
-
Instance
public Instance()
-
-
Method Details
-
setInstanceId
The ID of the instance.
- Parameters:
instanceId- The ID of the instance.
-
getInstanceId
The ID of the instance.
- Returns:
- The ID of the instance.
-
withInstanceId
The ID of the instance.
- Parameters:
instanceId- The ID of the instance.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
setAvailabilityZone
The Availability Zone in which the instance is running.
- Parameters:
availabilityZone- The Availability Zone in which the instance is running.
-
getAvailabilityZone
The Availability Zone in which the instance is running.
- Returns:
- The Availability Zone in which the instance is running.
-
withAvailabilityZone
The Availability Zone in which the instance is running.
- Parameters:
availabilityZone- The Availability Zone in which the instance is running.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
setLifecycleState
A description of the current lifecycle state. Note that the
Quarantinedstate is not used.- Parameters:
lifecycleState- A description of the current lifecycle state. Note that theQuarantinedstate is not used.- See Also:
-
getLifecycleState
A description of the current lifecycle state. Note that the
Quarantinedstate is not used.- Returns:
- A description of the current lifecycle state. Note that the
Quarantinedstate is not used. - See Also:
-
withLifecycleState
A description of the current lifecycle state. Note that the
Quarantinedstate is not used.- Parameters:
lifecycleState- A description of the current lifecycle state. Note that theQuarantinedstate is not used.- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
-
setLifecycleState
A description of the current lifecycle state. Note that the
Quarantinedstate is not used.- Parameters:
lifecycleState- A description of the current lifecycle state. Note that theQuarantinedstate is not used.- See Also:
-
withLifecycleState
A description of the current lifecycle state. Note that the
Quarantinedstate is not used.- Parameters:
lifecycleState- A description of the current lifecycle state. Note that theQuarantinedstate is not used.- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
-
setHealthStatus
The health status of the instance. "Healthy" means that the instance is healthy and should remain in service. "Unhealthy" means that the instance is unhealthy and Auto Scaling should terminate and replace it.
- Parameters:
healthStatus- The health status of the instance. "Healthy" means that the instance is healthy and should remain in service. "Unhealthy" means that the instance is unhealthy and Auto Scaling should terminate and replace it.
-
getHealthStatus
The health status of the instance. "Healthy" means that the instance is healthy and should remain in service. "Unhealthy" means that the instance is unhealthy and Auto Scaling should terminate and replace it.
- Returns:
- The health status of the instance. "Healthy" means that the instance is healthy and should remain in service. "Unhealthy" means that the instance is unhealthy and Auto Scaling should terminate and replace it.
-
withHealthStatus
The health status of the instance. "Healthy" means that the instance is healthy and should remain in service. "Unhealthy" means that the instance is unhealthy and Auto Scaling should terminate and replace it.
- Parameters:
healthStatus- The health status of the instance. "Healthy" means that the instance is healthy and should remain in service. "Unhealthy" means that the instance is unhealthy and Auto Scaling should terminate and replace it.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
setLaunchConfigurationName
The launch configuration associated with the instance.
- Parameters:
launchConfigurationName- The launch configuration associated with the instance.
-
getLaunchConfigurationName
The launch configuration associated with the instance.
- Returns:
- The launch configuration associated with the instance.
-
withLaunchConfigurationName
The launch configuration associated with the instance.
- Parameters:
launchConfigurationName- The launch configuration associated with the instance.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
setProtectedFromScaleIn
Indicates whether the instance is protected from termination by Auto Scaling when scaling in.
- Parameters:
protectedFromScaleIn- Indicates whether the instance is protected from termination by Auto Scaling when scaling in.
-
getProtectedFromScaleIn
Indicates whether the instance is protected from termination by Auto Scaling when scaling in.
- Returns:
- Indicates whether the instance is protected from termination by Auto Scaling when scaling in.
-
withProtectedFromScaleIn
Indicates whether the instance is protected from termination by Auto Scaling when scaling in.
- Parameters:
protectedFromScaleIn- Indicates whether the instance is protected from termination by Auto Scaling when scaling in.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
isProtectedFromScaleIn
Indicates whether the instance is protected from termination by Auto Scaling when scaling in.
- Returns:
- Indicates whether the instance is protected from termination by Auto Scaling when scaling in.
-
toString
Returns a string representation of this object; useful for testing and debugging. -
equals
-
hashCode
public int hashCode() -
clone
-