Show / Hide Table of Contents

Interface CfnSpotFleet.ISpotFleetLaunchSpecificationProperty

Specifies the launch specification for one or more Spot Instances.

Namespace: Amazon.CDK.AWS.EC2
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public interface CfnSpotFleet.ISpotFleetLaunchSpecificationProperty
Syntax (vb)
Public Interface CfnSpotFleet.ISpotFleetLaunchSpecificationProperty
Remarks

If you include On-Demand capacity in your fleet request, you can't use SpotFleetLaunchSpecification ; you must use LaunchTemplateConfig .

See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-spotfleet-spotfleetlaunchspecification.html

ExampleMetadata: fixture=_generated

Examples
// The code below shows an example of how to instantiate this type.
             // The values are placeholders you should change.
             using Amazon.CDK.AWS.EC2;

             var spotFleetLaunchSpecificationProperty = new SpotFleetLaunchSpecificationProperty {
                 ImageId = "imageId",

                 // the properties below are optional
                 BlockDeviceMappings = new [] { new BlockDeviceMappingProperty {
                     DeviceName = "deviceName",

                     // the properties below are optional
                     Ebs = new EbsBlockDeviceProperty {
                         DeleteOnTermination = false,
                         Encrypted = false,
                         Iops = 123,
                         SnapshotId = "snapshotId",
                         VolumeSize = 123,
                         VolumeType = "volumeType"
                     },
                     NoDevice = "noDevice",
                     VirtualName = "virtualName"
                 } },
                 EbsOptimized = false,
                 IamInstanceProfile = new IamInstanceProfileSpecificationProperty {
                     Arn = "arn"
                 },
                 InstanceRequirements = new InstanceRequirementsRequestProperty {
                     AcceleratorCount = new AcceleratorCountRequestProperty {
                         Max = 123,
                         Min = 123
                     },
                     AcceleratorManufacturers = new [] { "acceleratorManufacturers" },
                     AcceleratorNames = new [] { "acceleratorNames" },
                     AcceleratorTotalMemoryMiB = new AcceleratorTotalMemoryMiBRequestProperty {
                         Max = 123,
                         Min = 123
                     },
                     AcceleratorTypes = new [] { "acceleratorTypes" },
                     AllowedInstanceTypes = new [] { "allowedInstanceTypes" },
                     BareMetal = "bareMetal",
                     BaselineEbsBandwidthMbps = new BaselineEbsBandwidthMbpsRequestProperty {
                         Max = 123,
                         Min = 123
                     },
                     BaselinePerformanceFactors = new BaselinePerformanceFactorsRequestProperty {
                         Cpu = new CpuPerformanceFactorRequestProperty {
                             References = new [] { new PerformanceFactorReferenceRequestProperty {
                                 InstanceFamily = "instanceFamily"
                             } }
                         }
                     },
                     BurstablePerformance = "burstablePerformance",
                     CpuManufacturers = new [] { "cpuManufacturers" },
                     ExcludedInstanceTypes = new [] { "excludedInstanceTypes" },
                     InstanceGenerations = new [] { "instanceGenerations" },
                     LocalStorage = "localStorage",
                     LocalStorageTypes = new [] { "localStorageTypes" },
                     MaxSpotPriceAsPercentageOfOptimalOnDemandPrice = 123,
                     MemoryGiBPerVCpu = new MemoryGiBPerVCpuRequestProperty {
                         Max = 123,
                         Min = 123
                     },
                     MemoryMiB = new MemoryMiBRequestProperty {
                         Max = 123,
                         Min = 123
                     },
                     NetworkBandwidthGbps = new NetworkBandwidthGbpsRequestProperty {
                         Max = 123,
                         Min = 123
                     },
                     NetworkInterfaceCount = new NetworkInterfaceCountRequestProperty {
                         Max = 123,
                         Min = 123
                     },
                     OnDemandMaxPricePercentageOverLowestPrice = 123,
                     RequireEncryptionInTransit = false,
                     RequireHibernateSupport = false,
                     SpotMaxPricePercentageOverLowestPrice = 123,
                     TotalLocalStorageGb = new TotalLocalStorageGBRequestProperty {
                         Max = 123,
                         Min = 123
                     },
                     VCpuCount = new VCpuCountRangeRequestProperty {
                         Max = 123,
                         Min = 123
                     }
                 },
                 InstanceType = "instanceType",
                 KernelId = "kernelId",
                 KeyName = "keyName",
                 Monitoring = new SpotFleetMonitoringProperty {
                     Enabled = false
                 },
                 NetworkInterfaces = new [] { new InstanceNetworkInterfaceSpecificationProperty {
                     AssociatePublicIpAddress = false,
                     DeleteOnTermination = false,
                     Description = "description",
                     DeviceIndex = 123,
                     Groups = new [] { "groups" },
                     Ipv6AddressCount = 123,
                     Ipv6Addresses = new [] { new InstanceIpv6AddressProperty {
                         Ipv6Address = "ipv6Address"
                     } },
                     NetworkInterfaceId = "networkInterfaceId",
                     PrivateIpAddresses = new [] { new PrivateIpAddressSpecificationProperty {
                         PrivateIpAddress = "privateIpAddress",

                         // the properties below are optional
                         Primary = false
                     } },
                     SecondaryPrivateIpAddressCount = 123,
                     SubnetId = "subnetId"
                 } },
                 Placement = new SpotPlacementProperty {
                     AvailabilityZone = "availabilityZone",
                     AvailabilityZoneId = "availabilityZoneId",
                     GroupName = "groupName",
                     Tenancy = "tenancy"
                 },
                 RamdiskId = "ramdiskId",
                 SecurityGroups = new [] { new GroupIdentifierProperty {
                     GroupId = "groupId"
                 } },
                 SpotPrice = "spotPrice",
                 SubnetId = "subnetId",
                 TagSpecifications = new [] { new SpotFleetTagSpecificationProperty {
                     ResourceType = "resourceType",
                     Tags = new [] { new CfnTag {
                         Key = "key",
                         Value = "value"
                     } }
                 } },
                 UserData = "userData",
                 WeightedCapacity = 123
             };

