Class Instance
- java.lang.Object
-
- com.amazonaws.services.elasticmapreduce.model.Instance
-
- All Implemented Interfaces:
Serializable
,Cloneable
public class Instance extends Object implements Serializable, Cloneable
Represents an EC2 instance provisioned as part of cluster.
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description Instance()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Instance
clone()
boolean
equals(Object obj)
List<EbsVolume>
getEbsVolumes()
The list of EBS volumes that are attached to this instance.String
getEc2InstanceId()
The unique identifier of the instance in Amazon EC2.String
getId()
The unique identifier for the instance in Amazon EMR.String
getInstanceGroupId()
The identifier of the instance group to which this instance belongs.String
getPrivateDnsName()
The private DNS name of the instance.String
getPrivateIpAddress()
The private IP address of the instance.String
getPublicDnsName()
The public DNS name of the instance.String
getPublicIpAddress()
The public IP address of the instance.InstanceStatus
getStatus()
The current status of the instance.int
hashCode()
void
setEbsVolumes(Collection<EbsVolume> ebsVolumes)
The list of EBS volumes that are attached to this instance.void
setEc2InstanceId(String ec2InstanceId)
The unique identifier of the instance in Amazon EC2.void
setId(String id)
The unique identifier for the instance in Amazon EMR.void
setInstanceGroupId(String instanceGroupId)
The identifier of the instance group to which this instance belongs.void
setPrivateDnsName(String privateDnsName)
The private DNS name of the instance.void
setPrivateIpAddress(String privateIpAddress)
The private IP address of the instance.void
setPublicDnsName(String publicDnsName)
The public DNS name of the instance.void
setPublicIpAddress(String publicIpAddress)
The public IP address of the instance.void
setStatus(InstanceStatus status)
The current status of the instance.String
toString()
Returns a string representation of this object; useful for testing and debugging.Instance
withEbsVolumes(EbsVolume... ebsVolumes)
The list of EBS volumes that are attached to this instance.Instance
withEbsVolumes(Collection<EbsVolume> ebsVolumes)
The list of EBS volumes that are attached to this instance.Instance
withEc2InstanceId(String ec2InstanceId)
The unique identifier of the instance in Amazon EC2.Instance
withId(String id)
The unique identifier for the instance in Amazon EMR.Instance
withInstanceGroupId(String instanceGroupId)
The identifier of the instance group to which this instance belongs.Instance
withPrivateDnsName(String privateDnsName)
The private DNS name of the instance.Instance
withPrivateIpAddress(String privateIpAddress)
The private IP address of the instance.Instance
withPublicDnsName(String publicDnsName)
The public DNS name of the instance.Instance
withPublicIpAddress(String publicIpAddress)
The public IP address of the instance.Instance
withStatus(InstanceStatus status)
The current status of the instance.
-
-
-
Method Detail
-
setId
public void setId(String id)
The unique identifier for the instance in Amazon EMR.
- Parameters:
id
- The unique identifier for the instance in Amazon EMR.
-
getId
public String getId()
The unique identifier for the instance in Amazon EMR.
- Returns:
- The unique identifier for the instance in Amazon EMR.
-
withId
public Instance withId(String id)
The unique identifier for the instance in Amazon EMR.
- Parameters:
id
- The unique identifier for the instance in Amazon EMR.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
setEc2InstanceId
public void setEc2InstanceId(String ec2InstanceId)
The unique identifier of the instance in Amazon EC2.
- Parameters:
ec2InstanceId
- The unique identifier of the instance in Amazon EC2.
-
getEc2InstanceId
public String getEc2InstanceId()
The unique identifier of the instance in Amazon EC2.
- Returns:
- The unique identifier of the instance in Amazon EC2.
-
withEc2InstanceId
public Instance withEc2InstanceId(String ec2InstanceId)
The unique identifier of the instance in Amazon EC2.
- Parameters:
ec2InstanceId
- The unique identifier of the instance in Amazon EC2.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
setPublicDnsName
public void setPublicDnsName(String publicDnsName)
The public DNS name of the instance.
- Parameters:
publicDnsName
- The public DNS name of the instance.
-
getPublicDnsName
public String getPublicDnsName()
The public DNS name of the instance.
- Returns:
- The public DNS name of the instance.
-
withPublicDnsName
public Instance withPublicDnsName(String publicDnsName)
The public DNS name of the instance.
- Parameters:
publicDnsName
- The public DNS name of the instance.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
setPublicIpAddress
public void setPublicIpAddress(String publicIpAddress)
The public IP address of the instance.
- Parameters:
publicIpAddress
- The public IP address of the instance.
-
getPublicIpAddress
public String getPublicIpAddress()
The public IP address of the instance.
- Returns:
- The public IP address of the instance.
-
withPublicIpAddress
public Instance withPublicIpAddress(String publicIpAddress)
The public IP address of the instance.
- Parameters:
publicIpAddress
- The public IP address of the instance.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
setPrivateDnsName
public void setPrivateDnsName(String privateDnsName)
The private DNS name of the instance.
- Parameters:
privateDnsName
- The private DNS name of the instance.
-
getPrivateDnsName
public String getPrivateDnsName()
The private DNS name of the instance.
- Returns:
- The private DNS name of the instance.
-
withPrivateDnsName
public Instance withPrivateDnsName(String privateDnsName)
The private DNS name of the instance.
- Parameters:
privateDnsName
- The private DNS name of the instance.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
setPrivateIpAddress
public void setPrivateIpAddress(String privateIpAddress)
The private IP address of the instance.
- Parameters:
privateIpAddress
- The private IP address of the instance.
-
getPrivateIpAddress
public String getPrivateIpAddress()
The private IP address of the instance.
- Returns:
- The private IP address of the instance.
-
withPrivateIpAddress
public Instance withPrivateIpAddress(String privateIpAddress)
The private IP address of the instance.
- Parameters:
privateIpAddress
- The private IP address of the instance.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
setStatus
public void setStatus(InstanceStatus status)
The current status of the instance.
- Parameters:
status
- The current status of the instance.
-
getStatus
public InstanceStatus getStatus()
The current status of the instance.
- Returns:
- The current status of the instance.
-
withStatus
public Instance withStatus(InstanceStatus status)
The current status of the instance.
- Parameters:
status
- The current status of the instance.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
setInstanceGroupId
public void setInstanceGroupId(String instanceGroupId)
The identifier of the instance group to which this instance belongs.
- Parameters:
instanceGroupId
- The identifier of the instance group to which this instance belongs.
-
getInstanceGroupId
public String getInstanceGroupId()
The identifier of the instance group to which this instance belongs.
- Returns:
- The identifier of the instance group to which this instance belongs.
-
withInstanceGroupId
public Instance withInstanceGroupId(String instanceGroupId)
The identifier of the instance group to which this instance belongs.
- Parameters:
instanceGroupId
- The identifier of the instance group to which this instance belongs.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
getEbsVolumes
public List<EbsVolume> getEbsVolumes()
The list of EBS volumes that are attached to this instance.
- Returns:
- The list of EBS volumes that are attached to this instance.
-
setEbsVolumes
public void setEbsVolumes(Collection<EbsVolume> ebsVolumes)
The list of EBS volumes that are attached to this instance.
- Parameters:
ebsVolumes
- The list of EBS volumes that are attached to this instance.
-
withEbsVolumes
public Instance withEbsVolumes(EbsVolume... ebsVolumes)
The list of EBS volumes that are attached to this instance.
NOTE: This method appends the values to the existing list (if any). Use
setEbsVolumes(java.util.Collection)
orwithEbsVolumes(java.util.Collection)
if you want to override the existing values.- Parameters:
ebsVolumes
- The list of EBS volumes that are attached to this instance.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
withEbsVolumes
public Instance withEbsVolumes(Collection<EbsVolume> ebsVolumes)
The list of EBS volumes that are attached to this instance.
- Parameters:
ebsVolumes
- The list of EBS volumes that are attached to this instance.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
toString
public String toString()
Returns a string representation of this object; useful for testing and debugging.- Overrides:
toString
in classObject
- Returns:
- A string representation of this object.
- See Also:
Object.toString()
-
-