interface CfnSpotFleetProps
Language | Type name |
---|---|
.NET | Amazon.CDK.AWS.EC2.CfnSpotFleetProps |
Java | software.amazon.awscdk.services.ec2.CfnSpotFleetProps |
Python | aws_cdk.aws_ec2.CfnSpotFleetProps |
TypeScript | @aws-cdk/aws-ec2 » CfnSpotFleetProps |
Properties for defining a CfnSpotFleet
.
Example
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import * as ec2 from '@aws-cdk/aws-ec2';
const cfnSpotFleetProps: ec2.CfnSpotFleetProps = {
spotFleetRequestConfigData: {
iamFleetRole: 'iamFleetRole',
targetCapacity: 123,
// the properties below are optional
allocationStrategy: 'allocationStrategy',
context: 'context',
excessCapacityTerminationPolicy: 'excessCapacityTerminationPolicy',
instanceInterruptionBehavior: 'instanceInterruptionBehavior',
instancePoolsToUseCount: 123,
launchSpecifications: [{
imageId: 'imageId',
// the properties below are optional
blockDeviceMappings: [{
deviceName: 'deviceName',
// the properties below are optional
ebs: {
deleteOnTermination: false,
encrypted: false,
iops: 123,
snapshotId: 'snapshotId',
volumeSize: 123,
volumeType: 'volumeType',
},
noDevice: 'noDevice',
virtualName: 'virtualName',
}],
ebsOptimized: false,
iamInstanceProfile: {
arn: 'arn',
},
instanceRequirements: {
acceleratorCount: {
max: 123,
min: 123,
},
acceleratorManufacturers: ['acceleratorManufacturers'],
acceleratorNames: ['acceleratorNames'],
acceleratorTotalMemoryMiB: {
max: 123,
min: 123,
},
acceleratorTypes: ['acceleratorTypes'],
allowedInstanceTypes: ['allowedInstanceTypes'],
bareMetal: 'bareMetal',
baselineEbsBandwidthMbps: {
max: 123,
min: 123,
},
burstablePerformance: 'burstablePerformance',
cpuManufacturers: ['cpuManufacturers'],
excludedInstanceTypes: ['excludedInstanceTypes'],
instanceGenerations: ['instanceGenerations'],
localStorage: 'localStorage',
localStorageTypes: ['localStorageTypes'],
memoryGiBPerVCpu: {
max: 123,
min: 123,
},
memoryMiB: {
max: 123,
min: 123,
},
networkBandwidthGbps: {
max: 123,
min: 123,
},
networkInterfaceCount: {
max: 123,
min: 123,
},
onDemandMaxPricePercentageOverLowestPrice: 123,
requireHibernateSupport: false,
spotMaxPricePercentageOverLowestPrice: 123,
totalLocalStorageGb: {
max: 123,
min: 123,
},
vCpuCount: {
max: 123,
min: 123,
},
},
instanceType: 'instanceType',
kernelId: 'kernelId',
keyName: 'keyName',
monitoring: {
enabled: false,
},
networkInterfaces: [{
associatePublicIpAddress: false,
deleteOnTermination: false,
description: 'description',
deviceIndex: 123,
groups: ['groups'],
ipv6AddressCount: 123,
ipv6Addresses: [{
ipv6Address: 'ipv6Address',
}],
networkInterfaceId: 'networkInterfaceId',
privateIpAddresses: [{
privateIpAddress: 'privateIpAddress',
// the properties below are optional
primary: false,
}],
secondaryPrivateIpAddressCount: 123,
subnetId: 'subnetId',
}],
placement: {
availabilityZone: 'availabilityZone',
groupName: 'groupName',
tenancy: 'tenancy',
},
ramdiskId: 'ramdiskId',
securityGroups: [{
groupId: 'groupId',
}],
spotPrice: 'spotPrice',
subnetId: 'subnetId',
tagSpecifications: [{
resourceType: 'resourceType',
tags: [{
key: 'key',
value: 'value',
}],
}],
userData: 'userData',
weightedCapacity: 123,
}],
launchTemplateConfigs: [{
launchTemplateSpecification: {
version: 'version',
// the properties below are optional
launchTemplateId: 'launchTemplateId',
launchTemplateName: 'launchTemplateName',
},
overrides: [{
availabilityZone: 'availabilityZone',
instanceRequirements: {
acceleratorCount: {
max: 123,
min: 123,
},
acceleratorManufacturers: ['acceleratorManufacturers'],
acceleratorNames: ['acceleratorNames'],
acceleratorTotalMemoryMiB: {
max: 123,
min: 123,
},
acceleratorTypes: ['acceleratorTypes'],
allowedInstanceTypes: ['allowedInstanceTypes'],
bareMetal: 'bareMetal',
baselineEbsBandwidthMbps: {
max: 123,
min: 123,
},
burstablePerformance: 'burstablePerformance',
cpuManufacturers: ['cpuManufacturers'],
excludedInstanceTypes: ['excludedInstanceTypes'],
instanceGenerations: ['instanceGenerations'],
localStorage: 'localStorage',
localStorageTypes: ['localStorageTypes'],
memoryGiBPerVCpu: {
max: 123,
min: 123,
},
memoryMiB: {
max: 123,
min: 123,
},
networkBandwidthGbps: {
max: 123,
min: 123,
},
networkInterfaceCount: {
max: 123,
min: 123,
},
onDemandMaxPricePercentageOverLowestPrice: 123,
requireHibernateSupport: false,
spotMaxPricePercentageOverLowestPrice: 123,
totalLocalStorageGb: {
max: 123,
min: 123,
},
vCpuCount: {
max: 123,
min: 123,
},
},
instanceType: 'instanceType',
priority: 123,
spotPrice: 'spotPrice',
subnetId: 'subnetId',
weightedCapacity: 123,
}],
}],
loadBalancersConfig: {
classicLoadBalancersConfig: {
classicLoadBalancers: [{
name: 'name',
}],
},
targetGroupsConfig: {
targetGroups: [{
arn: 'arn',
}],
},
},
onDemandAllocationStrategy: 'onDemandAllocationStrategy',
onDemandMaxTotalPrice: 'onDemandMaxTotalPrice',
onDemandTargetCapacity: 123,
replaceUnhealthyInstances: false,
spotMaintenanceStrategies: {
capacityRebalance: {
replacementStrategy: 'replacementStrategy',
terminationDelay: 123,
},
},
spotMaxTotalPrice: 'spotMaxTotalPrice',
spotPrice: 'spotPrice',
tagSpecifications: [{
resourceType: 'resourceType',
tags: [{
key: 'key',
value: 'value',
}],
}],
targetCapacityUnitType: 'targetCapacityUnitType',
terminateInstancesWithExpiration: false,
type: 'type',
validFrom: 'validFrom',
validUntil: 'validUntil',
},
};
Properties
Name | Type | Description |
---|---|---|
spot | IResolvable | Spot | Describes the configuration of a Spot Fleet request. |
spotFleetRequestConfigData
Type:
IResolvable
|
Spot
Describes the configuration of a Spot Fleet request.