Synopsis

Properties

BlockDeviceMappings

One or more block devices that are mapped to the Spot Instances.

EbsOptimized

Indicates whether the instances are optimized for EBS I/O.

IamInstanceProfile

The IAM instance profile.

ImageId

The ID of the AMI.

InstanceRequirements

The attributes for the instance types.

InstanceType

The instance type.

KernelId

The ID of the kernel.

KeyName

The name of the key pair.

Monitoring

Enable or disable monitoring for the instances.

NetworkInterfaces

The network interfaces.

Placement

The placement information.

RamdiskId

The ID of the RAM disk.

SecurityGroups

The security groups.

SpotPrice

The maximum price per unit hour that you are willing to pay for a Spot Instance.

SubnetId

The IDs of the subnets in which to launch the instances.

TagSpecifications

The tags to apply during creation.

UserData

The base64-encoded user data that instances use when starting up.

WeightedCapacity

The number of units provided by the specified instance type.

Properties

BlockDeviceMappings

One or more block devices that are mapped to the Spot Instances.

object? BlockDeviceMappings { get; }
Property Value

object

Remarks

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.

See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-spotfleet-spotfleetlaunchspecification.html#cfn-ec2-spotfleet-spotfleetlaunchspecification-blockdevicemappings

Type union: either IResolvable or (either IResolvable or CfnSpotFleet.IBlockDeviceMappingProperty)[]

EbsOptimized

Indicates whether the instances are optimized for EBS I/O.

object? EbsOptimized { get; }
Property Value

object

Remarks

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

See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-spotfleet-spotfleetlaunchspecification.html#cfn-ec2-spotfleet-spotfleetlaunchspecification-ebsoptimized

Type union: either bool or IResolvable

IamInstanceProfile

The IAM instance profile.

object? IamInstanceProfile { get; }
Property Value

object

Remarks

See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-spotfleet-spotfleetlaunchspecification.html#cfn-ec2-spotfleet-spotfleetlaunchspecification-iaminstanceprofile

Type union: either IResolvable or CfnSpotFleet.IIamInstanceProfileSpecificationProperty

ImageId

The ID of the AMI.

string ImageId { get; }
Property Value

string

Remarks

See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-spotfleet-spotfleetlaunchspecification.html#cfn-ec2-spotfleet-spotfleetlaunchspecification-imageid

InstanceRequirements

The attributes for the instance types.

object? InstanceRequirements { get; }
Property Value

object

Remarks

When you specify instance attributes, Amazon EC2 will identify instance types with those attributes.

If you specify <code>InstanceRequirements</code> , you can't specify <code>InstanceType</code> .

See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-spotfleet-spotfleetlaunchspecification.html#cfn-ec2-spotfleet-spotfleetlaunchspecification-instancerequirements

