Class EmrCreateCluster.OnDemandAllocationStrategy
On-Demand Allocation Strategies.
Inheritance
System.Object
EmrCreateCluster.OnDemandAllocationStrategy
Namespace: Amazon.CDK.AWS.StepFunctions.Tasks
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public sealed class OnDemandAllocationStrategy : Enum
Syntax (vb)
Public NotInheritable Class OnDemandAllocationStrategy
Inherits
Enum
Remarks
Specifies the strategy to use in launching On-Demand instance fleets. Currently, the only option is "lowest-price" (the default), which launches the lowest price first.
ExampleMetadata: infused
Examples
new EmrCreateCluster(this, "OnDemandSpecification", new EmrCreateClusterProps {
Instances = new InstancesConfigProperty {
InstanceFleets = new [] { new InstanceFleetConfigProperty {
InstanceFleetType = EmrCreateCluster.InstanceRoleType.MASTER,
LaunchSpecifications = new InstanceFleetProvisioningSpecificationsProperty {
OnDemandSpecification = new OnDemandProvisioningSpecificationProperty {
AllocationStrategy = EmrCreateCluster.OnDemandAllocationStrategy.LOWEST_PRICE
}
}
} }
},
Name = "OnDemandCluster",
IntegrationPattern = IntegrationPattern.RUN_JOB
});
new EmrCreateCluster(this, "SpotSpecification", new EmrCreateClusterProps {
Instances = new InstancesConfigProperty {
InstanceFleets = new [] { new InstanceFleetConfigProperty {
InstanceFleetType = EmrCreateCluster.InstanceRoleType.MASTER,
LaunchSpecifications = new InstanceFleetProvisioningSpecificationsProperty {
SpotSpecification = new SpotProvisioningSpecificationProperty {
AllocationStrategy = EmrCreateCluster.SpotAllocationStrategy.CAPACITY_OPTIMIZED,
TimeoutAction = EmrCreateCluster.SpotTimeoutAction.TERMINATE_CLUSTER,
Timeout = Duration.Minutes(5)
}
}
} }
},
Name = "SpotCluster",
IntegrationPattern = IntegrationPattern.RUN_JOB
});
Synopsis
Fields
LOWEST_PRICE | Lowest-price, which launches instances from the lowest priced pool that has available capacity. |
value__ |
Fields
LOWEST_PRICE
Lowest-price, which launches instances from the lowest priced pool that has available capacity.
public const EmrCreateCluster.OnDemandAllocationStrategy LOWEST_PRICE
Field Value
Type | Description |
---|---|
EmrCreateCluster.OnDemandAllocationStrategy |
value__
public int value__
Field Value
Type | Description |
---|---|
System.Int32 |