@Generated(value="jsii-pacmak/1.58.0 (build f8ba112)", date="2022-05-11T19:24:25.388Z") @Stability(value=Experimental) public enum ComputeResourceType extends Enum<ComputeResourceType>
Example:
Vpc vpc = new Vpc(this, "VPC");
ComputeEnvironment spotEnvironment = ComputeEnvironment.Builder.create(this, "MySpotEnvironment")
.computeResources(ComputeResources.builder()
.type(ComputeResourceType.SPOT)
.bidPercentage(75) // Bids for resources at 75% of the on-demand price
.vpc(vpc)
.build())
.build();
| Enum Constant and Description |
|---|
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.
|
| Modifier and Type | Method and Description |
|---|---|
static ComputeResourceType |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static ComputeResourceType[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
@Stability(value=Experimental) public static final ComputeResourceType ON_DEMAND
@Stability(value=Experimental) public static final ComputeResourceType SPOT
@Stability(value=Experimental) public static final ComputeResourceType FARGATE
@Stability(value=Experimental) public static final ComputeResourceType FARGATE_SPOT
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.
public static ComputeResourceType[] values()
for (ComputeResourceType c : ComputeResourceType.values()) System.out.println(c);
public static ComputeResourceType valueOf(String name)
name - the name of the enum constant to be returned.IllegalArgumentException - if this enum type has no constant with the specified nameNullPointerException - if the argument is nullCopyright © 2022. All rights reserved.