Class LaunchSpecification
- All Implemented Interfaces:
Serializable
,Cloneable
Describes the launch specification for an instance.
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionclone()
boolean
Deprecated.One or more security groups.One or more block device mapping entries.Indicates whether the instance is optimized for EBS I/O.The IAM instance profile.The ID of the AMI.The instance type.The ID of the kernel.The name of the key pair.One or more network interfaces.The placement information for the instance.The ID of the RAM disk.One or more security group names.The ID of the subnet in which to launch the instance.The Base64-encoded MIME user data to make available to the instances.int
hashCode()
Indicates whether the instance is optimized for EBS I/O.void
setAddressingType
(String addressingType) Deprecated.void
setAllSecurityGroups
(Collection<GroupIdentifier> allSecurityGroups) One or more security groups.void
setBlockDeviceMappings
(Collection<BlockDeviceMapping> blockDeviceMappings) One or more block device mapping entries.void
setEbsOptimized
(Boolean ebsOptimized) Indicates whether the instance is optimized for EBS I/O.void
setIamInstanceProfile
(IamInstanceProfileSpecification iamInstanceProfile) The IAM instance profile.void
setImageId
(String imageId) The ID of the AMI.void
setInstanceType
(InstanceType instanceType) The instance type.void
setInstanceType
(String instanceType) The instance type.void
setKernelId
(String kernelId) The ID of the kernel.void
setKeyName
(String keyName) The name of the key pair.void
setMonitoringEnabled
(Boolean monitoringEnabled) void
setNetworkInterfaces
(Collection<InstanceNetworkInterfaceSpecification> networkInterfaces) One or more network interfaces.void
setPlacement
(SpotPlacement placement) The placement information for the instance.void
setRamdiskId
(String ramdiskId) The ID of the RAM disk.void
setSecurityGroups
(Collection<String> securityGroups) One or more security group names.void
setSubnetId
(String subnetId) The ID of the subnet in which to launch the instance.void
setUserData
(String userData) The Base64-encoded MIME user data to make available to the instances.toString()
Returns a string representation of this object; useful for testing and debugging.withAddressingType
(String addressingType) Deprecated.withAllSecurityGroups
(GroupIdentifier... allSecurityGroups) One or more security groups.withAllSecurityGroups
(Collection<GroupIdentifier> allSecurityGroups) One or more security groups.withBlockDeviceMappings
(BlockDeviceMapping... blockDeviceMappings) One or more block device mapping entries.withBlockDeviceMappings
(Collection<BlockDeviceMapping> blockDeviceMappings) One or more block device mapping entries.withEbsOptimized
(Boolean ebsOptimized) Indicates whether the instance is optimized for EBS I/O.withIamInstanceProfile
(IamInstanceProfileSpecification iamInstanceProfile) The IAM instance profile.withImageId
(String imageId) The ID of the AMI.withInstanceType
(InstanceType instanceType) The instance type.withInstanceType
(String instanceType) The instance type.withKernelId
(String kernelId) The ID of the kernel.withKeyName
(String keyName) The name of the key pair.withMonitoringEnabled
(Boolean monitoringEnabled) withNetworkInterfaces
(InstanceNetworkInterfaceSpecification... networkInterfaces) One or more network interfaces.withNetworkInterfaces
(Collection<InstanceNetworkInterfaceSpecification> networkInterfaces) One or more network interfaces.withPlacement
(SpotPlacement placement) The placement information for the instance.withRamdiskId
(String ramdiskId) The ID of the RAM disk.withSecurityGroups
(String... securityGroups) One or more security group names.withSecurityGroups
(Collection<String> securityGroups) One or more security group names.withSubnetId
(String subnetId) The ID of the subnet in which to launch the instance.withUserData
(String userData) The Base64-encoded MIME user data to make available to the instances.
-
Constructor Details
-
LaunchSpecification
public LaunchSpecification()
-
-
Method Details
-
setImageId
The ID of the AMI.
- Parameters:
imageId
- The ID of the AMI.
-
getImageId
The ID of the AMI.
- Returns:
- The ID of the AMI.
-
withImageId
The ID of the AMI.
- Parameters:
imageId
- The ID of the AMI.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
setKeyName
The name of the key pair.
- Parameters:
keyName
- The name of the key pair.
-
getKeyName
The name of the key pair.
- Returns:
- The name of the key pair.
-
withKeyName
The name of the key pair.
- Parameters:
keyName
- The name of the key pair.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
setUserData
The Base64-encoded MIME user data to make available to the instances.
- Parameters:
userData
- The Base64-encoded MIME user data to make available to the instances.
-
getUserData
The Base64-encoded MIME user data to make available to the instances.
- Returns:
- The Base64-encoded MIME user data to make available to the instances.
-
withUserData
The Base64-encoded MIME user data to make available to the instances.
- Parameters:
userData
- The Base64-encoded MIME user data to make available to the instances.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
setAddressingType
Deprecated.
- Parameters:
addressingType
- Deprecated.
-
getAddressingType
Deprecated.
- Returns:
- Deprecated.
-
withAddressingType
Deprecated.
- Parameters:
addressingType
- Deprecated.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
setInstanceType
The instance type.
- Parameters:
instanceType
- The instance type.- See Also:
-
getInstanceType
The instance type.
- Returns:
- The instance type.
- See Also:
-
withInstanceType
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:
-
setInstanceType
The instance type.
- Parameters:
instanceType
- The instance type.- See Also:
-
withInstanceType
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:
-
setPlacement
The placement information for the instance.
- Parameters:
placement
- The placement information for the instance.
-
getPlacement
The placement information for the instance.
- Returns:
- The placement information for the instance.
-
withPlacement
The placement information for the instance.
- Parameters:
placement
- The placement information for the instance.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
setKernelId
The ID of the kernel.
- Parameters:
kernelId
- The ID of the kernel.
-
getKernelId
The ID of the kernel.
- Returns:
- The ID of the kernel.
-
withKernelId
The ID of the kernel.
- Parameters:
kernelId
- The ID of the kernel.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
setRamdiskId
The ID of the RAM disk.
- Parameters:
ramdiskId
- The ID of the RAM disk.
-
getRamdiskId
The ID of the RAM disk.
- Returns:
- The ID of the RAM disk.
-
withRamdiskId
The ID of the RAM disk.
- Parameters:
ramdiskId
- The ID of the RAM disk.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
getBlockDeviceMappings
One or more block device mapping entries.
Although you can specify encrypted EBS volumes in this block device mapping for your Spot Instances, these volumes are not encrypted.
- Returns:
- One or more block device mapping entries.
Although you can specify encrypted EBS volumes in this block device mapping for your Spot Instances, these volumes are not encrypted.
-
setBlockDeviceMappings
One or more block device mapping entries.
Although you can specify encrypted EBS volumes in this block device mapping for your Spot Instances, these volumes are not encrypted.
- Parameters:
blockDeviceMappings
- One or more block device mapping entries.Although you can specify encrypted EBS volumes in this block device mapping for your Spot Instances, these volumes are not encrypted.
-
withBlockDeviceMappings
One or more block device mapping entries.
Although you can specify encrypted EBS volumes in this block device mapping for your Spot Instances, these volumes are not encrypted.
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
- One or more block device mapping entries.Although you can specify encrypted EBS volumes in this block device mapping for your Spot Instances, these volumes are not encrypted.
- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
withBlockDeviceMappings
public LaunchSpecification withBlockDeviceMappings(Collection<BlockDeviceMapping> blockDeviceMappings) One or more block device mapping entries.
Although you can specify encrypted EBS volumes in this block device mapping for your Spot Instances, these volumes are not encrypted.
- Parameters:
blockDeviceMappings
- One or more block device mapping entries.Although you can specify encrypted EBS volumes in this block device mapping for your Spot Instances, these volumes are not encrypted.
- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
setSubnetId
The ID of the subnet in which to launch the instance.
- Parameters:
subnetId
- The ID of the subnet in which to launch the instance.
-
getSubnetId
The ID of the subnet in which to launch the instance.
- Returns:
- The ID of the subnet in which to launch the instance.
-
withSubnetId
The ID of the subnet in which to launch the instance.
- Parameters:
subnetId
- The ID of the subnet in which to launch the instance.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
getNetworkInterfaces
One or more network interfaces.
- Returns:
- One or more network interfaces.
-
setNetworkInterfaces
public void setNetworkInterfaces(Collection<InstanceNetworkInterfaceSpecification> networkInterfaces) One or more network interfaces.
- Parameters:
networkInterfaces
- One or more network interfaces.
-
withNetworkInterfaces
public LaunchSpecification withNetworkInterfaces(InstanceNetworkInterfaceSpecification... networkInterfaces) One or more network interfaces.
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
- One or more network interfaces.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
withNetworkInterfaces
public LaunchSpecification withNetworkInterfaces(Collection<InstanceNetworkInterfaceSpecification> networkInterfaces) One or more network interfaces.
- Parameters:
networkInterfaces
- One or more network interfaces.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
setIamInstanceProfile
The IAM instance profile.
- Parameters:
iamInstanceProfile
- The IAM instance profile.
-
getIamInstanceProfile
The IAM instance profile.
- Returns:
- The IAM instance profile.
-
withIamInstanceProfile
public LaunchSpecification withIamInstanceProfile(IamInstanceProfileSpecification iamInstanceProfile) The IAM instance profile.
- Parameters:
iamInstanceProfile
- The IAM instance profile.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
setEbsOptimized
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 EBS I/O performance. This optimization isn't available with all instance types. Additional usage charges apply when using an EBS Optimized instance.
Default:
false
- 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 EBS I/O performance. This optimization isn't available with all instance types. Additional usage charges apply when using an EBS Optimized instance.Default:
false
-
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 EBS I/O performance. This optimization isn't available with all instance types. Additional usage charges apply when using an EBS Optimized instance.
Default:
false
- 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 EBS I/O
performance. This optimization isn't available with all instance
types. Additional usage charges apply when using an EBS Optimized
instance.
Default:
false
-
withEbsOptimized
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 EBS I/O performance. This optimization isn't available with all instance types. Additional usage charges apply when using an EBS Optimized instance.
Default:
false
- 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 EBS I/O performance. This optimization isn't available with all instance types. Additional usage charges apply when using an EBS Optimized instance.Default:
false
- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
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 EBS I/O performance. This optimization isn't available with all instance types. Additional usage charges apply when using an EBS Optimized instance.
Default:
false
- 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 EBS I/O
performance. This optimization isn't available with all instance
types. Additional usage charges apply when using an EBS Optimized
instance.
Default:
false
-
getAllSecurityGroups
One or more security groups. When requesting instances in a VPC, you must specify the IDs of the security groups. When requesting instances in EC2-Classic, you can specify the names or the IDs of the security groups.
- Returns:
- One or more security groups. When requesting instances in a VPC, you must specify the IDs of the security groups. When requesting instances in EC2-Classic, you can specify the names or the IDs of the security groups.
-
setAllSecurityGroups
One or more security groups. When requesting instances in a VPC, you must specify the IDs of the security groups. When requesting instances in EC2-Classic, you can specify the names or the IDs of the security groups.
- Parameters:
allSecurityGroups
- One or more security groups. When requesting instances in a VPC, you must specify the IDs of the security groups. When requesting instances in EC2-Classic, you can specify the names or the IDs of the security groups.
-
withAllSecurityGroups
One or more security groups. When requesting instances in a VPC, you must specify the IDs of the security groups. When requesting instances in EC2-Classic, you can specify the names or the IDs of the security groups.
NOTE: This method appends the values to the existing list (if any). Use
setAllSecurityGroups(java.util.Collection)
orwithAllSecurityGroups(java.util.Collection)
if you want to override the existing values.- Parameters:
allSecurityGroups
- One or more security groups. When requesting instances in a VPC, you must specify the IDs of the security groups. When requesting instances in EC2-Classic, you can specify the names or the IDs of the security groups.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
withAllSecurityGroups
One or more security groups. When requesting instances in a VPC, you must specify the IDs of the security groups. When requesting instances in EC2-Classic, you can specify the names or the IDs of the security groups.
- Parameters:
allSecurityGroups
- One or more security groups. When requesting instances in a VPC, you must specify the IDs of the security groups. When requesting instances in EC2-Classic, you can specify the names or the IDs of the security groups.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
setMonitoringEnabled
- Parameters:
monitoringEnabled
-
-
getMonitoringEnabled
- Returns:
-
withMonitoringEnabled
- Parameters:
monitoringEnabled
-- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
isMonitoringEnabled
- Returns:
-
getSecurityGroups
One or more security group names.
- Returns:
- One or more security group names.
-
setSecurityGroups
One or more security group names.
- Parameters:
securityGroups
- One or more security group names.
-
withSecurityGroups
One or more security group names.
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 group names.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
withSecurityGroups
One or more security group names.
- Parameters:
securityGroups
- One or more security group names.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
toString
Returns a string representation of this object; useful for testing and debugging. -
equals
-
hashCode
public int hashCode() -
clone
-