public class Instance
extends java.lang.Object
implements java.io.Serializable, java.lang.Cloneable
Describes an EC2 instance.
Modifier and Type | Field and Description |
---|---|
private java.lang.String |
availabilityZone
The Availability Zone in which the instance is running.
|
private java.lang.String |
healthStatus
The health status of the instance.
|
private java.lang.String |
instanceId
The ID of the instance.
|
private java.lang.String |
launchConfigurationName
The launch configuration associated with the instance.
|
private java.lang.String |
lifecycleState
A description of the current lifecycle state.
|
private java.lang.Boolean |
protectedFromScaleIn
Indicates whether the instance is protected from termination by Auto
Scaling when scaling in.
|
Constructor and Description |
---|
Instance() |
Modifier and Type | Method and Description |
---|---|
Instance |
clone() |
boolean |
equals(java.lang.Object obj) |
java.lang.String |
getAvailabilityZone()
The Availability Zone in which the instance is running.
|
java.lang.String |
getHealthStatus()
The health status of the instance.
|
java.lang.String |
getInstanceId()
The ID of the instance.
|
java.lang.String |
getLaunchConfigurationName()
The launch configuration associated with the instance.
|
java.lang.String |
getLifecycleState()
A description of the current lifecycle state.
|
java.lang.Boolean |
getProtectedFromScaleIn()
Indicates whether the instance is protected from termination by Auto
Scaling when scaling in.
|
int |
hashCode() |
java.lang.Boolean |
isProtectedFromScaleIn()
Indicates whether the instance is protected from termination by Auto
Scaling when scaling in.
|
void |
setAvailabilityZone(java.lang.String availabilityZone)
The Availability Zone in which the instance is running.
|
void |
setHealthStatus(java.lang.String healthStatus)
The health status of the instance.
|
void |
setInstanceId(java.lang.String instanceId)
The ID of the instance.
|
void |
setLaunchConfigurationName(java.lang.String launchConfigurationName)
The launch configuration associated with the instance.
|
void |
setLifecycleState(LifecycleState lifecycleState)
A description of the current lifecycle state.
|
void |
setLifecycleState(java.lang.String lifecycleState)
A description of the current lifecycle state.
|
void |
setProtectedFromScaleIn(java.lang.Boolean protectedFromScaleIn)
Indicates whether the instance is protected from termination by Auto
Scaling when scaling in.
|
java.lang.String |
toString()
Returns a string representation of this object; useful for testing and
debugging.
|
Instance |
withAvailabilityZone(java.lang.String availabilityZone)
The Availability Zone in which the instance is running.
|
Instance |
withHealthStatus(java.lang.String healthStatus)
The health status of the instance.
|
Instance |
withInstanceId(java.lang.String instanceId)
The ID of the instance.
|
Instance |
withLaunchConfigurationName(java.lang.String launchConfigurationName)
The launch configuration associated with the instance.
|
Instance |
withLifecycleState(LifecycleState lifecycleState)
A description of the current lifecycle state.
|
Instance |
withLifecycleState(java.lang.String lifecycleState)
A description of the current lifecycle state.
|
Instance |
withProtectedFromScaleIn(java.lang.Boolean protectedFromScaleIn)
Indicates whether the instance is protected from termination by Auto
Scaling when scaling in.
|
private java.lang.String instanceId
The ID of the instance.
private java.lang.String availabilityZone
The Availability Zone in which the instance is running.
private java.lang.String lifecycleState
A description of the current lifecycle state. Note that the
Quarantined
state is not used.
private java.lang.String 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.
private java.lang.String launchConfigurationName
The launch configuration associated with the instance.
private java.lang.Boolean protectedFromScaleIn
Indicates whether the instance is protected from termination by Auto Scaling when scaling in.
public void setInstanceId(java.lang.String instanceId)
The ID of the instance.
instanceId
- The ID of the instance.public java.lang.String getInstanceId()
The ID of the instance.
public Instance withInstanceId(java.lang.String instanceId)
The ID of the instance.
instanceId
- The ID of the instance.public void setAvailabilityZone(java.lang.String availabilityZone)
The Availability Zone in which the instance is running.
availabilityZone
- The Availability Zone in which the instance is running.public java.lang.String getAvailabilityZone()
The Availability Zone in which the instance is running.
public Instance withAvailabilityZone(java.lang.String availabilityZone)
The Availability Zone in which the instance is running.
availabilityZone
- The Availability Zone in which the instance is running.public void setLifecycleState(java.lang.String lifecycleState)
A description of the current lifecycle state. Note that the
Quarantined
state is not used.
lifecycleState
- A description of the current lifecycle state. Note that the
Quarantined
state is not used.LifecycleState
public java.lang.String getLifecycleState()
A description of the current lifecycle state. Note that the
Quarantined
state is not used.
Quarantined
state is not used.LifecycleState
public Instance withLifecycleState(java.lang.String lifecycleState)
A description of the current lifecycle state. Note that the
Quarantined
state is not used.
lifecycleState
- A description of the current lifecycle state. Note that the
Quarantined
state is not used.LifecycleState
public void setLifecycleState(LifecycleState lifecycleState)
A description of the current lifecycle state. Note that the
Quarantined
state is not used.
lifecycleState
- A description of the current lifecycle state. Note that the
Quarantined
state is not used.LifecycleState
public Instance withLifecycleState(LifecycleState lifecycleState)
A description of the current lifecycle state. Note that the
Quarantined
state is not used.
lifecycleState
- A description of the current lifecycle state. Note that the
Quarantined
state is not used.LifecycleState
public void setHealthStatus(java.lang.String 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.
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.public java.lang.String 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.
public Instance withHealthStatus(java.lang.String 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.
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.public void setLaunchConfigurationName(java.lang.String launchConfigurationName)
The launch configuration associated with the instance.
launchConfigurationName
- The launch configuration associated with the instance.public java.lang.String getLaunchConfigurationName()
The launch configuration associated with the instance.
public Instance withLaunchConfigurationName(java.lang.String launchConfigurationName)
The launch configuration associated with the instance.
launchConfigurationName
- The launch configuration associated with the instance.public void setProtectedFromScaleIn(java.lang.Boolean protectedFromScaleIn)
Indicates whether the instance is protected from termination by Auto Scaling when scaling in.
protectedFromScaleIn
- Indicates whether the instance is protected from termination by
Auto Scaling when scaling in.public java.lang.Boolean getProtectedFromScaleIn()
Indicates whether the instance is protected from termination by Auto Scaling when scaling in.
public Instance withProtectedFromScaleIn(java.lang.Boolean protectedFromScaleIn)
Indicates whether the instance is protected from termination by Auto Scaling when scaling in.
protectedFromScaleIn
- Indicates whether the instance is protected from termination by
Auto Scaling when scaling in.public java.lang.Boolean isProtectedFromScaleIn()
Indicates whether the instance is protected from termination by Auto Scaling when scaling in.
public java.lang.String toString()
toString
in class java.lang.Object
Object.toString()
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public Instance clone()
clone
in class java.lang.Object