Describes the launch specification for one or more Spot Instances. If you include On-Demand capacity in your fleet
request, you can't use SpotFleetLaunchSpecification; you must use LaunchTemplateConfig.

Constructor Detail

SpotFleetLaunchSpecification

Method Detail

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

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

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.

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

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.

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.

Returns:

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.

setBlockDeviceMappings

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.

Parameters:

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.

withBlockDeviceMappings

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.

Returns:

Returns a reference to this object so that method calls can be chained together.

withBlockDeviceMappings

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.

Parameters:

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.

Returns:

Returns a reference to this object so that method calls can be chained together.

setEbsOptimized

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

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

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

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.

setRamdiskId

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 AWS Resource
Center and search for the kernel ID.

Parameters:

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
AWS Resource Center and search for the kernel ID.

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 AWS Resource
Center and search for the kernel ID.

Returns:

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
AWS Resource Center and search for the kernel ID.

withRamdiskId

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 AWS Resource
Center and search for the kernel ID.

Parameters:

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
AWS Resource Center and search for the kernel ID.

Returns:

Returns a reference to this object so that method calls can be chained together.

setSpotPrice

The maximum price per unit hour that you are willing to pay for a Spot Instance. If this value is not specified,
the default is the Spot price specified for the fleet. To determine the Spot price per unit hour, divide the Spot
price by the value of WeightedCapacity.

Parameters:

spotPrice - The maximum price per unit hour that you are willing to pay for a Spot Instance. If this value is not
specified, the default is the Spot price specified for the fleet. To determine the Spot price per unit
hour, divide the Spot price by the value of WeightedCapacity.

getSpotPrice

The maximum price per unit hour that you are willing to pay for a Spot Instance. If this value is not specified,
the default is the Spot price specified for the fleet. To determine the Spot price per unit hour, divide the Spot
price by the value of WeightedCapacity.

Returns:

The maximum price per unit hour that you are willing to pay for a Spot Instance. If this value is not
specified, the default is the Spot price specified for the fleet. To determine the Spot price per unit
hour, divide the Spot price by the value of WeightedCapacity.

withSpotPrice

The maximum price per unit hour that you are willing to pay for a Spot Instance. If this value is not specified,
the default is the Spot price specified for the fleet. To determine the Spot price per unit hour, divide the Spot
price by the value of WeightedCapacity.

Parameters:

spotPrice - The maximum price per unit hour that you are willing to pay for a Spot Instance. If this value is not
specified, the default is the Spot price specified for the fleet. To determine the Spot price per unit
hour, divide the Spot price by the value of WeightedCapacity.

Returns:

Returns a reference to this object so that method calls can be chained together.

setWeightedCapacity

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.

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 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.

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.

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 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.

withWeightedCapacity

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.

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 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.

Returns:

Returns a reference to this object so that method calls can be chained together.