@Generated(value="com.amazonaws:aws-java-sdk-code-generator") public class Instance extends Object implements Serializable, Cloneable
Describes an EC2 instance.
Constructor and Description |
---|
Instance() |
Modifier and Type | Method and Description |
---|---|
Instance |
clone() |
boolean |
equals(Object obj) |
String |
getAvailabilityZone()
The Availability Zone in which the instance is running.
|
String |
getHealthStatus()
The last reported health status of the instance.
|
String |
getInstanceId()
The ID of the instance.
|
String |
getLaunchConfigurationName()
The launch configuration associated with the instance.
|
String |
getLifecycleState()
A description of the current lifecycle state.
|
Boolean |
getProtectedFromScaleIn()
Indicates whether the instance is protected from termination by Auto Scaling when scaling in.
|
int |
hashCode() |
Boolean |
isProtectedFromScaleIn()
Indicates whether the instance is protected from termination by Auto Scaling when scaling in.
|
void |
setAvailabilityZone(String availabilityZone)
The Availability Zone in which the instance is running.
|
void |
setHealthStatus(String healthStatus)
The last reported health status of the instance.
|
void |
setInstanceId(String instanceId)
The ID of the instance.
|
void |
setLaunchConfigurationName(String launchConfigurationName)
The launch configuration associated with the instance.
|
void |
setLifecycleState(LifecycleState lifecycleState)
A description of the current lifecycle state.
|
void |
setLifecycleState(String lifecycleState)
A description of the current lifecycle state.
|
void |
setProtectedFromScaleIn(Boolean protectedFromScaleIn)
Indicates whether the instance is protected from termination by Auto Scaling when scaling in.
|
String |
toString()
Returns a string representation of this object; useful for testing and debugging.
|
Instance |
withAvailabilityZone(String availabilityZone)
The Availability Zone in which the instance is running.
|
Instance |
withHealthStatus(String healthStatus)
The last reported health status of the instance.
|
Instance |
withInstanceId(String instanceId)
The ID of the instance.
|
Instance |
withLaunchConfigurationName(String launchConfigurationName)
The launch configuration associated with the instance.
|
Instance |
withLifecycleState(LifecycleState lifecycleState)
A description of the current lifecycle state.
|
Instance |
withLifecycleState(String lifecycleState)
A description of the current lifecycle state.
|
Instance |
withProtectedFromScaleIn(Boolean protectedFromScaleIn)
Indicates whether the instance is protected from termination by Auto Scaling when scaling in.
|
public void setInstanceId(String instanceId)
The ID of the instance.
instanceId
- The ID of the instance.public String getInstanceId()
The ID of the instance.
public Instance withInstanceId(String instanceId)
The ID of the instance.
instanceId
- The ID of the instance.public void setAvailabilityZone(String availabilityZone)
The Availability Zone in which the instance is running.
availabilityZone
- The Availability Zone in which the instance is running.public String getAvailabilityZone()
The Availability Zone in which the instance is running.
public Instance withAvailabilityZone(String availabilityZone)
The Availability Zone in which the instance is running.
availabilityZone
- The Availability Zone in which the instance is running.public void setLifecycleState(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 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(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(String healthStatus)
The last reported 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 last reported 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 String getHealthStatus()
The last reported 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(String healthStatus)
The last reported 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 last reported 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(String launchConfigurationName)
The launch configuration associated with the instance.
launchConfigurationName
- The launch configuration associated with the instance.public String getLaunchConfigurationName()
The launch configuration associated with the instance.
public Instance withLaunchConfigurationName(String launchConfigurationName)
The launch configuration associated with the instance.
launchConfigurationName
- The launch configuration associated with the instance.public void setProtectedFromScaleIn(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 Boolean getProtectedFromScaleIn()
Indicates whether the instance is protected from termination by Auto Scaling when scaling in.
public Instance withProtectedFromScaleIn(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 Boolean isProtectedFromScaleIn()
Indicates whether the instance is protected from termination by Auto Scaling when scaling in.
public String toString()
toString
in class Object
Object.toString()
Copyright © 2013 Amazon Web Services, Inc. All Rights Reserved.