Type union: either IResolvable or CfnSpotFleet.IInstanceRequirementsRequestProperty

InstanceType

The instance type.

string? InstanceType { get; }
Property Value

string

Remarks

See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-spotfleet-spotfleetlaunchspecification.html#cfn-ec2-spotfleet-spotfleetlaunchspecification-instancetype

KernelId

The ID of the kernel.

string? KernelId { get; }
Property Value

string

Remarks

See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-spotfleet-spotfleetlaunchspecification.html#cfn-ec2-spotfleet-spotfleetlaunchspecification-kernelid

KeyName

The name of the key pair.

string? KeyName { get; }
Property Value

string

Remarks

See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-spotfleet-spotfleetlaunchspecification.html#cfn-ec2-spotfleet-spotfleetlaunchspecification-keyname

Monitoring

Enable or disable monitoring for the instances.

object? Monitoring { get; }
Property Value

object

Remarks

See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-spotfleet-spotfleetlaunchspecification.html#cfn-ec2-spotfleet-spotfleetlaunchspecification-monitoring

Type union: either IResolvable or CfnSpotFleet.ISpotFleetMonitoringProperty

NetworkInterfaces

The network interfaces.

object? NetworkInterfaces { get; }
Property Value

object

Remarks

See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-spotfleet-spotfleetlaunchspecification.html#cfn-ec2-spotfleet-spotfleetlaunchspecification-networkinterfaces

Type union: either IResolvable or (either IResolvable or CfnSpotFleet.IInstanceNetworkInterfaceSpecificationProperty)[]

Placement

The placement information.

object? Placement { get; }
Property Value

object

Remarks

See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-spotfleet-spotfleetlaunchspecification.html#cfn-ec2-spotfleet-spotfleetlaunchspecification-placement

Type union: either IResolvable or CfnSpotFleet.ISpotPlacementProperty

RamdiskId

The ID of the RAM disk.

string? RamdiskId { get; }
Property Value

string

Remarks

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.

See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-spotfleet-spotfleetlaunchspecification.html#cfn-ec2-spotfleet-spotfleetlaunchspecification-ramdiskid

SecurityGroups

The security groups.

object? SecurityGroups { get; }
Property Value

object

Remarks

If you specify a network interface, you must specify any security groups as part of the network interface instead of using this parameter.

See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-spotfleet-spotfleetlaunchspecification.html#cfn-ec2-spotfleet-spotfleetlaunchspecification-securitygroups

Type union: either IResolvable or (either IResolvable or CfnSpotFleet.IGroupIdentifierProperty)[]

SpotPrice

The maximum price per unit hour that you are willing to pay for a Spot Instance.

string? SpotPrice { get; }
Property Value

string

Remarks

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.

See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-spotfleet-spotfleetlaunchspecification.html#cfn-ec2-spotfleet-spotfleetlaunchspecification-spotprice

SubnetId

The IDs of the subnets in which to launch the instances.

string? SubnetId { get; }
Property Value

string

Remarks

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.

See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-spotfleet-spotfleetlaunchspecification.html#cfn-ec2-spotfleet-spotfleetlaunchspecification-subnetid

TagSpecifications

The tags to apply during creation.

object? TagSpecifications { get; }
Property Value

object

Remarks

See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-spotfleet-spotfleetlaunchspecification.html#cfn-ec2-spotfleet-spotfleetlaunchspecification-tagspecifications

Type union: either IResolvable or (either IResolvable or CfnSpotFleet.ISpotFleetTagSpecificationProperty)[]

UserData

The base64-encoded user data that instances use when starting up.

string? UserData { get; }
Property Value

string

Remarks

User data is limited to 16 KB.

See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-spotfleet-spotfleetlaunchspecification.html#cfn-ec2-spotfleet-spotfleetlaunchspecification-userdata

WeightedCapacity

The number of units provided by the specified instance type.

double? WeightedCapacity { get; }
Property Value

double?

Remarks

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 <code>lowestPrice</code> and <code>priceCapacityOptimized</code> allocation strategies is per <em>unit</em> hour (where the instance price is divided by the specified weight). However, if all the specified weights are above the requested <code>TargetCapacity</code> , resulting in only 1 instance being launched, the price used is per <em>instance</em> hour.

See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-spotfleet-spotfleetlaunchspecification.html#cfn-ec2-spotfleet-spotfleetlaunchspecification-weightedcapacity

Back to top Generated by DocFX