Interface CfnEC2Fleet.IFleetLaunchTemplateOverridesRequestProperty
Specifies overrides for a launch template for an EC2 Fleet.
Namespace: Amazon.CDK.AWS.EC2
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public interface IFleetLaunchTemplateOverridesRequestProperty
Syntax (vb)
Public Interface IFleetLaunchTemplateOverridesRequestProperty
Remarks
FleetLaunchTemplateOverridesRequest
is a property of the FleetLaunchTemplateConfigRequest property type.
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 fleetLaunchTemplateOverridesRequestProperty = new FleetLaunchTemplateOverridesRequestProperty {
AvailabilityZone = "availabilityZone",
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
},
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,
RequireHibernateSupport = false,
SpotMaxPricePercentageOverLowestPrice = 123,
TotalLocalStorageGb = new TotalLocalStorageGBRequestProperty {
Max = 123,
Min = 123
},
VCpuCount = new VCpuCountRangeRequestProperty {
Max = 123,
Min = 123
}
},
InstanceType = "instanceType",
MaxPrice = "maxPrice",
Placement = new PlacementProperty {
Affinity = "affinity",
AvailabilityZone = "availabilityZone",
GroupName = "groupName",
HostId = "hostId",
HostResourceGroupArn = "hostResourceGroupArn",
PartitionNumber = 123,
SpreadDomain = "spreadDomain",
Tenancy = "tenancy"
},
Priority = 123,
SubnetId = "subnetId",
WeightedCapacity = 123
};
Synopsis
Properties
AvailabilityZone | The Availability Zone in which to launch the instances. |
InstanceRequirements | The attributes for the instance types. |
InstanceType | The instance type. |
MaxPrice | The maximum price per unit hour that you are willing to pay for a Spot Instance. |
Placement | The location where the instance launched, if applicable. |
Priority | The priority for the launch template override. The highest priority is launched first. |
SubnetId | The IDs of the subnets in which to launch the instances. |
WeightedCapacity | The number of units provided by the specified instance type. |
Properties
AvailabilityZone
The Availability Zone in which to launch the instances.
virtual string AvailabilityZone { get; }
Property Value
System.String
Remarks
InstanceRequirements
The attributes for the instance types.
virtual object InstanceRequirements { get; }
Property Value
System.Object
Remarks
When you specify instance attributes, Amazon EC2 will identify instance types with those attributes.
If you specify InstanceRequirements
, you can't specify InstanceType
.
InstanceType
The instance type.
virtual string InstanceType { get; }
Property Value
System.String
Remarks
mac1.metal
is not supported as a launch template override.
If you specify <code>InstanceType</code> , you can't specify <code>InstanceRequirements</code> .
MaxPrice
The maximum price per unit hour that you are willing to pay for a Spot Instance.
virtual string MaxPrice { get; }
Property Value
System.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.
Placement
The location where the instance launched, if applicable.
virtual object Placement { get; }
Property Value
System.Object
Remarks
Priority
The priority for the launch template override. The highest priority is launched first.
virtual Nullable<double> Priority { get; }
Property Value
System.Nullable<System.Double>
Remarks
If the On-Demand AllocationStrategy
is set to prioritized
, EC2 Fleet uses priority to determine which launch template override to use first in fulfilling On-Demand capacity.
If the Spot AllocationStrategy
is set to capacity-optimized-prioritized
, EC2 Fleet uses priority on a best-effort basis to determine which launch template override to use in fulfilling Spot capacity, but optimizes for capacity first.
Valid values are whole numbers starting at 0
. The lower the number, the higher the priority. If no number is set, the launch template override has the lowest priority. You can set the same priority for different launch template overrides.
SubnetId
The IDs of the subnets in which to launch the instances.
virtual string SubnetId { get; }
Property Value
System.String
Remarks
Separate multiple subnet IDs using commas (for example, subnet-1234abcdeexample1, subnet-0987cdef6example2
). A request of type instant
can have only one subnet ID.
WeightedCapacity
The number of units provided by the specified instance type.
virtual Nullable<double> WeightedCapacity { get; }
Property Value
System.Nullable<System.Double>
Remarks
When specifying weights, the price used in the lowest-price
and price-capacity-optimized
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.