@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 |
getInstanceType()
The instance type of the EC2 instance.
|
String |
getLaunchConfigurationName()
The launch configuration associated with the instance.
|
LaunchTemplateSpecification |
getLaunchTemplate()
The launch template for the instance.
|
String |
getLifecycleState()
A description of the current lifecycle state.
|
Boolean |
getProtectedFromScaleIn()
Indicates whether the instance is protected from termination by Amazon EC2 Auto Scaling when scaling in.
|
String |
getWeightedCapacity()
The number of capacity units contributed by the instance based on its instance type.
|
int |
hashCode() |
Boolean |
isProtectedFromScaleIn()
Indicates whether the instance is protected from termination by Amazon EC2 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 |
setInstanceType(String instanceType)
The instance type of the EC2 instance.
|
void |
setLaunchConfigurationName(String launchConfigurationName)
The launch configuration associated with the instance.
|
void |
setLaunchTemplate(LaunchTemplateSpecification launchTemplate)
The launch template for 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 Amazon EC2 Auto Scaling when scaling in.
|
void |
setWeightedCapacity(String weightedCapacity)
The number of capacity units contributed by the instance based on its instance type.
|
String |
toString()
Returns a string representation of this object.
|
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 |
withInstanceType(String instanceType)
The instance type of the EC2 instance.
|
Instance |
withLaunchConfigurationName(String launchConfigurationName)
The launch configuration associated with the instance.
|
Instance |
withLaunchTemplate(LaunchTemplateSpecification launchTemplate)
The launch template for 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 Amazon EC2 Auto Scaling when scaling in.
|
Instance |
withWeightedCapacity(String weightedCapacity)
The number of capacity units contributed by the instance based on its instance type.
|
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 setInstanceType(String instanceType)
The instance type of the EC2 instance.
instanceType
- The instance type of the EC2 instance.public String getInstanceType()
The instance type of the EC2 instance.
public Instance withInstanceType(String instanceType)
The instance type of the EC2 instance.
instanceType
- The instance type of the EC2 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. The Quarantined
state is not used. For more
information, see Amazon EC2 Auto
Scaling instance lifecycle in the Amazon EC2 Auto Scaling User Guide.
lifecycleState
- A description of the current lifecycle state. The Quarantined
state is not used. For more
information, see Amazon EC2
Auto Scaling instance lifecycle in the Amazon EC2 Auto Scaling User Guide.LifecycleState
public String getLifecycleState()
A description of the current lifecycle state. The Quarantined
state is not used. For more
information, see Amazon EC2 Auto
Scaling instance lifecycle in the Amazon EC2 Auto Scaling User Guide.
Quarantined
state is not used. For more
information, see Amazon EC2
Auto Scaling instance lifecycle in the Amazon EC2 Auto Scaling User Guide.LifecycleState
public Instance withLifecycleState(String lifecycleState)
A description of the current lifecycle state. The Quarantined
state is not used. For more
information, see Amazon EC2 Auto
Scaling instance lifecycle in the Amazon EC2 Auto Scaling User Guide.
lifecycleState
- A description of the current lifecycle state. The Quarantined
state is not used. For more
information, see Amazon EC2
Auto Scaling instance lifecycle in the Amazon EC2 Auto Scaling User Guide.LifecycleState
public void setLifecycleState(LifecycleState lifecycleState)
A description of the current lifecycle state. The Quarantined
state is not used. For more
information, see Amazon EC2 Auto
Scaling instance lifecycle in the Amazon EC2 Auto Scaling User Guide.
lifecycleState
- A description of the current lifecycle state. The Quarantined
state is not used. For more
information, see Amazon EC2
Auto Scaling instance lifecycle in the Amazon EC2 Auto Scaling User Guide.LifecycleState
public Instance withLifecycleState(LifecycleState lifecycleState)
A description of the current lifecycle state. The Quarantined
state is not used. For more
information, see Amazon EC2 Auto
Scaling instance lifecycle in the Amazon EC2 Auto Scaling User Guide.
lifecycleState
- A description of the current lifecycle state. The Quarantined
state is not used. For more
information, see Amazon EC2
Auto Scaling instance lifecycle in the Amazon EC2 Auto Scaling User Guide.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 that Amazon EC2 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 that Amazon
EC2 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 that Amazon EC2 Auto
Scaling should terminate and replace it.
Healthy
means that the instance is healthy
and should remain in service. Unhealthy
means that the instance is unhealthy and that Amazon
EC2 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 that Amazon EC2 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 that Amazon
EC2 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 setLaunchTemplate(LaunchTemplateSpecification launchTemplate)
The launch template for the instance.
launchTemplate
- The launch template for the instance.public LaunchTemplateSpecification getLaunchTemplate()
The launch template for the instance.
public Instance withLaunchTemplate(LaunchTemplateSpecification launchTemplate)
The launch template for the instance.
launchTemplate
- The launch template for the instance.public void setProtectedFromScaleIn(Boolean protectedFromScaleIn)
Indicates whether the instance is protected from termination by Amazon EC2 Auto Scaling when scaling in.
protectedFromScaleIn
- Indicates whether the instance is protected from termination by Amazon EC2 Auto Scaling when scaling in.public Boolean getProtectedFromScaleIn()
Indicates whether the instance is protected from termination by Amazon EC2 Auto Scaling when scaling in.
public Instance withProtectedFromScaleIn(Boolean protectedFromScaleIn)
Indicates whether the instance is protected from termination by Amazon EC2 Auto Scaling when scaling in.
protectedFromScaleIn
- Indicates whether the instance is protected from termination by Amazon EC2 Auto Scaling when scaling in.public Boolean isProtectedFromScaleIn()
Indicates whether the instance is protected from termination by Amazon EC2 Auto Scaling when scaling in.
public void setWeightedCapacity(String weightedCapacity)
The number of capacity units contributed by the instance based on its instance type.
Valid Range: Minimum value of 1. Maximum value of 999.
weightedCapacity
- The number of capacity units contributed by the instance based on its instance type.
Valid Range: Minimum value of 1. Maximum value of 999.
public String getWeightedCapacity()
The number of capacity units contributed by the instance based on its instance type.
Valid Range: Minimum value of 1. Maximum value of 999.
Valid Range: Minimum value of 1. Maximum value of 999.
public Instance withWeightedCapacity(String weightedCapacity)
The number of capacity units contributed by the instance based on its instance type.
Valid Range: Minimum value of 1. Maximum value of 999.
weightedCapacity
- The number of capacity units contributed by the instance based on its instance type.
Valid Range: Minimum value of 1. Maximum value of 999.
public String toString()
toString
in class Object
Object.toString()