Class ComputeResourceType
(experimental) Property to specify if the compute environment uses On-Demand, SpotFleet, Fargate, or Fargate Spot compute resources.
Inheritance
Namespace: Amazon.CDK.AWS.Batch
Assembly: Amazon.CDK.AWS.Batch.dll
Syntax (csharp)
public sealed class ComputeResourceType : Enum
Syntax (vb)
Public NotInheritable Class ComputeResourceType
Inherits
Enum
Remarks
Stability: Experimental
ExampleMetadata: infused
Examples
var vpc = new Vpc(this, "VPC");
var spotEnvironment = new ComputeEnvironment(this, "MySpotEnvironment", new ComputeEnvironmentProps {
ComputeResources = new ComputeResources {
Type = ComputeResourceType.SPOT,
BidPercentage = 75, // Bids for resources at 75% of the on-demand price
Vpc = vpc
}
});
Synopsis
Fields
FARGATE | (experimental) Resources will be Fargate resources. |
FARGATE_SPOT | (experimental) Resources will be Fargate Spot resources. |
ON_DEMAND | (experimental) Resources will be EC2 On-Demand resources. |
SPOT | (experimental) Resources will be EC2 SpotFleet resources. |
value__ |
Fields
FARGATE
(experimental) Resources will be Fargate resources.
public const ComputeResourceType FARGATE
Field Value
Type | Description |
---|---|
ComputeResourceType |
Remarks
Stability: Experimental
FARGATE_SPOT
(experimental) Resources will be Fargate Spot resources.
public const ComputeResourceType FARGATE_SPOT
Field Value
Type | Description |
---|---|
ComputeResourceType |
Remarks
Fargate Spot uses spare capacity in the AWS cloud to run your fault-tolerant, time-flexible jobs at up to a 70% discount. If AWS needs the resources back, jobs running on Fargate Spot will be interrupted with two minutes of notification.
Stability: Experimental
ON_DEMAND
(experimental) Resources will be EC2 On-Demand resources.
public const ComputeResourceType ON_DEMAND
Field Value
Type | Description |
---|---|
ComputeResourceType |
Remarks
Stability: Experimental
SPOT
(experimental) Resources will be EC2 SpotFleet resources.
public const ComputeResourceType SPOT
Field Value
Type | Description |
---|---|
ComputeResourceType |
Remarks
Stability: Experimental
value__
public int value__
Field Value
Type | Description |
---|---|
System.Int32 |