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 Instanceclone()booleanequals(Object obj)List<EbsVolume>getEbsVolumes()The list of EBS volumes that are attached to this instance.StringgetEc2InstanceId()The unique identifier of the instance in Amazon EC2.StringgetId()The unique identifier for the instance in Amazon EMR.StringgetInstanceGroupId()The identifier of the instance group to which this instance belongs.StringgetPrivateDnsName()The private DNS name of the instance.StringgetPrivateIpAddress()The private IP address of the instance.StringgetPublicDnsName()The public DNS name of the instance.StringgetPublicIpAddress()The public IP address of the instance.InstanceStatusgetStatus()The current status of the instance.inthashCode()voidsetEbsVolumes(Collection<EbsVolume> ebsVolumes)The list of EBS volumes that are attached to this instance.voidsetEc2InstanceId(String ec2InstanceId)The unique identifier of the instance in Amazon EC2.voidsetId(String id)The unique identifier for the instance in Amazon EMR.voidsetInstanceGroupId(String instanceGroupId)The identifier of the instance group to which this instance belongs.voidsetPrivateDnsName(String privateDnsName)The private DNS name of the instance.voidsetPrivateIpAddress(String privateIpAddress)The private IP address of the instance.voidsetPublicDnsName(String publicDnsName)The public DNS name of the instance.voidsetPublicIpAddress(String publicIpAddress)The public IP address of the instance.voidsetStatus(InstanceStatus status)The current status of the instance.StringtoString()Returns a string representation of this object; useful for testing and debugging.InstancewithEbsVolumes(EbsVolume... ebsVolumes)The list of EBS volumes that are attached to this instance.InstancewithEbsVolumes(Collection<EbsVolume> ebsVolumes)The list of EBS volumes that are attached to this instance.InstancewithEc2InstanceId(String ec2InstanceId)The unique identifier of the instance in Amazon EC2.InstancewithId(String id)The unique identifier for the instance in Amazon EMR.InstancewithInstanceGroupId(String instanceGroupId)The identifier of the instance group to which this instance belongs.InstancewithPrivateDnsName(String privateDnsName)The private DNS name of the instance.InstancewithPrivateIpAddress(String privateIpAddress)The private IP address of the instance.InstancewithPublicDnsName(String publicDnsName)The public DNS name of the instance.InstancewithPublicIpAddress(String publicIpAddress)The public IP address of the instance.InstancewithStatus(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:
toStringin classObject- Returns:
- A string representation of this object.
- See Also:
Object.toString()
-
-