@Stability(value=Stable)
public static interface CfnSpotFleet.SpotFleetLaunchSpecificationProperty
extends software.amazon.jsii.JsiiSerializable
If you include On-Demand capacity in your fleet request, you can't use SpotFleetLaunchSpecification ; you must use LaunchTemplateConfig .
Example:
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import software.amazon.awscdk.services.ec2.*;
SpotFleetLaunchSpecificationProperty spotFleetLaunchSpecificationProperty = SpotFleetLaunchSpecificationProperty.builder()
.imageId("imageId")
// the properties below are optional
.blockDeviceMappings(List.of(BlockDeviceMappingProperty.builder()
.deviceName("deviceName")
// the properties below are optional
.ebs(EbsBlockDeviceProperty.builder()
.deleteOnTermination(false)
.encrypted(false)
.iops(123)
.snapshotId("snapshotId")
.volumeSize(123)
.volumeType("volumeType")
.build())
.noDevice("noDevice")
.virtualName("virtualName")
.build()))
.ebsOptimized(false)
.iamInstanceProfile(IamInstanceProfileSpecificationProperty.builder()
.arn("arn")
.build())
.instanceRequirements(InstanceRequirementsRequestProperty.builder()
.acceleratorCount(AcceleratorCountRequestProperty.builder()
.max(123)
.min(123)
.build())
.acceleratorManufacturers(List.of("acceleratorManufacturers"))
.acceleratorNames(List.of("acceleratorNames"))
.acceleratorTotalMemoryMiB(AcceleratorTotalMemoryMiBRequestProperty.builder()
.max(123)
.min(123)
.build())
.acceleratorTypes(List.of("acceleratorTypes"))
.bareMetal("bareMetal")
.baselineEbsBandwidthMbps(BaselineEbsBandwidthMbpsRequestProperty.builder()
.max(123)
.min(123)
.build())
.burstablePerformance("burstablePerformance")
.cpuManufacturers(List.of("cpuManufacturers"))
.excludedInstanceTypes(List.of("excludedInstanceTypes"))
.instanceGenerations(List.of("instanceGenerations"))
.localStorage("localStorage")
.localStorageTypes(List.of("localStorageTypes"))
.memoryGiBPerVCpu(MemoryGiBPerVCpuRequestProperty.builder()
.max(123)
.min(123)
.build())
.memoryMiB(MemoryMiBRequestProperty.builder()
.max(123)
.min(123)
.build())
.networkInterfaceCount(NetworkInterfaceCountRequestProperty.builder()
.max(123)
.min(123)
.build())
.onDemandMaxPricePercentageOverLowestPrice(123)
.requireHibernateSupport(false)
.spotMaxPricePercentageOverLowestPrice(123)
.totalLocalStorageGb(TotalLocalStorageGBRequestProperty.builder()
.max(123)
.min(123)
.build())
.vCpuCount(VCpuCountRangeRequestProperty.builder()
.max(123)
.min(123)
.build())
.build())
.instanceType("instanceType")
.kernelId("kernelId")
.keyName("keyName")
.monitoring(SpotFleetMonitoringProperty.builder()
.enabled(false)
.build())
.networkInterfaces(List.of(InstanceNetworkInterfaceSpecificationProperty.builder()
.associatePublicIpAddress(false)
.deleteOnTermination(false)
.description("description")
.deviceIndex(123)
.groups(List.of("groups"))
.ipv6AddressCount(123)
.ipv6Addresses(List.of(InstanceIpv6AddressProperty.builder()
.ipv6Address("ipv6Address")
.build()))
.networkInterfaceId("networkInterfaceId")
.privateIpAddresses(List.of(PrivateIpAddressSpecificationProperty.builder()
.privateIpAddress("privateIpAddress")
// the properties below are optional
.primary(false)
.build()))
.secondaryPrivateIpAddressCount(123)
.subnetId("subnetId")
.build()))
.placement(SpotPlacementProperty.builder()
.availabilityZone("availabilityZone")
.groupName("groupName")
.tenancy("tenancy")
.build())
.ramdiskId("ramdiskId")
.securityGroups(List.of(GroupIdentifierProperty.builder()
.groupId("groupId")
.build()))
.spotPrice("spotPrice")
.subnetId("subnetId")
.tagSpecifications(List.of(SpotFleetTagSpecificationProperty.builder()
.resourceType("resourceType")
.tags(List.of(CfnTag.builder()
.key("key")
.value("value")
.build()))
.build()))
.userData("userData")
.weightedCapacity(123)
.build();
| Modifier and Type | Interface and Description |
|---|---|
static class |
CfnSpotFleet.SpotFleetLaunchSpecificationProperty.Builder
A builder for
CfnSpotFleet.SpotFleetLaunchSpecificationProperty |
static class |
CfnSpotFleet.SpotFleetLaunchSpecificationProperty.Jsii$Proxy
An implementation for
CfnSpotFleet.SpotFleetLaunchSpecificationProperty |
| Modifier and Type | Method and Description |
|---|---|
static CfnSpotFleet.SpotFleetLaunchSpecificationProperty.Builder |
builder() |
default Object |
getBlockDeviceMappings()
One or more block devices that are mapped to the Spot Instances.
|
default Object |
getEbsOptimized()
Indicates whether the instances are optimized for EBS I/O.
|
default Object |
getIamInstanceProfile()
The IAM instance profile.
|
String |
getImageId()
The ID of the AMI.
|
default Object |
getInstanceRequirements()
The attributes for the instance types.
|
default String |
getInstanceType()
The instance type.
|
default String |
getKernelId()
The ID of the kernel.
|
default String |
getKeyName()
The name of the key pair.
|
default Object |
getMonitoring()
Enable or disable monitoring for the instances.
|
default Object |
getNetworkInterfaces()
One or more network interfaces.
|
default Object |
getPlacement()
The placement information.
|
default String |
getRamdiskId()
The ID of the RAM disk.
|
default Object |
getSecurityGroups()
One or more security groups.
|
default String |
getSpotPrice()
The maximum price per unit hour that you are willing to pay for a Spot Instance.
|
default String |
getSubnetId()
The IDs of the subnets in which to launch the instances.
|
default Object |
getTagSpecifications()
The tags to apply during creation.
|
default String |
getUserData()
The Base64-encoded user data that instances use when starting up.
|
default Number |
getWeightedCapacity()
The number of units provided by the specified instance type.
|
@Stability(value=Stable) @NotNull String getImageId()
@Stability(value=Stable) @Nullable default Object getBlockDeviceMappings()
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.
@Stability(value=Stable) @Nullable default Object getEbsOptimized()
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
@Stability(value=Stable) @Nullable default Object getIamInstanceProfile()
@Stability(value=Stable) @Nullable default Object getInstanceRequirements()
When you specify instance attributes, Amazon EC2 will identify instance types with those attributes.
If you specify
InstanceRequirements, you can't specifyInstanceTypes.
@Stability(value=Stable) @Nullable default String getInstanceType()
@Stability(value=Stable) @Nullable default String getKernelId()
@Stability(value=Stable) @Nullable default String getKeyName()
@Stability(value=Stable) @Nullable default Object getMonitoring()
@Stability(value=Stable) @Nullable default Object getNetworkInterfaces()
If you specify a network interface, you must specify subnet IDs and security group IDs using the network interface.
SpotFleetLaunchSpecificationcurrently does not support Elastic Fabric Adapter (EFA). To specify an EFA, you must use LaunchTemplateConfig .
@Stability(value=Stable) @Nullable default Object getPlacement()
@Stability(value=Stable) @Nullable default String getRamdiskId()
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.
@Stability(value=Stable) @Nullable default Object getSecurityGroups()
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.
@Stability(value=Stable) @Nullable default String getSpotPrice()
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 .
@Stability(value=Stable) @Nullable default String getSubnetId()
To specify multiple subnets, separate them using commas; for example, "subnet-1234abcdeexample1, subnet-0987cdef6example2".
@Stability(value=Stable) @Nullable default Object getTagSpecifications()
@Stability(value=Stable) @Nullable default String getUserData()
@Stability(value=Stable) @Nullable default Number getWeightedCapacity()
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.
@Stability(value=Stable) static CfnSpotFleet.SpotFleetLaunchSpecificationProperty.Builder builder()
Copyright © 2022. All rights reserved.