Class SpotFleetLaunchSpecification
- java.lang.Object
-
- com.amazonaws.services.ec2.model.SpotFleetLaunchSpecification
-
- All Implemented Interfaces:
Serializable
,Cloneable
public class SpotFleetLaunchSpecification extends Object implements Serializable, Cloneable
Describes the launch specification for one or more Spot instances.
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description SpotFleetLaunchSpecification()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description SpotFleetLaunchSpecification
clone()
boolean
equals(Object obj)
String
getAddressingType()
Deprecated.List<BlockDeviceMapping>
getBlockDeviceMappings()
One or more block device mapping entries.Boolean
getEbsOptimized()
Indicates whether the instances are optimized for EBS I/O.IamInstanceProfileSpecification
getIamInstanceProfile()
The IAM instance profile.String
getImageId()
The ID of the AMI.String
getInstanceType()
The instance type.String
getKernelId()
The ID of the kernel.String
getKeyName()
The name of the key pair.SpotFleetMonitoring
getMonitoring()
Enable or disable monitoring for the instances.List<InstanceNetworkInterfaceSpecification>
getNetworkInterfaces()
One or more network interfaces.SpotPlacement
getPlacement()
The placement information.String
getRamdiskId()
The ID of the RAM disk.List<GroupIdentifier>
getSecurityGroups()
One or more security groups.String
getSpotPrice()
The bid price per unit hour for the specified instance type.String
getSubnetId()
The ID of the subnet in which to launch the instances.String
getUserData()
The Base64-encoded MIME user data to make available to the instances.Double
getWeightedCapacity()
The number of units provided by the specified instance type.int
hashCode()
Boolean
isEbsOptimized()
Indicates whether the instances are optimized for EBS I/O.void
setAddressingType(String addressingType)
Deprecated.void
setBlockDeviceMappings(Collection<BlockDeviceMapping> blockDeviceMappings)
One or more block device mapping entries.void
setEbsOptimized(Boolean ebsOptimized)
Indicates whether the instances are 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
setMonitoring(SpotFleetMonitoring monitoring)
Enable or disable monitoring for the instances.void
setNetworkInterfaces(Collection<InstanceNetworkInterfaceSpecification> networkInterfaces)
One or more network interfaces.void
setPlacement(SpotPlacement placement)
The placement information.void
setRamdiskId(String ramdiskId)
The ID of the RAM disk.void
setSecurityGroups(Collection<GroupIdentifier> securityGroups)
One or more security groups.void
setSpotPrice(String spotPrice)
The bid price per unit hour for the specified instance type.void
setSubnetId(String subnetId)
The ID of the subnet in which to launch the instances.void
setUserData(String userData)
The Base64-encoded MIME user data to make available to the instances.void
setWeightedCapacity(Double weightedCapacity)
The number of units provided by the specified instance type.String
toString()
Returns a string representation of this object; useful for testing and debugging.SpotFleetLaunchSpecification
withAddressingType(String addressingType)
Deprecated.SpotFleetLaunchSpecification
withBlockDeviceMappings(BlockDeviceMapping... blockDeviceMappings)
One or more block device mapping entries.SpotFleetLaunchSpecification
withBlockDeviceMappings(Collection<BlockDeviceMapping> blockDeviceMappings)
One or more block device mapping entries.SpotFleetLaunchSpecification
withEbsOptimized(Boolean ebsOptimized)
Indicates whether the instances are optimized for EBS I/O.SpotFleetLaunchSpecification
withIamInstanceProfile(IamInstanceProfileSpecification iamInstanceProfile)
The IAM instance profile.SpotFleetLaunchSpecification
withImageId(String imageId)
The ID of the AMI.SpotFleetLaunchSpecification
withInstanceType(InstanceType instanceType)
The instance type.SpotFleetLaunchSpecification
withInstanceType(String instanceType)
The instance type.SpotFleetLaunchSpecification
withKernelId(String kernelId)
The ID of the kernel.SpotFleetLaunchSpecification
withKeyName(String keyName)
The name of the key pair.SpotFleetLaunchSpecification
withMonitoring(SpotFleetMonitoring monitoring)
Enable or disable monitoring for the instances.SpotFleetLaunchSpecification
withNetworkInterfaces(InstanceNetworkInterfaceSpecification... networkInterfaces)
One or more network interfaces.SpotFleetLaunchSpecification
withNetworkInterfaces(Collection<InstanceNetworkInterfaceSpecification> networkInterfaces)
One or more network interfaces.SpotFleetLaunchSpecification
withPlacement(SpotPlacement placement)
The placement information.SpotFleetLaunchSpecification
withRamdiskId(String ramdiskId)
The ID of the RAM disk.SpotFleetLaunchSpecification
withSecurityGroups(GroupIdentifier... securityGroups)
One or more security groups.SpotFleetLaunchSpecification
withSecurityGroups(Collection<GroupIdentifier> securityGroups)
One or more security groups.SpotFleetLaunchSpecification
withSpotPrice(String spotPrice)
The bid price per unit hour for the specified instance type.SpotFleetLaunchSpecification
withSubnetId(String subnetId)
The ID of the subnet in which to launch the instances.SpotFleetLaunchSpecification
withUserData(String userData)
The Base64-encoded MIME user data to make available to the instances.SpotFleetLaunchSpecification
withWeightedCapacity(Double weightedCapacity)
The number of units provided by the specified instance type.
-
-
-
Method Detail
-
setImageId
public void setImageId(String imageId)
The ID of the AMI.
- Parameters:
imageId
- The ID of the AMI.
-
getImageId
public String getImageId()
The ID of the AMI.
- Returns:
- The ID of the AMI.
-
withImageId
public SpotFleetLaunchSpecification withImageId(String imageId)
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
public void setKeyName(String keyName)
The name of the key pair.
- Parameters:
keyName
- The name of the key pair.
-
getKeyName
public String getKeyName()
The name of the key pair.
- Returns:
- The name of the key pair.
-
withKeyName
public SpotFleetLaunchSpecification withKeyName(String keyName)
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.
-
getSecurityGroups
public List<GroupIdentifier> getSecurityGroups()
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.
-
setSecurityGroups
public void setSecurityGroups(Collection<GroupIdentifier> securityGroups)
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:
securityGroups
- 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.
-
withSecurityGroups
public SpotFleetLaunchSpecification withSecurityGroups(GroupIdentifier... securityGroups)
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
setSecurityGroups(java.util.Collection)
orwithSecurityGroups(java.util.Collection)
if you want to override the existing values.- Parameters:
securityGroups
- 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.
-
withSecurityGroups
public SpotFleetLaunchSpecification withSecurityGroups(Collection<GroupIdentifier> securityGroups)
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:
securityGroups
- 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.
-
setUserData
public void setUserData(String userData)
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
public String 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
public SpotFleetLaunchSpecification withUserData(String userData)
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
public void setAddressingType(String addressingType)
Deprecated.
- Parameters:
addressingType
- Deprecated.
-
getAddressingType
public String getAddressingType()
Deprecated.
- Returns:
- Deprecated.
-
withAddressingType
public SpotFleetLaunchSpecification withAddressingType(String addressingType)
Deprecated.
- Parameters:
addressingType
- Deprecated.- 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 SpotFleetLaunchSpecification 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 SpotFleetLaunchSpecification 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
-
setPlacement
public void setPlacement(SpotPlacement placement)
The placement information.
- Parameters:
placement
- The placement information.
-
getPlacement
public SpotPlacement getPlacement()
The placement information.
- Returns:
- The placement information.
-
withPlacement
public SpotFleetLaunchSpecification withPlacement(SpotPlacement placement)
The placement information.
- Parameters:
placement
- The placement information.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
setKernelId
public void setKernelId(String kernelId)
The ID of the kernel.
- Parameters:
kernelId
- The ID of the kernel.
-
getKernelId
public String getKernelId()
The ID of the kernel.
- Returns:
- The ID of the kernel.
-
withKernelId
public SpotFleetLaunchSpecification withKernelId(String kernelId)
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
public void setRamdiskId(String ramdiskId)
The ID of the RAM disk.
- Parameters:
ramdiskId
- The ID of the RAM disk.
-
getRamdiskId
public String getRamdiskId()
The ID of the RAM disk.
- Returns:
- The ID of the RAM disk.
-
withRamdiskId
public SpotFleetLaunchSpecification withRamdiskId(String ramdiskId)
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
public List<BlockDeviceMapping> getBlockDeviceMappings()
One or more block device mapping entries.
- Returns:
- One or more block device mapping entries.
-
setBlockDeviceMappings
public void setBlockDeviceMappings(Collection<BlockDeviceMapping> blockDeviceMappings)
One or more block device mapping entries.
- Parameters:
blockDeviceMappings
- One or more block device mapping entries.
-
withBlockDeviceMappings
public SpotFleetLaunchSpecification withBlockDeviceMappings(BlockDeviceMapping... blockDeviceMappings)
One or more block device mapping entries.
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.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
withBlockDeviceMappings
public SpotFleetLaunchSpecification withBlockDeviceMappings(Collection<BlockDeviceMapping> blockDeviceMappings)
One or more block device mapping entries.
- Parameters:
blockDeviceMappings
- One or more block device mapping entries.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
setMonitoring
public void setMonitoring(SpotFleetMonitoring monitoring)
Enable or disable monitoring for the instances.
- Parameters:
monitoring
- Enable or disable monitoring for the instances.
-
getMonitoring
public SpotFleetMonitoring getMonitoring()
Enable or disable monitoring for the instances.
- Returns:
- Enable or disable monitoring for the instances.
-
withMonitoring
public SpotFleetLaunchSpecification withMonitoring(SpotFleetMonitoring monitoring)
Enable or disable monitoring for the instances.
- Parameters:
monitoring
- Enable or disable monitoring for the instances.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
setSubnetId
public void setSubnetId(String subnetId)
The ID of the subnet in which to launch the instances. To specify multiple subnets, separate them using commas; for example, "subnet-a61dafcf, subnet-65ea5f08".
- Parameters:
subnetId
- The ID of the subnet in which to launch the instances. To specify multiple subnets, separate them using commas; for example, "subnet-a61dafcf, subnet-65ea5f08".
-
getSubnetId
public String getSubnetId()
The ID of the subnet in which to launch the instances. To specify multiple subnets, separate them using commas; for example, "subnet-a61dafcf, subnet-65ea5f08".
- Returns:
- The ID of the subnet in which to launch the instances. To specify multiple subnets, separate them using commas; for example, "subnet-a61dafcf, subnet-65ea5f08".
-
withSubnetId
public SpotFleetLaunchSpecification withSubnetId(String subnetId)
The ID of the subnet in which to launch the instances. To specify multiple subnets, separate them using commas; for example, "subnet-a61dafcf, subnet-65ea5f08".
- Parameters:
subnetId
- The ID of the subnet in which to launch the instances. To specify multiple subnets, separate them using commas; for example, "subnet-a61dafcf, subnet-65ea5f08".- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
getNetworkInterfaces
public List<InstanceNetworkInterfaceSpecification> 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 SpotFleetLaunchSpecification 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 SpotFleetLaunchSpecification 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
public void setIamInstanceProfile(IamInstanceProfileSpecification iamInstanceProfile)
The IAM instance profile.
- Parameters:
iamInstanceProfile
- The IAM instance profile.
-
getIamInstanceProfile
public IamInstanceProfileSpecification getIamInstanceProfile()
The IAM instance profile.
- Returns:
- The IAM instance profile.
-
withIamInstanceProfile
public SpotFleetLaunchSpecification 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
public void setEbsOptimized(Boolean ebsOptimized)
Indicates whether the instances are 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 instances are 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
public Boolean getEbsOptimized()
Indicates whether the instances are 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 instances are 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
public SpotFleetLaunchSpecification withEbsOptimized(Boolean ebsOptimized)
Indicates whether the instances are 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 instances are 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
public Boolean isEbsOptimized()
Indicates whether the instances are 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 instances are 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
-
setWeightedCapacity
public void setWeightedCapacity(Double weightedCapacity)
The number of units provided by the specified instance type. These are the same units that you chose to set the target capacity in terms (instances or a performance characteristic such as vCPUs, memory, or I/O).
If the target capacity divided by this value is not a whole number, we round the number of instances to the next whole number. If this value is not specified, the default is 1.
- Parameters:
weightedCapacity
- The number of units provided by the specified instance type. These are the same units that you chose to set the target capacity in terms (instances or a performance characteristic such as vCPUs, memory, or I/O).If the target capacity divided by this value is not a whole number, we round the number of instances to the next whole number. If this value is not specified, the default is 1.
-
getWeightedCapacity
public Double getWeightedCapacity()
The number of units provided by the specified instance type. These are the same units that you chose to set the target capacity in terms (instances or a performance characteristic such as vCPUs, memory, or I/O).
If the target capacity divided by this value is not a whole number, we round the number of instances to the next whole number. If this value is not specified, the default is 1.
- Returns:
- The number of units provided by the specified instance type.
These are the same units that you chose to set the target
capacity in terms (instances or a performance characteristic such
as vCPUs, memory, or I/O).
If the target capacity divided by this value is not a whole number, we round the number of instances to the next whole number. If this value is not specified, the default is 1.
-
withWeightedCapacity
public SpotFleetLaunchSpecification withWeightedCapacity(Double weightedCapacity)
The number of units provided by the specified instance type. These are the same units that you chose to set the target capacity in terms (instances or a performance characteristic such as vCPUs, memory, or I/O).
If the target capacity divided by this value is not a whole number, we round the number of instances to the next whole number. If this value is not specified, the default is 1.
- Parameters:
weightedCapacity
- The number of units provided by the specified instance type. These are the same units that you chose to set the target capacity in terms (instances or a performance characteristic such as vCPUs, memory, or I/O).If the target capacity divided by this value is not a whole number, we round the number of instances to the next whole number. If this value is not specified, the default is 1.
- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
setSpotPrice
public void setSpotPrice(String spotPrice)
The bid price per unit hour for the specified instance type. If this value is not specified, the default is the Spot bid price specified for the fleet. To determine the bid price per unit hour, divide the Spot bid price by the value of
WeightedCapacity
.- Parameters:
spotPrice
- The bid price per unit hour for the specified instance type. If this value is not specified, the default is the Spot bid price specified for the fleet. To determine the bid price per unit hour, divide the Spot bid price by the value ofWeightedCapacity
.
-
getSpotPrice
public String getSpotPrice()
The bid price per unit hour for the specified instance type. If this value is not specified, the default is the Spot bid price specified for the fleet. To determine the bid price per unit hour, divide the Spot bid price by the value of
WeightedCapacity
.- Returns:
- The bid price per unit hour for the specified instance type. If
this value is not specified, the default is the Spot bid price
specified for the fleet. To determine the bid price per unit
hour, divide the Spot bid price by the value of
WeightedCapacity
.
-
withSpotPrice
public SpotFleetLaunchSpecification withSpotPrice(String spotPrice)
The bid price per unit hour for the specified instance type. If this value is not specified, the default is the Spot bid price specified for the fleet. To determine the bid price per unit hour, divide the Spot bid price by the value of
WeightedCapacity
.- Parameters:
spotPrice
- The bid price per unit hour for the specified instance type. If this value is not specified, the default is the Spot bid price specified for the fleet. To determine the bid price per unit hour, divide the Spot bid price by the value ofWeightedCapacity
.- 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()
-
clone
public SpotFleetLaunchSpecification clone()
-
-