@Generated(value="com.amazonaws:aws-java-sdk-code-generator") public class SpotFleetLaunchSpecification extends Object implements Serializable, Cloneable
Describes the launch specification for one or more Spot Instances. If you include On-Demand capacity in your fleet
request or want to specify an EFA network device, you can't use SpotFleetLaunchSpecification
; you must
use LaunchTemplateConfig.
Constructor and Description |
---|
SpotFleetLaunchSpecification() |
Modifier and Type | Method and Description |
---|---|
SpotFleetLaunchSpecification |
clone() |
boolean |
equals(Object obj) |
String |
getAddressingType()
Deprecated.
|
List<BlockDeviceMapping> |
getBlockDeviceMappings()
One or more block devices that are mapped to the Spot Instances.
|
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.
|
InstanceRequirements |
getInstanceRequirements()
The attributes for the instance types.
|
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()
The network interfaces.
|
SpotPlacement |
getPlacement()
The placement information.
|
String |
getRamdiskId()
The ID of the RAM disk.
|
List<GroupIdentifier> |
getSecurityGroups()
The security groups.
|
String |
getSpotPrice()
The maximum price per unit hour that you are willing to pay for a Spot Instance.
|
String |
getSubnetId()
The IDs of the subnets in which to launch the instances.
|
List<SpotFleetTagSpecification> |
getTagSpecifications()
The tags to apply during creation.
|
String |
getUserData()
The base64-encoded user data that instances use when starting up.
|
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 devices that are mapped to the Spot Instances.
|
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 |
setInstanceRequirements(InstanceRequirements instanceRequirements)
The attributes for the instance types.
|
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)
The network interfaces.
|
void |
setPlacement(SpotPlacement placement)
The placement information.
|
void |
setRamdiskId(String ramdiskId)
The ID of the RAM disk.
|
void |
setSecurityGroups(Collection<GroupIdentifier> securityGroups)
The security groups.
|
void |
setSpotPrice(String spotPrice)
The maximum price per unit hour that you are willing to pay for a Spot Instance.
|
void |
setSubnetId(String subnetId)
The IDs of the subnets in which to launch the instances.
|
void |
setTagSpecifications(Collection<SpotFleetTagSpecification> tagSpecifications)
The tags to apply during creation.
|
void |
setUserData(String userData)
The base64-encoded user data that instances use when starting up.
|
void |
setWeightedCapacity(Double weightedCapacity)
The number of units provided by the specified instance type.
|
String |
toString()
Returns a string representation of this object.
|
SpotFleetLaunchSpecification |
withAddressingType(String addressingType)
Deprecated.
|
SpotFleetLaunchSpecification |
withBlockDeviceMappings(BlockDeviceMapping... blockDeviceMappings)
One or more block devices that are mapped to the Spot Instances.
|
SpotFleetLaunchSpecification |
withBlockDeviceMappings(Collection<BlockDeviceMapping> blockDeviceMappings)
One or more block devices that are mapped to the Spot Instances.
|
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 |
withInstanceRequirements(InstanceRequirements instanceRequirements)
The attributes for the instance types.
|
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(Collection<InstanceNetworkInterfaceSpecification> networkInterfaces)
The network interfaces.
|
SpotFleetLaunchSpecification |
withNetworkInterfaces(InstanceNetworkInterfaceSpecification... networkInterfaces)
The network interfaces.
|
SpotFleetLaunchSpecification |
withPlacement(SpotPlacement placement)
The placement information.
|
SpotFleetLaunchSpecification |
withRamdiskId(String ramdiskId)
The ID of the RAM disk.
|
SpotFleetLaunchSpecification |
withSecurityGroups(Collection<GroupIdentifier> securityGroups)
The security groups.
|
SpotFleetLaunchSpecification |
withSecurityGroups(GroupIdentifier... securityGroups)
The security groups.
|
SpotFleetLaunchSpecification |
withSpotPrice(String spotPrice)
The maximum price per unit hour that you are willing to pay for a Spot Instance.
|
SpotFleetLaunchSpecification |
withSubnetId(String subnetId)
The IDs of the subnets in which to launch the instances.
|
SpotFleetLaunchSpecification |
withTagSpecifications(Collection<SpotFleetTagSpecification> tagSpecifications)
The tags to apply during creation.
|
SpotFleetLaunchSpecification |
withTagSpecifications(SpotFleetTagSpecification... tagSpecifications)
The tags to apply during creation.
|
SpotFleetLaunchSpecification |
withUserData(String userData)
The base64-encoded user data that instances use when starting up.
|
SpotFleetLaunchSpecification |
withWeightedCapacity(Double weightedCapacity)
The number of units provided by the specified instance type.
|
public List<GroupIdentifier> getSecurityGroups()
The security groups.
If you specify a network interface, you must specify any security groups as part of the network interface instead of using this parameter.
If you specify a network interface, you must specify any security groups as part of the network interface instead of using this parameter.
public void setSecurityGroups(Collection<GroupIdentifier> securityGroups)
The security groups.
If you specify a network interface, you must specify any security groups as part of the network interface instead of using this parameter.
securityGroups
- The security groups.
If you specify a network interface, you must specify any security groups as part of the network interface instead of using this parameter.
public SpotFleetLaunchSpecification withSecurityGroups(GroupIdentifier... securityGroups)
The security groups.
If you specify a network interface, you must specify any security groups as part of the network interface instead of using this parameter.
NOTE: This method appends the values to the existing list (if any). Use
setSecurityGroups(java.util.Collection)
or withSecurityGroups(java.util.Collection)
if you want
to override the existing values.
securityGroups
- The security groups.
If you specify a network interface, you must specify any security groups as part of the network interface instead of using this parameter.
public SpotFleetLaunchSpecification withSecurityGroups(Collection<GroupIdentifier> securityGroups)
The security groups.
If you specify a network interface, you must specify any security groups as part of the network interface instead of using this parameter.
securityGroups
- The security groups.
If you specify a network interface, you must specify any security groups as part of the network interface instead of using this parameter.
public void setAddressingType(String addressingType)
Deprecated.
addressingType
- Deprecated.public String getAddressingType()
Deprecated.
public SpotFleetLaunchSpecification withAddressingType(String addressingType)
Deprecated.
addressingType
- Deprecated.public List<BlockDeviceMapping> getBlockDeviceMappings()
One or more block devices that are mapped to the Spot Instances. You can't specify both a snapshot ID and an encryption value. This is because only blank volumes can be encrypted on creation. If a snapshot is the basis for a volume, it is not blank and its encryption status is used for the volume encryption status.
public void setBlockDeviceMappings(Collection<BlockDeviceMapping> blockDeviceMappings)
One or more block devices that are mapped to the Spot Instances. You can't specify both a snapshot ID and an encryption value. This is because only blank volumes can be encrypted on creation. If a snapshot is the basis for a volume, it is not blank and its encryption status is used for the volume encryption status.
blockDeviceMappings
- One or more block devices that are mapped to the Spot Instances. You can't specify both a snapshot ID and
an encryption value. This is because only blank volumes can be encrypted on creation. If a snapshot is the
basis for a volume, it is not blank and its encryption status is used for the volume encryption status.public SpotFleetLaunchSpecification withBlockDeviceMappings(BlockDeviceMapping... blockDeviceMappings)
One or more block devices that are mapped to the Spot Instances. You can't specify both a snapshot ID and an encryption value. This is because only blank volumes can be encrypted on creation. If a snapshot is the basis for a volume, it is not blank and its encryption status is used for the volume encryption status.
NOTE: This method appends the values to the existing list (if any). Use
setBlockDeviceMappings(java.util.Collection)
or withBlockDeviceMappings(java.util.Collection)
if you want to override the existing values.
blockDeviceMappings
- One or more block devices that are mapped to the Spot Instances. You can't specify both a snapshot ID and
an encryption value. This is because only blank volumes can be encrypted on creation. If a snapshot is the
basis for a volume, it is not blank and its encryption status is used for the volume encryption status.public SpotFleetLaunchSpecification withBlockDeviceMappings(Collection<BlockDeviceMapping> blockDeviceMappings)
One or more block devices that are mapped to the Spot Instances. You can't specify both a snapshot ID and an encryption value. This is because only blank volumes can be encrypted on creation. If a snapshot is the basis for a volume, it is not blank and its encryption status is used for the volume encryption status.
blockDeviceMappings
- One or more block devices that are mapped to the Spot Instances. You can't specify both a snapshot ID and
an encryption value. This is because only blank volumes can be encrypted on creation. If a snapshot is the
basis for a volume, it is not blank and its encryption status is used for the volume encryption status.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
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
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
Default: false
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
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
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
Default: false
public void setIamInstanceProfile(IamInstanceProfileSpecification iamInstanceProfile)
The IAM instance profile.
iamInstanceProfile
- The IAM instance profile.public IamInstanceProfileSpecification getIamInstanceProfile()
The IAM instance profile.
public SpotFleetLaunchSpecification withIamInstanceProfile(IamInstanceProfileSpecification iamInstanceProfile)
The IAM instance profile.
iamInstanceProfile
- The IAM instance profile.public void setImageId(String imageId)
The ID of the AMI.
imageId
- The ID of the AMI.public String getImageId()
The ID of the AMI.
public SpotFleetLaunchSpecification withImageId(String imageId)
The ID of the AMI.
imageId
- The ID of the AMI.public void setInstanceType(String instanceType)
The instance type.
instanceType
- The instance type.InstanceType
public String getInstanceType()
The instance type.
InstanceType
public SpotFleetLaunchSpecification withInstanceType(String instanceType)
The instance type.
instanceType
- The instance type.InstanceType
public void setInstanceType(InstanceType instanceType)
The instance type.
instanceType
- The instance type.InstanceType
public SpotFleetLaunchSpecification withInstanceType(InstanceType instanceType)
The instance type.
instanceType
- The instance type.InstanceType
public void setKernelId(String kernelId)
The ID of the kernel.
kernelId
- The ID of the kernel.public String getKernelId()
The ID of the kernel.
public SpotFleetLaunchSpecification withKernelId(String kernelId)
The ID of the kernel.
kernelId
- The ID of the kernel.public void setKeyName(String keyName)
The name of the key pair.
keyName
- The name of the key pair.public String getKeyName()
The name of the key pair.
public SpotFleetLaunchSpecification withKeyName(String keyName)
The name of the key pair.
keyName
- The name of the key pair.public void setMonitoring(SpotFleetMonitoring monitoring)
Enable or disable monitoring for the instances.
monitoring
- Enable or disable monitoring for the instances.public SpotFleetMonitoring getMonitoring()
Enable or disable monitoring for the instances.
public SpotFleetLaunchSpecification withMonitoring(SpotFleetMonitoring monitoring)
Enable or disable monitoring for the instances.
monitoring
- Enable or disable monitoring for the instances.public List<InstanceNetworkInterfaceSpecification> getNetworkInterfaces()
The network interfaces.
SpotFleetLaunchSpecification
does not support Elastic Fabric Adapter (EFA). You must use LaunchTemplateConfig instead.
SpotFleetLaunchSpecification
does not support Elastic Fabric Adapter (EFA). You must use
LaunchTemplateConfig instead.
public void setNetworkInterfaces(Collection<InstanceNetworkInterfaceSpecification> networkInterfaces)
The network interfaces.
SpotFleetLaunchSpecification
does not support Elastic Fabric Adapter (EFA). You must use LaunchTemplateConfig instead.
networkInterfaces
- The network interfaces.
SpotFleetLaunchSpecification
does not support Elastic Fabric Adapter (EFA). You must use
LaunchTemplateConfig instead.
public SpotFleetLaunchSpecification withNetworkInterfaces(InstanceNetworkInterfaceSpecification... networkInterfaces)
The network interfaces.
SpotFleetLaunchSpecification
does not support Elastic Fabric Adapter (EFA). You must use LaunchTemplateConfig instead.
NOTE: This method appends the values to the existing list (if any). Use
setNetworkInterfaces(java.util.Collection)
or withNetworkInterfaces(java.util.Collection)
if
you want to override the existing values.
networkInterfaces
- The network interfaces.
SpotFleetLaunchSpecification
does not support Elastic Fabric Adapter (EFA). You must use
LaunchTemplateConfig instead.
public SpotFleetLaunchSpecification withNetworkInterfaces(Collection<InstanceNetworkInterfaceSpecification> networkInterfaces)
The network interfaces.
SpotFleetLaunchSpecification
does not support Elastic Fabric Adapter (EFA). You must use LaunchTemplateConfig instead.
networkInterfaces
- The network interfaces.
SpotFleetLaunchSpecification
does not support Elastic Fabric Adapter (EFA). You must use
LaunchTemplateConfig instead.
public void setPlacement(SpotPlacement placement)
The placement information.
placement
- The placement information.public SpotPlacement getPlacement()
The placement information.
public SpotFleetLaunchSpecification withPlacement(SpotPlacement placement)
The placement information.
placement
- The placement information.public void setRamdiskId(String ramdiskId)
The ID of the RAM disk. Some kernels require additional drivers at launch. Check the kernel requirements for information about whether you need to specify a RAM disk. To find kernel requirements, refer to the Amazon Web Services Resource Center and search for the kernel ID.
ramdiskId
- The ID of the RAM disk. Some kernels require additional drivers at launch. Check the kernel requirements
for information about whether you need to specify a RAM disk. To find kernel requirements, refer to the
Amazon Web Services Resource Center and search for the kernel ID.public String getRamdiskId()
The ID of the RAM disk. Some kernels require additional drivers at launch. Check the kernel requirements for information about whether you need to specify a RAM disk. To find kernel requirements, refer to the Amazon Web Services Resource Center and search for the kernel ID.
public SpotFleetLaunchSpecification withRamdiskId(String ramdiskId)
The ID of the RAM disk. Some kernels require additional drivers at launch. Check the kernel requirements for information about whether you need to specify a RAM disk. To find kernel requirements, refer to the Amazon Web Services Resource Center and search for the kernel ID.
ramdiskId
- The ID of the RAM disk. Some kernels require additional drivers at launch. Check the kernel requirements
for information about whether you need to specify a RAM disk. To find kernel requirements, refer to the
Amazon Web Services Resource Center and search for the kernel ID.public void setSpotPrice(String spotPrice)
The maximum price per unit hour that you are willing to pay for a Spot Instance. We do not recommend using this parameter because it can lead to increased interruptions. If you do not specify this parameter, you will pay the current Spot price.
If you specify a maximum price, your instances will be interrupted more frequently than if you do not specify this parameter.
spotPrice
- The maximum price per unit hour that you are willing to pay for a Spot Instance. We do not recommend using
this parameter because it can lead to increased interruptions. If you do not specify this parameter, you
will pay the current Spot price. If you specify a maximum price, your instances will be interrupted more frequently than if you do not specify this parameter.
public String getSpotPrice()
The maximum price per unit hour that you are willing to pay for a Spot Instance. We do not recommend using this parameter because it can lead to increased interruptions. If you do not specify this parameter, you will pay the current Spot price.
If you specify a maximum price, your instances will be interrupted more frequently than if you do not specify this parameter.
If you specify a maximum price, your instances will be interrupted more frequently than if you do not specify this parameter.
public SpotFleetLaunchSpecification withSpotPrice(String spotPrice)
The maximum price per unit hour that you are willing to pay for a Spot Instance. We do not recommend using this parameter because it can lead to increased interruptions. If you do not specify this parameter, you will pay the current Spot price.
If you specify a maximum price, your instances will be interrupted more frequently than if you do not specify this parameter.
spotPrice
- The maximum price per unit hour that you are willing to pay for a Spot Instance. We do not recommend using
this parameter because it can lead to increased interruptions. If you do not specify this parameter, you
will pay the current Spot price. If you specify a maximum price, your instances will be interrupted more frequently than if you do not specify this parameter.
public void setSubnetId(String subnetId)
The IDs of the subnets in which to launch the instances. To specify multiple subnets, separate them using commas; for example, "subnet-1234abcdeexample1, subnet-0987cdef6example2".
If you specify a network interface, you must specify any subnets as part of the network interface instead of using this parameter.
subnetId
- The IDs of the subnets in which to launch the instances. To specify multiple subnets, separate them using
commas; for example, "subnet-1234abcdeexample1, subnet-0987cdef6example2".
If you specify a network interface, you must specify any subnets as part of the network interface instead of using this parameter.
public String getSubnetId()
The IDs of the subnets in which to launch the instances. To specify multiple subnets, separate them using commas; for example, "subnet-1234abcdeexample1, subnet-0987cdef6example2".
If you specify a network interface, you must specify any subnets as part of the network interface instead of using this parameter.
If you specify a network interface, you must specify any subnets as part of the network interface instead of using this parameter.
public SpotFleetLaunchSpecification withSubnetId(String subnetId)
The IDs of the subnets in which to launch the instances. To specify multiple subnets, separate them using commas; for example, "subnet-1234abcdeexample1, subnet-0987cdef6example2".
If you specify a network interface, you must specify any subnets as part of the network interface instead of using this parameter.
subnetId
- The IDs of the subnets in which to launch the instances. To specify multiple subnets, separate them using
commas; for example, "subnet-1234abcdeexample1, subnet-0987cdef6example2".
If you specify a network interface, you must specify any subnets as part of the network interface instead of using this parameter.
public void setUserData(String userData)
The base64-encoded user data that instances use when starting up. User data is limited to 16 KB.
userData
- The base64-encoded user data that instances use when starting up. User data is limited to 16 KB.public String getUserData()
The base64-encoded user data that instances use when starting up. User data is limited to 16 KB.
public SpotFleetLaunchSpecification withUserData(String userData)
The base64-encoded user data that instances use when starting up. User data is limited to 16 KB.
userData
- The base64-encoded user data that instances use when starting up. User data is limited to 16 KB.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 of 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, Amazon EC2 rounds the number of instances to the next whole number. If this value is not specified, the default is 1.
When specifying weights, the price used in the lowestPrice
and priceCapacityOptimized
allocation strategies is per unit hour (where the instance price is divided by the specified weight).
However, if all the specified weights are above the requested TargetCapacity
, resulting in only 1
instance being launched, the price used is per instance hour.
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 of 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, Amazon EC2 rounds the number of instances to the next whole number. If this value is not specified, the default is 1.
When specifying weights, the price used in the lowestPrice
and
priceCapacityOptimized
allocation strategies is per unit hour (where the instance
price is divided by the specified weight). However, if all the specified weights are above the requested
TargetCapacity
, resulting in only 1 instance being launched, the price used is per
instance hour.
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 of 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, Amazon EC2 rounds the number of instances to the next whole number. If this value is not specified, the default is 1.
When specifying weights, the price used in the lowestPrice
and priceCapacityOptimized
allocation strategies is per unit hour (where the instance price is divided by the specified weight).
However, if all the specified weights are above the requested TargetCapacity
, resulting in only 1
instance being launched, the price used is per instance hour.
If the target capacity divided by this value is not a whole number, Amazon EC2 rounds the number of instances to the next whole number. If this value is not specified, the default is 1.
When specifying weights, the price used in the lowestPrice
and
priceCapacityOptimized
allocation strategies is per unit hour (where the instance
price is divided by the specified weight). However, if all the specified weights are above the requested
TargetCapacity
, resulting in only 1 instance being launched, the price used is per
instance hour.
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 of 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, Amazon EC2 rounds the number of instances to the next whole number. If this value is not specified, the default is 1.
When specifying weights, the price used in the lowestPrice
and priceCapacityOptimized
allocation strategies is per unit hour (where the instance price is divided by the specified weight).
However, if all the specified weights are above the requested TargetCapacity
, resulting in only 1
instance being launched, the price used is per instance hour.
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 of 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, Amazon EC2 rounds the number of instances to the next whole number. If this value is not specified, the default is 1.
When specifying weights, the price used in the lowestPrice
and
priceCapacityOptimized
allocation strategies is per unit hour (where the instance
price is divided by the specified weight). However, if all the specified weights are above the requested
TargetCapacity
, resulting in only 1 instance being launched, the price used is per
instance hour.
public List<SpotFleetTagSpecification> getTagSpecifications()
The tags to apply during creation.
public void setTagSpecifications(Collection<SpotFleetTagSpecification> tagSpecifications)
The tags to apply during creation.
tagSpecifications
- The tags to apply during creation.public SpotFleetLaunchSpecification withTagSpecifications(SpotFleetTagSpecification... tagSpecifications)
The tags to apply during creation.
NOTE: This method appends the values to the existing list (if any). Use
setTagSpecifications(java.util.Collection)
or withTagSpecifications(java.util.Collection)
if
you want to override the existing values.
tagSpecifications
- The tags to apply during creation.public SpotFleetLaunchSpecification withTagSpecifications(Collection<SpotFleetTagSpecification> tagSpecifications)
The tags to apply during creation.
tagSpecifications
- The tags to apply during creation.public void setInstanceRequirements(InstanceRequirements instanceRequirements)
The attributes for the instance types. When you specify instance attributes, Amazon EC2 will identify instance types with those attributes.
If you specify InstanceRequirements
, you can't specify InstanceType
.
instanceRequirements
- The attributes for the instance types. When you specify instance attributes, Amazon EC2 will identify
instance types with those attributes.
If you specify InstanceRequirements
, you can't specify InstanceType
.
public InstanceRequirements getInstanceRequirements()
The attributes for the instance types. When you specify instance attributes, Amazon EC2 will identify instance types with those attributes.
If you specify InstanceRequirements
, you can't specify InstanceType
.
If you specify InstanceRequirements
, you can't specify InstanceType
.
public SpotFleetLaunchSpecification withInstanceRequirements(InstanceRequirements instanceRequirements)
The attributes for the instance types. When you specify instance attributes, Amazon EC2 will identify instance types with those attributes.
If you specify InstanceRequirements
, you can't specify InstanceType
.
instanceRequirements
- The attributes for the instance types. When you specify instance attributes, Amazon EC2 will identify
instance types with those attributes.
If you specify InstanceRequirements
, you can't specify InstanceType
.
public String toString()
toString
in class Object
Object.toString()
public SpotFleetLaunchSpecification clone()