Class Instance
- java.lang.Object
-
- com.amazonaws.services.ec2.model.Instance
-
- All Implemented Interfaces:
Serializable,Cloneable
public class Instance extends Object implements Serializable, Cloneable
Describes an instance.
- 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)IntegergetAmiLaunchIndex()The AMI launch index, which can be used to find this instance in the launch group.StringgetArchitecture()The architecture of the image.List<InstanceBlockDeviceMapping>getBlockDeviceMappings()Any block device mapping entries for the instance.StringgetClientToken()The idempotency token you provided when you launched the instance, if applicable.BooleangetEbsOptimized()Indicates whether the instance is optimized for EBS I/O.StringgetHypervisor()The hypervisor type of the instance.IamInstanceProfilegetIamInstanceProfile()The IAM instance profile associated with the instance, if applicable.StringgetImageId()The ID of the AMI used to launch the instance.StringgetInstanceId()The ID of the instance.StringgetInstanceLifecycle()Indicates whether this is a Spot instance or a Scheduled Instance.StringgetInstanceType()The instance type.StringgetKernelId()The kernel associated with this instance, if applicable.StringgetKeyName()The name of the key pair, if this instance was launched with an associated key pair.DategetLaunchTime()The time the instance was launched.MonitoringgetMonitoring()The monitoring information for the instance.List<InstanceNetworkInterface>getNetworkInterfaces()[EC2-VPC] One or more network interfaces for the instance.PlacementgetPlacement()The location where the instance launched, if applicable.StringgetPlatform()The value isWindowsfor Windows instances; otherwise blank.StringgetPrivateDnsName()The private DNS name assigned to the instance.StringgetPrivateIpAddress()The private IP address assigned to the instance.List<ProductCode>getProductCodes()The product codes attached to this instance, if applicable.StringgetPublicDnsName()The public DNS name assigned to the instance.StringgetPublicIpAddress()The public IP address assigned to the instance, if applicable.StringgetRamdiskId()The RAM disk associated with this instance, if applicable.StringgetRootDeviceName()The root device name (for example,/dev/sda1or/dev/xvda).StringgetRootDeviceType()The root device type used by the AMI.List<GroupIdentifier>getSecurityGroups()One or more security groups for the instance.BooleangetSourceDestCheck()Specifies whether to enable an instance launched in a VPC to perform NAT.StringgetSpotInstanceRequestId()If the request is a Spot instance request, the ID of the request.StringgetSriovNetSupport()Specifies whether enhanced networking is enabled.InstanceStategetState()The current state of the instance.StateReasongetStateReason()The reason for the most recent state transition.StringgetStateTransitionReason()The reason for the most recent state transition.StringgetSubnetId()[EC2-VPC] The ID of the subnet in which the instance is running.List<Tag>getTags()Any tags assigned to the instance.StringgetVirtualizationType()The virtualization type of the instance.StringgetVpcId()[EC2-VPC] The ID of the VPC in which the instance is running.inthashCode()BooleanisEbsOptimized()Indicates whether the instance is optimized for EBS I/O.BooleanisSourceDestCheck()Specifies whether to enable an instance launched in a VPC to perform NAT.voidsetAmiLaunchIndex(Integer amiLaunchIndex)The AMI launch index, which can be used to find this instance in the launch group.voidsetArchitecture(ArchitectureValues architecture)The architecture of the image.voidsetArchitecture(String architecture)The architecture of the image.voidsetBlockDeviceMappings(Collection<InstanceBlockDeviceMapping> blockDeviceMappings)Any block device mapping entries for the instance.voidsetClientToken(String clientToken)The idempotency token you provided when you launched the instance, if applicable.voidsetEbsOptimized(Boolean ebsOptimized)Indicates whether the instance is optimized for EBS I/O.voidsetHypervisor(HypervisorType hypervisor)The hypervisor type of the instance.voidsetHypervisor(String hypervisor)The hypervisor type of the instance.voidsetIamInstanceProfile(IamInstanceProfile iamInstanceProfile)The IAM instance profile associated with the instance, if applicable.voidsetImageId(String imageId)The ID of the AMI used to launch the instance.voidsetInstanceId(String instanceId)The ID of the instance.voidsetInstanceLifecycle(InstanceLifecycleType instanceLifecycle)Indicates whether this is a Spot instance or a Scheduled Instance.voidsetInstanceLifecycle(String instanceLifecycle)Indicates whether this is a Spot instance or a Scheduled Instance.voidsetInstanceType(InstanceType instanceType)The instance type.voidsetInstanceType(String instanceType)The instance type.voidsetKernelId(String kernelId)The kernel associated with this instance, if applicable.voidsetKeyName(String keyName)The name of the key pair, if this instance was launched with an associated key pair.voidsetLaunchTime(Date launchTime)The time the instance was launched.voidsetMonitoring(Monitoring monitoring)The monitoring information for the instance.voidsetNetworkInterfaces(Collection<InstanceNetworkInterface> networkInterfaces)[EC2-VPC] One or more network interfaces for the instance.voidsetPlacement(Placement placement)The location where the instance launched, if applicable.voidsetPlatform(PlatformValues platform)The value isWindowsfor Windows instances; otherwise blank.voidsetPlatform(String platform)The value isWindowsfor Windows instances; otherwise blank.voidsetPrivateDnsName(String privateDnsName)The private DNS name assigned to the instance.voidsetPrivateIpAddress(String privateIpAddress)The private IP address assigned to the instance.voidsetProductCodes(Collection<ProductCode> productCodes)The product codes attached to this instance, if applicable.voidsetPublicDnsName(String publicDnsName)The public DNS name assigned to the instance.voidsetPublicIpAddress(String publicIpAddress)The public IP address assigned to the instance, if applicable.voidsetRamdiskId(String ramdiskId)The RAM disk associated with this instance, if applicable.voidsetRootDeviceName(String rootDeviceName)The root device name (for example,/dev/sda1or/dev/xvda).voidsetRootDeviceType(DeviceType rootDeviceType)The root device type used by the AMI.voidsetRootDeviceType(String rootDeviceType)The root device type used by the AMI.voidsetSecurityGroups(Collection<GroupIdentifier> securityGroups)One or more security groups for the instance.voidsetSourceDestCheck(Boolean sourceDestCheck)Specifies whether to enable an instance launched in a VPC to perform NAT.voidsetSpotInstanceRequestId(String spotInstanceRequestId)If the request is a Spot instance request, the ID of the request.voidsetSriovNetSupport(String sriovNetSupport)Specifies whether enhanced networking is enabled.voidsetState(InstanceState state)The current state of the instance.voidsetStateReason(StateReason stateReason)The reason for the most recent state transition.voidsetStateTransitionReason(String stateTransitionReason)The reason for the most recent state transition.voidsetSubnetId(String subnetId)[EC2-VPC] The ID of the subnet in which the instance is running.voidsetTags(Collection<Tag> tags)Any tags assigned to the instance.voidsetVirtualizationType(VirtualizationType virtualizationType)The virtualization type of the instance.voidsetVirtualizationType(String virtualizationType)The virtualization type of the instance.voidsetVpcId(String vpcId)[EC2-VPC] The ID of the VPC in which the instance is running.StringtoString()Returns a string representation of this object; useful for testing and debugging.InstancewithAmiLaunchIndex(Integer amiLaunchIndex)The AMI launch index, which can be used to find this instance in the launch group.InstancewithArchitecture(ArchitectureValues architecture)The architecture of the image.InstancewithArchitecture(String architecture)The architecture of the image.InstancewithBlockDeviceMappings(InstanceBlockDeviceMapping... blockDeviceMappings)Any block device mapping entries for the instance.InstancewithBlockDeviceMappings(Collection<InstanceBlockDeviceMapping> blockDeviceMappings)Any block device mapping entries for the instance.InstancewithClientToken(String clientToken)The idempotency token you provided when you launched the instance, if applicable.InstancewithEbsOptimized(Boolean ebsOptimized)Indicates whether the instance is optimized for EBS I/O.InstancewithHypervisor(HypervisorType hypervisor)The hypervisor type of the instance.InstancewithHypervisor(String hypervisor)The hypervisor type of the instance.InstancewithIamInstanceProfile(IamInstanceProfile iamInstanceProfile)The IAM instance profile associated with the instance, if applicable.InstancewithImageId(String imageId)The ID of the AMI used to launch the instance.InstancewithInstanceId(String instanceId)The ID of the instance.InstancewithInstanceLifecycle(InstanceLifecycleType instanceLifecycle)Indicates whether this is a Spot instance or a Scheduled Instance.InstancewithInstanceLifecycle(String instanceLifecycle)Indicates whether this is a Spot instance or a Scheduled Instance.InstancewithInstanceType(InstanceType instanceType)The instance type.InstancewithInstanceType(String instanceType)The instance type.InstancewithKernelId(String kernelId)The kernel associated with this instance, if applicable.InstancewithKeyName(String keyName)The name of the key pair, if this instance was launched with an associated key pair.InstancewithLaunchTime(Date launchTime)The time the instance was launched.InstancewithMonitoring(Monitoring monitoring)The monitoring information for the instance.InstancewithNetworkInterfaces(InstanceNetworkInterface... networkInterfaces)[EC2-VPC] One or more network interfaces for the instance.InstancewithNetworkInterfaces(Collection<InstanceNetworkInterface> networkInterfaces)[EC2-VPC] One or more network interfaces for the instance.InstancewithPlacement(Placement placement)The location where the instance launched, if applicable.InstancewithPlatform(PlatformValues platform)The value isWindowsfor Windows instances; otherwise blank.InstancewithPlatform(String platform)The value isWindowsfor Windows instances; otherwise blank.InstancewithPrivateDnsName(String privateDnsName)The private DNS name assigned to the instance.InstancewithPrivateIpAddress(String privateIpAddress)The private IP address assigned to the instance.InstancewithProductCodes(ProductCode... productCodes)The product codes attached to this instance, if applicable.InstancewithProductCodes(Collection<ProductCode> productCodes)The product codes attached to this instance, if applicable.InstancewithPublicDnsName(String publicDnsName)The public DNS name assigned to the instance.InstancewithPublicIpAddress(String publicIpAddress)The public IP address assigned to the instance, if applicable.InstancewithRamdiskId(String ramdiskId)The RAM disk associated with this instance, if applicable.InstancewithRootDeviceName(String rootDeviceName)The root device name (for example,/dev/sda1or/dev/xvda).InstancewithRootDeviceType(DeviceType rootDeviceType)The root device type used by the AMI.InstancewithRootDeviceType(String rootDeviceType)The root device type used by the AMI.InstancewithSecurityGroups(GroupIdentifier... securityGroups)One or more security groups for the instance.InstancewithSecurityGroups(Collection<GroupIdentifier> securityGroups)One or more security groups for the instance.InstancewithSourceDestCheck(Boolean sourceDestCheck)Specifies whether to enable an instance launched in a VPC to perform NAT.InstancewithSpotInstanceRequestId(String spotInstanceRequestId)If the request is a Spot instance request, the ID of the request.InstancewithSriovNetSupport(String sriovNetSupport)Specifies whether enhanced networking is enabled.InstancewithState(InstanceState state)The current state of the instance.InstancewithStateReason(StateReason stateReason)The reason for the most recent state transition.InstancewithStateTransitionReason(String stateTransitionReason)The reason for the most recent state transition.InstancewithSubnetId(String subnetId)[EC2-VPC] The ID of the subnet in which the instance is running.InstancewithTags(Tag... tags)Any tags assigned to the instance.InstancewithTags(Collection<Tag> tags)Any tags assigned to the instance.InstancewithVirtualizationType(VirtualizationType virtualizationType)The virtualization type of the instance.InstancewithVirtualizationType(String virtualizationType)The virtualization type of the instance.InstancewithVpcId(String vpcId)[EC2-VPC] The ID of the VPC in which the instance is running.
-
-
-
Method Detail
-
setInstanceId
public void setInstanceId(String instanceId)
The ID of the instance.
- Parameters:
instanceId- The ID of the instance.
-
getInstanceId
public String getInstanceId()
The ID of the instance.
- Returns:
- The ID of the instance.
-
withInstanceId
public Instance withInstanceId(String instanceId)
The ID of the instance.
- Parameters:
instanceId- The ID of the instance.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
setImageId
public void setImageId(String imageId)
The ID of the AMI used to launch the instance.
- Parameters:
imageId- The ID of the AMI used to launch the instance.
-
getImageId
public String getImageId()
The ID of the AMI used to launch the instance.
- Returns:
- The ID of the AMI used to launch the instance.
-
withImageId
public Instance withImageId(String imageId)
The ID of the AMI used to launch the instance.
- Parameters:
imageId- The ID of the AMI used to launch the instance.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
setState
public void setState(InstanceState state)
The current state of the instance.
- Parameters:
state- The current state of the instance.
-
getState
public InstanceState getState()
The current state of the instance.
- Returns:
- The current state of the instance.
-
withState
public Instance withState(InstanceState state)
The current state of the instance.
- Parameters:
state- The current state 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 assigned to the instance. This DNS name can only be used inside the Amazon EC2 network. This name is not available until the instance enters the
runningstate. For EC2-VPC, this name is only available if you've enabled DNS hostnames for your VPC.- Parameters:
privateDnsName- The private DNS name assigned to the instance. This DNS name can only be used inside the Amazon EC2 network. This name is not available until the instance enters therunningstate. For EC2-VPC, this name is only available if you've enabled DNS hostnames for your VPC.
-
getPrivateDnsName
public String getPrivateDnsName()
The private DNS name assigned to the instance. This DNS name can only be used inside the Amazon EC2 network. This name is not available until the instance enters the
runningstate. For EC2-VPC, this name is only available if you've enabled DNS hostnames for your VPC.- Returns:
- The private DNS name assigned to the instance. This DNS name can
only be used inside the Amazon EC2 network. This name is not
available until the instance enters the
runningstate. For EC2-VPC, this name is only available if you've enabled DNS hostnames for your VPC.
-
withPrivateDnsName
public Instance withPrivateDnsName(String privateDnsName)
The private DNS name assigned to the instance. This DNS name can only be used inside the Amazon EC2 network. This name is not available until the instance enters the
runningstate. For EC2-VPC, this name is only available if you've enabled DNS hostnames for your VPC.- Parameters:
privateDnsName- The private DNS name assigned to the instance. This DNS name can only be used inside the Amazon EC2 network. This name is not available until the instance enters therunningstate. For EC2-VPC, this name is only available if you've enabled DNS hostnames for your VPC.- 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 assigned to the instance. This name is not available until the instance enters the
runningstate. For EC2-VPC, this name is only available if you've enabled DNS hostnames for your VPC.- Parameters:
publicDnsName- The public DNS name assigned to the instance. This name is not available until the instance enters therunningstate. For EC2-VPC, this name is only available if you've enabled DNS hostnames for your VPC.
-
getPublicDnsName
public String getPublicDnsName()
The public DNS name assigned to the instance. This name is not available until the instance enters the
runningstate. For EC2-VPC, this name is only available if you've enabled DNS hostnames for your VPC.- Returns:
- The public DNS name assigned to the instance. This name is not
available until the instance enters the
runningstate. For EC2-VPC, this name is only available if you've enabled DNS hostnames for your VPC.
-
withPublicDnsName
public Instance withPublicDnsName(String publicDnsName)
The public DNS name assigned to the instance. This name is not available until the instance enters the
runningstate. For EC2-VPC, this name is only available if you've enabled DNS hostnames for your VPC.- Parameters:
publicDnsName- The public DNS name assigned to the instance. This name is not available until the instance enters therunningstate. For EC2-VPC, this name is only available if you've enabled DNS hostnames for your VPC.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
setStateTransitionReason
public void setStateTransitionReason(String stateTransitionReason)
The reason for the most recent state transition. This might be an empty string.
- Parameters:
stateTransitionReason- The reason for the most recent state transition. This might be an empty string.
-
getStateTransitionReason
public String getStateTransitionReason()
The reason for the most recent state transition. This might be an empty string.
- Returns:
- The reason for the most recent state transition. This might be an empty string.
-
withStateTransitionReason
public Instance withStateTransitionReason(String stateTransitionReason)
The reason for the most recent state transition. This might be an empty string.
- Parameters:
stateTransitionReason- The reason for the most recent state transition. This might be an empty string.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
setKeyName
public void setKeyName(String keyName)
The name of the key pair, if this instance was launched with an associated key pair.
- Parameters:
keyName- The name of the key pair, if this instance was launched with an associated key pair.
-
getKeyName
public String getKeyName()
The name of the key pair, if this instance was launched with an associated key pair.
- Returns:
- The name of the key pair, if this instance was launched with an associated key pair.
-
withKeyName
public Instance withKeyName(String keyName)
The name of the key pair, if this instance was launched with an associated key pair.
- Parameters:
keyName- The name of the key pair, if this instance was launched with an associated key pair.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
setAmiLaunchIndex
public void setAmiLaunchIndex(Integer amiLaunchIndex)
The AMI launch index, which can be used to find this instance in the launch group.
- Parameters:
amiLaunchIndex- The AMI launch index, which can be used to find this instance in the launch group.
-
getAmiLaunchIndex
public Integer getAmiLaunchIndex()
The AMI launch index, which can be used to find this instance in the launch group.
- Returns:
- The AMI launch index, which can be used to find this instance in the launch group.
-
withAmiLaunchIndex
public Instance withAmiLaunchIndex(Integer amiLaunchIndex)
The AMI launch index, which can be used to find this instance in the launch group.
- Parameters:
amiLaunchIndex- The AMI launch index, which can be used to find this instance in the launch group.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
getProductCodes
public List<ProductCode> getProductCodes()
The product codes attached to this instance, if applicable.
- Returns:
- The product codes attached to this instance, if applicable.
-
setProductCodes
public void setProductCodes(Collection<ProductCode> productCodes)
The product codes attached to this instance, if applicable.
- Parameters:
productCodes- The product codes attached to this instance, if applicable.
-
withProductCodes
public Instance withProductCodes(ProductCode... productCodes)
The product codes attached to this instance, if applicable.
NOTE: This method appends the values to the existing list (if any). Use
setProductCodes(java.util.Collection)orwithProductCodes(java.util.Collection)if you want to override the existing values.- Parameters:
productCodes- The product codes attached to this instance, if applicable.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
withProductCodes
public Instance withProductCodes(Collection<ProductCode> productCodes)
The product codes attached to this instance, if applicable.
- Parameters:
productCodes- The product codes attached to this instance, if applicable.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
setInstanceType
public void setInstanceType(String instanceType)
The instance type.
- Parameters:
instanceType- The instance type.- See Also:
InstanceType
-
getInstanceType
public String getInstanceType()
The instance type.
- Returns:
- The instance type.
- See Also:
InstanceType
-
withInstanceType
public Instance withInstanceType(String instanceType)
The instance type.
- Parameters:
instanceType- The instance type.- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
InstanceType
-
setInstanceType
public void setInstanceType(InstanceType instanceType)
The instance type.
- Parameters:
instanceType- The instance type.- See Also:
InstanceType
-
withInstanceType
public Instance withInstanceType(InstanceType instanceType)
The instance type.
- Parameters:
instanceType- The instance type.- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
InstanceType
-
setLaunchTime
public void setLaunchTime(Date launchTime)
The time the instance was launched.
- Parameters:
launchTime- The time the instance was launched.
-
getLaunchTime
public Date getLaunchTime()
The time the instance was launched.
- Returns:
- The time the instance was launched.
-
withLaunchTime
public Instance withLaunchTime(Date launchTime)
The time the instance was launched.
- Parameters:
launchTime- The time the instance was launched.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
setPlacement
public void setPlacement(Placement placement)
The location where the instance launched, if applicable.
- Parameters:
placement- The location where the instance launched, if applicable.
-
getPlacement
public Placement getPlacement()
The location where the instance launched, if applicable.
- Returns:
- The location where the instance launched, if applicable.
-
withPlacement
public Instance withPlacement(Placement placement)
The location where the instance launched, if applicable.
- Parameters:
placement- The location where the instance launched, if applicable.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
setKernelId
public void setKernelId(String kernelId)
The kernel associated with this instance, if applicable.
- Parameters:
kernelId- The kernel associated with this instance, if applicable.
-
getKernelId
public String getKernelId()
The kernel associated with this instance, if applicable.
- Returns:
- The kernel associated with this instance, if applicable.
-
withKernelId
public Instance withKernelId(String kernelId)
The kernel associated with this instance, if applicable.
- Parameters:
kernelId- The kernel associated with this instance, if applicable.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
setRamdiskId
public void setRamdiskId(String ramdiskId)
The RAM disk associated with this instance, if applicable.
- Parameters:
ramdiskId- The RAM disk associated with this instance, if applicable.
-
getRamdiskId
public String getRamdiskId()
The RAM disk associated with this instance, if applicable.
- Returns:
- The RAM disk associated with this instance, if applicable.
-
withRamdiskId
public Instance withRamdiskId(String ramdiskId)
The RAM disk associated with this instance, if applicable.
- Parameters:
ramdiskId- The RAM disk associated with this instance, if applicable.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
setPlatform
public void setPlatform(String platform)
The value is
Windowsfor Windows instances; otherwise blank.- Parameters:
platform- The value isWindowsfor Windows instances; otherwise blank.- See Also:
PlatformValues
-
getPlatform
public String getPlatform()
The value is
Windowsfor Windows instances; otherwise blank.- Returns:
- The value is
Windowsfor Windows instances; otherwise blank. - See Also:
PlatformValues
-
withPlatform
public Instance withPlatform(String platform)
The value is
Windowsfor Windows instances; otherwise blank.- Parameters:
platform- The value isWindowsfor Windows instances; otherwise blank.- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
PlatformValues
-
setPlatform
public void setPlatform(PlatformValues platform)
The value is
Windowsfor Windows instances; otherwise blank.- Parameters:
platform- The value isWindowsfor Windows instances; otherwise blank.- See Also:
PlatformValues
-
withPlatform
public Instance withPlatform(PlatformValues platform)
The value is
Windowsfor Windows instances; otherwise blank.- Parameters:
platform- The value isWindowsfor Windows instances; otherwise blank.- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
PlatformValues
-
setMonitoring
public void setMonitoring(Monitoring monitoring)
The monitoring information for the instance.
- Parameters:
monitoring- The monitoring information for the instance.
-
getMonitoring
public Monitoring getMonitoring()
The monitoring information for the instance.
- Returns:
- The monitoring information for the instance.
-
withMonitoring
public Instance withMonitoring(Monitoring monitoring)
The monitoring information for the instance.
- Parameters:
monitoring- The monitoring information for the instance.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
setSubnetId
public void setSubnetId(String subnetId)
[EC2-VPC] The ID of the subnet in which the instance is running.
- Parameters:
subnetId- [EC2-VPC] The ID of the subnet in which the instance is running.
-
getSubnetId
public String getSubnetId()
[EC2-VPC] The ID of the subnet in which the instance is running.
- Returns:
- [EC2-VPC] The ID of the subnet in which the instance is running.
-
withSubnetId
public Instance withSubnetId(String subnetId)
[EC2-VPC] The ID of the subnet in which the instance is running.
- Parameters:
subnetId- [EC2-VPC] The ID of the subnet in which the instance is running.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
setVpcId
public void setVpcId(String vpcId)
[EC2-VPC] The ID of the VPC in which the instance is running.
- Parameters:
vpcId- [EC2-VPC] The ID of the VPC in which the instance is running.
-
getVpcId
public String getVpcId()
[EC2-VPC] The ID of the VPC in which the instance is running.
- Returns:
- [EC2-VPC] The ID of the VPC in which the instance is running.
-
withVpcId
public Instance withVpcId(String vpcId)
[EC2-VPC] The ID of the VPC in which the instance is running.
- Parameters:
vpcId- [EC2-VPC] The ID of the VPC in which the instance is running.- 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 assigned to the instance.
- Parameters:
privateIpAddress- The private IP address assigned to the instance.
-
getPrivateIpAddress
public String getPrivateIpAddress()
The private IP address assigned to the instance.
- Returns:
- The private IP address assigned to the instance.
-
withPrivateIpAddress
public Instance withPrivateIpAddress(String privateIpAddress)
The private IP address assigned to the instance.
- Parameters:
privateIpAddress- The private IP address assigned to 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 assigned to the instance, if applicable.
- Parameters:
publicIpAddress- The public IP address assigned to the instance, if applicable.
-
getPublicIpAddress
public String getPublicIpAddress()
The public IP address assigned to the instance, if applicable.
- Returns:
- The public IP address assigned to the instance, if applicable.
-
withPublicIpAddress
public Instance withPublicIpAddress(String publicIpAddress)
The public IP address assigned to the instance, if applicable.
- Parameters:
publicIpAddress- The public IP address assigned to the instance, if applicable.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
setStateReason
public void setStateReason(StateReason stateReason)
The reason for the most recent state transition.
- Parameters:
stateReason- The reason for the most recent state transition.
-
getStateReason
public StateReason getStateReason()
The reason for the most recent state transition.
- Returns:
- The reason for the most recent state transition.
-
withStateReason
public Instance withStateReason(StateReason stateReason)
The reason for the most recent state transition.
- Parameters:
stateReason- The reason for the most recent state transition.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
setArchitecture
public void setArchitecture(String architecture)
The architecture of the image.
- Parameters:
architecture- The architecture of the image.- See Also:
ArchitectureValues
-
getArchitecture
public String getArchitecture()
The architecture of the image.
- Returns:
- The architecture of the image.
- See Also:
ArchitectureValues
-
withArchitecture
public Instance withArchitecture(String architecture)
The architecture of the image.
- Parameters:
architecture- The architecture of the image.- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
ArchitectureValues
-
setArchitecture
public void setArchitecture(ArchitectureValues architecture)
The architecture of the image.
- Parameters:
architecture- The architecture of the image.- See Also:
ArchitectureValues
-
withArchitecture
public Instance withArchitecture(ArchitectureValues architecture)
The architecture of the image.
- Parameters:
architecture- The architecture of the image.- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
ArchitectureValues
-
setRootDeviceType
public void setRootDeviceType(String rootDeviceType)
The root device type used by the AMI. The AMI can use an EBS volume or an instance store volume.
- Parameters:
rootDeviceType- The root device type used by the AMI. The AMI can use an EBS volume or an instance store volume.- See Also:
DeviceType
-
getRootDeviceType
public String getRootDeviceType()
The root device type used by the AMI. The AMI can use an EBS volume or an instance store volume.
- Returns:
- The root device type used by the AMI. The AMI can use an EBS volume or an instance store volume.
- See Also:
DeviceType
-
withRootDeviceType
public Instance withRootDeviceType(String rootDeviceType)
The root device type used by the AMI. The AMI can use an EBS volume or an instance store volume.
- Parameters:
rootDeviceType- The root device type used by the AMI. The AMI can use an EBS volume or an instance store volume.- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
DeviceType
-
setRootDeviceType
public void setRootDeviceType(DeviceType rootDeviceType)
The root device type used by the AMI. The AMI can use an EBS volume or an instance store volume.
- Parameters:
rootDeviceType- The root device type used by the AMI. The AMI can use an EBS volume or an instance store volume.- See Also:
DeviceType
-
withRootDeviceType
public Instance withRootDeviceType(DeviceType rootDeviceType)
The root device type used by the AMI. The AMI can use an EBS volume or an instance store volume.
- Parameters:
rootDeviceType- The root device type used by the AMI. The AMI can use an EBS volume or an instance store volume.- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
DeviceType
-
setRootDeviceName
public void setRootDeviceName(String rootDeviceName)
The root device name (for example,
/dev/sda1or/dev/xvda).- Parameters:
rootDeviceName- The root device name (for example,/dev/sda1or/dev/xvda).
-
getRootDeviceName
public String getRootDeviceName()
The root device name (for example,
/dev/sda1or/dev/xvda).- Returns:
- The root device name (for example,
/dev/sda1or/dev/xvda).
-
withRootDeviceName
public Instance withRootDeviceName(String rootDeviceName)
The root device name (for example,
/dev/sda1or/dev/xvda).- Parameters:
rootDeviceName- The root device name (for example,/dev/sda1or/dev/xvda).- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
getBlockDeviceMappings
public List<InstanceBlockDeviceMapping> getBlockDeviceMappings()
Any block device mapping entries for the instance.
- Returns:
- Any block device mapping entries for the instance.
-
setBlockDeviceMappings
public void setBlockDeviceMappings(Collection<InstanceBlockDeviceMapping> blockDeviceMappings)
Any block device mapping entries for the instance.
- Parameters:
blockDeviceMappings- Any block device mapping entries for the instance.
-
withBlockDeviceMappings
public Instance withBlockDeviceMappings(InstanceBlockDeviceMapping... blockDeviceMappings)
Any block device mapping entries for the instance.
NOTE: This method appends the values to the existing list (if any). Use
setBlockDeviceMappings(java.util.Collection)orwithBlockDeviceMappings(java.util.Collection)if you want to override the existing values.- Parameters:
blockDeviceMappings- Any block device mapping entries for the instance.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
withBlockDeviceMappings
public Instance withBlockDeviceMappings(Collection<InstanceBlockDeviceMapping> blockDeviceMappings)
Any block device mapping entries for the instance.
- Parameters:
blockDeviceMappings- Any block device mapping entries for the instance.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
setVirtualizationType
public void setVirtualizationType(String virtualizationType)
The virtualization type of the instance.
- Parameters:
virtualizationType- The virtualization type of the instance.- See Also:
VirtualizationType
-
getVirtualizationType
public String getVirtualizationType()
The virtualization type of the instance.
- Returns:
- The virtualization type of the instance.
- See Also:
VirtualizationType
-
withVirtualizationType
public Instance withVirtualizationType(String virtualizationType)
The virtualization type of the instance.
- Parameters:
virtualizationType- The virtualization type of the instance.- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
VirtualizationType
-
setVirtualizationType
public void setVirtualizationType(VirtualizationType virtualizationType)
The virtualization type of the instance.
- Parameters:
virtualizationType- The virtualization type of the instance.- See Also:
VirtualizationType
-
withVirtualizationType
public Instance withVirtualizationType(VirtualizationType virtualizationType)
The virtualization type of the instance.
- Parameters:
virtualizationType- The virtualization type of the instance.- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
VirtualizationType
-
setInstanceLifecycle
public void setInstanceLifecycle(String instanceLifecycle)
Indicates whether this is a Spot instance or a Scheduled Instance.
- Parameters:
instanceLifecycle- Indicates whether this is a Spot instance or a Scheduled Instance.- See Also:
InstanceLifecycleType
-
getInstanceLifecycle
public String getInstanceLifecycle()
Indicates whether this is a Spot instance or a Scheduled Instance.
- Returns:
- Indicates whether this is a Spot instance or a Scheduled Instance.
- See Also:
InstanceLifecycleType
-
withInstanceLifecycle
public Instance withInstanceLifecycle(String instanceLifecycle)
Indicates whether this is a Spot instance or a Scheduled Instance.
- Parameters:
instanceLifecycle- Indicates whether this is a Spot instance or a Scheduled Instance.- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
InstanceLifecycleType
-
setInstanceLifecycle
public void setInstanceLifecycle(InstanceLifecycleType instanceLifecycle)
Indicates whether this is a Spot instance or a Scheduled Instance.
- Parameters:
instanceLifecycle- Indicates whether this is a Spot instance or a Scheduled Instance.- See Also:
InstanceLifecycleType
-
withInstanceLifecycle
public Instance withInstanceLifecycle(InstanceLifecycleType instanceLifecycle)
Indicates whether this is a Spot instance or a Scheduled Instance.
- Parameters:
instanceLifecycle- Indicates whether this is a Spot instance or a Scheduled Instance.- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
InstanceLifecycleType
-
setSpotInstanceRequestId
public void setSpotInstanceRequestId(String spotInstanceRequestId)
If the request is a Spot instance request, the ID of the request.
- Parameters:
spotInstanceRequestId- If the request is a Spot instance request, the ID of the request.
-
getSpotInstanceRequestId
public String getSpotInstanceRequestId()
If the request is a Spot instance request, the ID of the request.
- Returns:
- If the request is a Spot instance request, the ID of the request.
-
withSpotInstanceRequestId
public Instance withSpotInstanceRequestId(String spotInstanceRequestId)
If the request is a Spot instance request, the ID of the request.
- Parameters:
spotInstanceRequestId- If the request is a Spot instance request, the ID of the request.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
setClientToken
public void setClientToken(String clientToken)
The idempotency token you provided when you launched the instance, if applicable.
- Parameters:
clientToken- The idempotency token you provided when you launched the instance, if applicable.
-
getClientToken
public String getClientToken()
The idempotency token you provided when you launched the instance, if applicable.
- Returns:
- The idempotency token you provided when you launched the instance, if applicable.
-
withClientToken
public Instance withClientToken(String clientToken)
The idempotency token you provided when you launched the instance, if applicable.
- Parameters:
clientToken- The idempotency token you provided when you launched the instance, if applicable.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
getTags
public List<Tag> getTags()
Any tags assigned to the instance.
- Returns:
- Any tags assigned to the instance.
-
setTags
public void setTags(Collection<Tag> tags)
Any tags assigned to the instance.
- Parameters:
tags- Any tags assigned to the instance.
-
withTags
public Instance withTags(Tag... tags)
Any tags assigned to the instance.
NOTE: This method appends the values to the existing list (if any). Use
setTags(java.util.Collection)orwithTags(java.util.Collection)if you want to override the existing values.- Parameters:
tags- Any tags assigned to the instance.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
withTags
public Instance withTags(Collection<Tag> tags)
Any tags assigned to the instance.
- Parameters:
tags- Any tags assigned to the instance.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
getSecurityGroups
public List<GroupIdentifier> getSecurityGroups()
One or more security groups for the instance.
- Returns:
- One or more security groups for the instance.
-
setSecurityGroups
public void setSecurityGroups(Collection<GroupIdentifier> securityGroups)
One or more security groups for the instance.
- Parameters:
securityGroups- One or more security groups for the instance.
-
withSecurityGroups
public Instance withSecurityGroups(GroupIdentifier... securityGroups)
One or more security groups for the instance.
NOTE: This method appends the values to the existing list (if any). Use
setSecurityGroups(java.util.Collection)orwithSecurityGroups(java.util.Collection)if you want to override the existing values.- Parameters:
securityGroups- One or more security groups for the instance.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
withSecurityGroups
public Instance withSecurityGroups(Collection<GroupIdentifier> securityGroups)
One or more security groups for the instance.
- Parameters:
securityGroups- One or more security groups for the instance.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
setSourceDestCheck
public void setSourceDestCheck(Boolean sourceDestCheck)
Specifies whether to enable an instance launched in a VPC to perform NAT. This controls whether source/destination checking is enabled on the instance. A value of
truemeans checking is enabled, andfalsemeans checking is disabled. The value must befalsefor the instance to perform NAT. For more information, see NAT Instances in the Amazon Virtual Private Cloud User Guide.- Parameters:
sourceDestCheck- Specifies whether to enable an instance launched in a VPC to perform NAT. This controls whether source/destination checking is enabled on the instance. A value oftruemeans checking is enabled, andfalsemeans checking is disabled. The value must befalsefor the instance to perform NAT. For more information, see NAT Instances in the Amazon Virtual Private Cloud User Guide.
-
getSourceDestCheck
public Boolean getSourceDestCheck()
Specifies whether to enable an instance launched in a VPC to perform NAT. This controls whether source/destination checking is enabled on the instance. A value of
truemeans checking is enabled, andfalsemeans checking is disabled. The value must befalsefor the instance to perform NAT. For more information, see NAT Instances in the Amazon Virtual Private Cloud User Guide.- Returns:
- Specifies whether to enable an instance launched in a VPC to
perform NAT. This controls whether source/destination checking is
enabled on the instance. A value of
truemeans checking is enabled, andfalsemeans checking is disabled. The value must befalsefor the instance to perform NAT. For more information, see NAT Instances in the Amazon Virtual Private Cloud User Guide.
-
withSourceDestCheck
public Instance withSourceDestCheck(Boolean sourceDestCheck)
Specifies whether to enable an instance launched in a VPC to perform NAT. This controls whether source/destination checking is enabled on the instance. A value of
truemeans checking is enabled, andfalsemeans checking is disabled. The value must befalsefor the instance to perform NAT. For more information, see NAT Instances in the Amazon Virtual Private Cloud User Guide.- Parameters:
sourceDestCheck- Specifies whether to enable an instance launched in a VPC to perform NAT. This controls whether source/destination checking is enabled on the instance. A value oftruemeans checking is enabled, andfalsemeans checking is disabled. The value must befalsefor the instance to perform NAT. For more information, see NAT Instances in the Amazon Virtual Private Cloud User Guide.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
isSourceDestCheck
public Boolean isSourceDestCheck()
Specifies whether to enable an instance launched in a VPC to perform NAT. This controls whether source/destination checking is enabled on the instance. A value of
truemeans checking is enabled, andfalsemeans checking is disabled. The value must befalsefor the instance to perform NAT. For more information, see NAT Instances in the Amazon Virtual Private Cloud User Guide.- Returns:
- Specifies whether to enable an instance launched in a VPC to
perform NAT. This controls whether source/destination checking is
enabled on the instance. A value of
truemeans checking is enabled, andfalsemeans checking is disabled. The value must befalsefor the instance to perform NAT. For more information, see NAT Instances in the Amazon Virtual Private Cloud User Guide.
-
setHypervisor
public void setHypervisor(String hypervisor)
The hypervisor type of the instance.
- Parameters:
hypervisor- The hypervisor type of the instance.- See Also:
HypervisorType
-
getHypervisor
public String getHypervisor()
The hypervisor type of the instance.
- Returns:
- The hypervisor type of the instance.
- See Also:
HypervisorType
-
withHypervisor
public Instance withHypervisor(String hypervisor)
The hypervisor type of the instance.
- Parameters:
hypervisor- The hypervisor type of the instance.- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
HypervisorType
-
setHypervisor
public void setHypervisor(HypervisorType hypervisor)
The hypervisor type of the instance.
- Parameters:
hypervisor- The hypervisor type of the instance.- See Also:
HypervisorType
-
withHypervisor
public Instance withHypervisor(HypervisorType hypervisor)
The hypervisor type of the instance.
- Parameters:
hypervisor- The hypervisor type of the instance.- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
HypervisorType
-
getNetworkInterfaces
public List<InstanceNetworkInterface> getNetworkInterfaces()
[EC2-VPC] One or more network interfaces for the instance.
- Returns:
- [EC2-VPC] One or more network interfaces for the instance.
-
setNetworkInterfaces
public void setNetworkInterfaces(Collection<InstanceNetworkInterface> networkInterfaces)
[EC2-VPC] One or more network interfaces for the instance.
- Parameters:
networkInterfaces- [EC2-VPC] One or more network interfaces for the instance.
-
withNetworkInterfaces
public Instance withNetworkInterfaces(InstanceNetworkInterface... networkInterfaces)
[EC2-VPC] One or more network interfaces for the instance.
NOTE: This method appends the values to the existing list (if any). Use
setNetworkInterfaces(java.util.Collection)orwithNetworkInterfaces(java.util.Collection)if you want to override the existing values.- Parameters:
networkInterfaces- [EC2-VPC] One or more network interfaces for the instance.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
withNetworkInterfaces
public Instance withNetworkInterfaces(Collection<InstanceNetworkInterface> networkInterfaces)
[EC2-VPC] One or more network interfaces for the instance.
- Parameters:
networkInterfaces- [EC2-VPC] One or more network interfaces for the instance.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
setIamInstanceProfile
public void setIamInstanceProfile(IamInstanceProfile iamInstanceProfile)
The IAM instance profile associated with the instance, if applicable.
- Parameters:
iamInstanceProfile- The IAM instance profile associated with the instance, if applicable.
-
getIamInstanceProfile
public IamInstanceProfile getIamInstanceProfile()
The IAM instance profile associated with the instance, if applicable.
- Returns:
- The IAM instance profile associated with the instance, if applicable.
-
withIamInstanceProfile
public Instance withIamInstanceProfile(IamInstanceProfile iamInstanceProfile)
The IAM instance profile associated with the instance, if applicable.
- Parameters:
iamInstanceProfile- The IAM instance profile associated with the instance, if applicable.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
setEbsOptimized
public void setEbsOptimized(Boolean ebsOptimized)
Indicates whether the instance is optimized for EBS I/O. This optimization provides dedicated throughput to Amazon EBS and an optimized configuration stack to provide optimal I/O performance. This optimization isn't available with all instance types. Additional usage charges apply when using an EBS Optimized instance.
- Parameters:
ebsOptimized- Indicates whether the instance is optimized for EBS I/O. This optimization provides dedicated throughput to Amazon EBS and an optimized configuration stack to provide optimal I/O performance. This optimization isn't available with all instance types. Additional usage charges apply when using an EBS Optimized instance.
-
getEbsOptimized
public Boolean getEbsOptimized()
Indicates whether the instance is optimized for EBS I/O. This optimization provides dedicated throughput to Amazon EBS and an optimized configuration stack to provide optimal I/O performance. This optimization isn't available with all instance types. Additional usage charges apply when using an EBS Optimized instance.
- Returns:
- Indicates whether the instance is optimized for EBS I/O. This optimization provides dedicated throughput to Amazon EBS and an optimized configuration stack to provide optimal I/O performance. This optimization isn't available with all instance types. Additional usage charges apply when using an EBS Optimized instance.
-
withEbsOptimized
public Instance withEbsOptimized(Boolean ebsOptimized)
Indicates whether the instance is optimized for EBS I/O. This optimization provides dedicated throughput to Amazon EBS and an optimized configuration stack to provide optimal I/O performance. This optimization isn't available with all instance types. Additional usage charges apply when using an EBS Optimized instance.
- Parameters:
ebsOptimized- Indicates whether the instance is optimized for EBS I/O. This optimization provides dedicated throughput to Amazon EBS and an optimized configuration stack to provide optimal I/O performance. This optimization isn't available with all instance types. Additional usage charges apply when using an EBS Optimized instance.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
isEbsOptimized
public Boolean isEbsOptimized()
Indicates whether the instance is optimized for EBS I/O. This optimization provides dedicated throughput to Amazon EBS and an optimized configuration stack to provide optimal I/O performance. This optimization isn't available with all instance types. Additional usage charges apply when using an EBS Optimized instance.
- Returns:
- Indicates whether the instance is optimized for EBS I/O. This optimization provides dedicated throughput to Amazon EBS and an optimized configuration stack to provide optimal I/O performance. This optimization isn't available with all instance types. Additional usage charges apply when using an EBS Optimized instance.
-
setSriovNetSupport
public void setSriovNetSupport(String sriovNetSupport)
Specifies whether enhanced networking is enabled.
- Parameters:
sriovNetSupport- Specifies whether enhanced networking is enabled.
-
getSriovNetSupport
public String getSriovNetSupport()
Specifies whether enhanced networking is enabled.
- Returns:
- Specifies whether enhanced networking is enabled.
-
withSriovNetSupport
public Instance withSriovNetSupport(String sriovNetSupport)
Specifies whether enhanced networking is enabled.
- Parameters:
sriovNetSupport- Specifies whether enhanced networking is enabled.- 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()
-
-