Class CfnEC2Fleet.OnDemandOptionsRequestProperty
Specifies the allocation strategy of On-Demand Instances in an EC2 Fleet.
Inheritance
Implements
Namespace: Amazon.CDK.AWS.EC2
Assembly: Amazon.CDK.AWS.EC2.dll
Syntax (csharp)
public class OnDemandOptionsRequestProperty : Object, CfnEC2Fleet.IOnDemandOptionsRequestProperty
Syntax (vb)
Public Class OnDemandOptionsRequestProperty
Inherits Object
Implements CfnEC2Fleet.IOnDemandOptionsRequestProperty
Remarks
OnDemandOptionsRequest
is a property of the AWS::EC2::EC2Fleet resource.
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 onDemandOptionsRequestProperty = new OnDemandOptionsRequestProperty {
AllocationStrategy = "allocationStrategy",
CapacityReservationOptions = new CapacityReservationOptionsRequestProperty {
UsageStrategy = "usageStrategy"
},
MaxTotalPrice = "maxTotalPrice",
MinTargetCapacity = 123,
SingleAvailabilityZone = false,
SingleInstanceType = false
};
Synopsis
Constructors
OnDemandOptionsRequestProperty() |
Properties
AllocationStrategy | The strategy that determines the order of the launch template overrides to use in fulfilling On-Demand capacity. |
CapacityReservationOptions | The strategy for using unused Capacity Reservations for fulfilling On-Demand capacity. |
MaxTotalPrice | The maximum amount per hour for On-Demand Instances that you're willing to pay. |
MinTargetCapacity | The minimum target capacity for On-Demand Instances in the fleet. |
SingleAvailabilityZone | Indicates that the fleet launches all On-Demand Instances into a single Availability Zone. |
SingleInstanceType | Indicates that the fleet uses a single instance type to launch all On-Demand Instances in the fleet. |
Constructors
OnDemandOptionsRequestProperty()
public OnDemandOptionsRequestProperty()
Properties
AllocationStrategy
The strategy that determines the order of the launch template overrides to use in fulfilling On-Demand capacity.
public string AllocationStrategy { get; set; }
Property Value
System.String
Remarks
lowest-price
- EC2 Fleet uses price to determine the order, launching the lowest price first.
prioritized
- EC2 Fleet uses the priority that you assigned to each launch template override, launching the highest priority first.
Default: lowest-price
CapacityReservationOptions
The strategy for using unused Capacity Reservations for fulfilling On-Demand capacity.
public object CapacityReservationOptions { get; set; }
Property Value
System.Object
Remarks
Supported only for fleets of type instant
.
MaxTotalPrice
The maximum amount per hour for On-Demand Instances that you're willing to pay.
public string MaxTotalPrice { get; set; }
Property Value
System.String
Remarks
MinTargetCapacity
The minimum target capacity for On-Demand Instances in the fleet.
public Nullable<double> MinTargetCapacity { get; set; }
Property Value
System.Nullable<System.Double>
Remarks
If the minimum target capacity is not reached, the fleet launches no instances.
Supported only for fleets of type instant
.
At least one of the following must be specified: SingleAvailabilityZone
| SingleInstanceType
SingleAvailabilityZone
Indicates that the fleet launches all On-Demand Instances into a single Availability Zone.
public object SingleAvailabilityZone { get; set; }
Property Value
System.Object
Remarks
Supported only for fleets of type instant
.
SingleInstanceType
Indicates that the fleet uses a single instance type to launch all On-Demand Instances in the fleet.
public object SingleInstanceType { get; set; }
Property Value
System.Object
Remarks
Supported only for fleets of type instant
.