Class Instance
- java.lang.Object
-
- com.amazonaws.services.autoscaling.model.Instance
-
- All Implemented Interfaces:
Serializable,Cloneable
public class Instance extends Object implements Serializable, Cloneable
Describes an EC2 instance.
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description Instance()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Instanceclone()booleanequals(Object obj)StringgetAvailabilityZone()The Availability Zone in which the instance is running.StringgetHealthStatus()The health status of the instance.StringgetInstanceId()The ID of the instance.StringgetLaunchConfigurationName()The launch configuration associated with the instance.StringgetLifecycleState()A description of the current lifecycle state.BooleangetProtectedFromScaleIn()Indicates whether the instance is protected from termination by Auto Scaling when scaling in.inthashCode()BooleanisProtectedFromScaleIn()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.StringtoString()Returns a string representation of this object; useful for testing and debugging.InstancewithAvailabilityZone(String availabilityZone)The Availability Zone in which the instance is running.InstancewithHealthStatus(String healthStatus)The health status of the instance.InstancewithInstanceId(String instanceId)The ID of the instance.InstancewithLaunchConfigurationName(String launchConfigurationName)The launch configuration associated with the instance.InstancewithLifecycleState(LifecycleState lifecycleState)A description of the current lifecycle state.InstancewithLifecycleState(String lifecycleState)A description of the current lifecycle state.InstancewithProtectedFromScaleIn(Boolean protectedFromScaleIn)Indicates whether the instance is protected from termination by Auto Scaling when scaling in.
-
-
-
Method Detail
-
setInstanceId
public void setInstanceId(String instanceId)
The ID of the instance.
- Parameters:
instanceId- The ID of the instance.
-
getInstanceId
public String getInstanceId()
The ID of the instance.
- Returns:
- The ID of the instance.
-
withInstanceId
public Instance withInstanceId(String instanceId)
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
public void setAvailabilityZone(String availabilityZone)
The Availability Zone in which the instance is running.
- Parameters:
availabilityZone- The Availability Zone in which the instance is running.
-
getAvailabilityZone
public String getAvailabilityZone()
The Availability Zone in which the instance is running.
- Returns:
- The Availability Zone in which the instance is running.
-
withAvailabilityZone
public Instance withAvailabilityZone(String availabilityZone)
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
public void setLifecycleState(String lifecycleState)
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:
LifecycleState
-
getLifecycleState
public String 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:
LifecycleState
-
withLifecycleState
public Instance withLifecycleState(String lifecycleState)
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:
LifecycleState
-
setLifecycleState
public void setLifecycleState(LifecycleState lifecycleState)
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:
LifecycleState
-
withLifecycleState
public Instance withLifecycleState(LifecycleState lifecycleState)
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:
LifecycleState
-
setHealthStatus
public void setHealthStatus(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.
- 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
public 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.
- 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
public Instance withHealthStatus(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.
- 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
public void setLaunchConfigurationName(String launchConfigurationName)
The launch configuration associated with the instance.
- Parameters:
launchConfigurationName- The launch configuration associated with the instance.
-
getLaunchConfigurationName
public String getLaunchConfigurationName()
The launch configuration associated with the instance.
- Returns:
- The launch configuration associated with the instance.
-
withLaunchConfigurationName
public Instance withLaunchConfigurationName(String launchConfigurationName)
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
public void setProtectedFromScaleIn(Boolean protectedFromScaleIn)
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
public Boolean 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
public Instance withProtectedFromScaleIn(Boolean protectedFromScaleIn)
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
public Boolean 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
public String toString()
Returns a string representation of this object; useful for testing and debugging.- Overrides:
toStringin classObject- Returns:
- A string representation of this object.
- See Also:
Object.toString()
-
-