public class Instance
extends java.lang.Object
implements java.io.Serializable
Describes an EC2 instance.
Constructor and Description |
---|
Instance() |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(java.lang.Object obj) |
java.lang.String |
getAvailabilityZone()
The Availability Zone in which the instance is running.
|
java.lang.String |
getHealthStatus()
The last reported 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.
|
LaunchTemplateSpecification |
getLaunchTemplate()
The launch template for 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 Amazon
EC2 Auto Scaling when scaling in.
|
int |
hashCode() |
java.lang.Boolean |
isProtectedFromScaleIn()
Indicates whether the instance is protected from termination by Amazon
EC2 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 last reported 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 |
setLaunchTemplate(LaunchTemplateSpecification launchTemplate)
The launch template for 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 Amazon
EC2 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 last reported 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 |
withLaunchTemplate(LaunchTemplateSpecification launchTemplate)
The launch template for 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 Amazon
EC2 Auto Scaling when scaling in.
|
public java.lang.String getInstanceId()
The ID of the instance.
Constraints:
Length: 1 - 19
Pattern: [ --�𐀀-\r\n\t]*
The ID of the instance.
public void setInstanceId(java.lang.String instanceId)
The ID of the instance.
Constraints:
Length: 1 - 19
Pattern: [ --�𐀀-\r\n\t]*
instanceId
- The ID of the instance.
public Instance withInstanceId(java.lang.String instanceId)
The ID of the instance.
Returns a reference to this object so that method calls can be chained together.
Constraints:
Length: 1 - 19
Pattern: [ --�𐀀-\r\n\t]*
instanceId
- The ID of the instance.
public java.lang.String getAvailabilityZone()
The Availability Zone in which the instance is running.
Constraints:
Length: 1 - 255
Pattern: [ --�𐀀-\r\n\t]*
The Availability Zone in which the instance is running.
public void setAvailabilityZone(java.lang.String availabilityZone)
The Availability Zone in which the instance is running.
Constraints:
Length: 1 - 255
Pattern: [ --�𐀀-\r\n\t]*
availabilityZone
- 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.
Returns a reference to this object so that method calls can be chained together.
Constraints:
Length: 1 - 255
Pattern: [ --�𐀀-\r\n\t]*
availabilityZone
- The Availability Zone in which the instance is running.
public java.lang.String getLifecycleState()
A description of the current lifecycle state. The
Quarantined
state is not used.
Constraints:
Allowed Values: Pending, Pending:Wait, Pending:Proceed,
Quarantined, InService, Terminating, Terminating:Wait,
Terminating:Proceed, Terminated, Detaching, Detached, EnteringStandby,
Standby
A description of the current lifecycle state. The
Quarantined
state is not used.
LifecycleState
public void setLifecycleState(java.lang.String lifecycleState)
A description of the current lifecycle state. The
Quarantined
state is not used.
Constraints:
Allowed Values: Pending, Pending:Wait, Pending:Proceed,
Quarantined, InService, Terminating, Terminating:Wait,
Terminating:Proceed, Terminated, Detaching, Detached, EnteringStandby,
Standby
lifecycleState
-
A description of the current lifecycle state. The
Quarantined
state is not used.
LifecycleState
public Instance withLifecycleState(java.lang.String lifecycleState)
A description of the current lifecycle state. The
Quarantined
state is not used.
Returns a reference to this object so that method calls can be chained together.
Constraints:
Allowed Values: Pending, Pending:Wait, Pending:Proceed,
Quarantined, InService, Terminating, Terminating:Wait,
Terminating:Proceed, Terminated, Detaching, Detached, EnteringStandby,
Standby
lifecycleState
-
A description of the current lifecycle state. The
Quarantined
state is not used.
LifecycleState
public void setLifecycleState(LifecycleState lifecycleState)
A description of the current lifecycle state. The
Quarantined
state is not used.
Constraints:
Allowed Values: Pending, Pending:Wait, Pending:Proceed,
Quarantined, InService, Terminating, Terminating:Wait,
Terminating:Proceed, Terminated, Detaching, Detached, EnteringStandby,
Standby
lifecycleState
-
A description of the current lifecycle state. The
Quarantined
state is not used.
LifecycleState
public Instance withLifecycleState(LifecycleState lifecycleState)
A description of the current lifecycle state. The
Quarantined
state is not used.
Returns a reference to this object so that method calls can be chained together.
Constraints:
Allowed Values: Pending, Pending:Wait, Pending:Proceed,
Quarantined, InService, Terminating, Terminating:Wait,
Terminating:Proceed, Terminated, Detaching, Detached, EnteringStandby,
Standby
lifecycleState
-
A description of the current lifecycle state. The
Quarantined
state is not used.
LifecycleState
public java.lang.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.
Constraints:
Length: 1 - 32
Pattern: [ --�𐀀-\r\n\t]*
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 setHealthStatus(java.lang.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.
Constraints:
Length: 1 - 32
Pattern: [ --�𐀀-\r\n\t]*
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 Instance withHealthStatus(java.lang.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.
Returns a reference to this object so that method calls can be chained together.
Constraints:
Length: 1 - 32
Pattern: [ --�𐀀-\r\n\t]*
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 java.lang.String getLaunchConfigurationName()
The launch configuration associated with the instance.
Constraints:
Length: 1 - 255
Pattern: [ --�𐀀-\r\n\t]*
The launch configuration associated with the instance.
public void setLaunchConfigurationName(java.lang.String launchConfigurationName)
The launch configuration associated with the instance.
Constraints:
Length: 1 - 255
Pattern: [ --�𐀀-\r\n\t]*
launchConfigurationName
- The launch configuration associated with the instance.
public Instance withLaunchConfigurationName(java.lang.String launchConfigurationName)
The launch configuration associated with the instance.
Returns a reference to this object so that method calls can be chained together.
Constraints:
Length: 1 - 255
Pattern: [ --�𐀀-\r\n\t]*
launchConfigurationName
- The launch configuration associated with the instance.
public LaunchTemplateSpecification getLaunchTemplate()
The launch template for the instance.
The launch template for the instance.
public void setLaunchTemplate(LaunchTemplateSpecification launchTemplate)
The launch template for the instance.
launchTemplate
- The launch template for the instance.
public Instance withLaunchTemplate(LaunchTemplateSpecification launchTemplate)
The launch template for the instance.
Returns a reference to this object so that method calls can be chained together.
launchTemplate
- The launch template for the instance.
public java.lang.Boolean isProtectedFromScaleIn()
Indicates whether the instance is protected from termination by Amazon EC2 Auto Scaling when scaling in.
Indicates whether the instance is protected from termination by Amazon EC2 Auto Scaling when scaling in.
public java.lang.Boolean getProtectedFromScaleIn()
Indicates whether the instance is protected from termination by Amazon EC2 Auto Scaling when scaling in.
Indicates whether the instance is protected from termination by Amazon EC2 Auto Scaling when scaling in.
public void setProtectedFromScaleIn(java.lang.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 Instance withProtectedFromScaleIn(java.lang.Boolean protectedFromScaleIn)
Indicates whether the instance is protected from termination by Amazon EC2 Auto Scaling when scaling in.
Returns a reference to this object so that method calls can be chained together.
protectedFromScaleIn
- Indicates whether the instance is protected from termination by Amazon EC2 Auto Scaling when scaling in.
public java.lang.String toString()
toString
in class java.lang.Object
Object.toString()
public int hashCode()
hashCode
in class java.lang.Object
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
Copyright © 2018 Amazon Web Services, Inc. All Rights Reserved.