Enum ComputeResourceType
- All Implemented Interfaces:
Serializable,Comparable<ComputeResourceType>,java.lang.constant.Constable
@Generated(value="jsii-pacmak/1.84.0 (build 5404dcf)",
date="2023-06-19T16:30:47.654Z")
@Stability(Experimental)
public enum ComputeResourceType
extends Enum<ComputeResourceType>
(experimental) Property to specify if the compute environment uses On-Demand, SpotFleet, Fargate, or Fargate Spot compute resources.
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();
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescription(experimental) Resources will be Fargate resources.(experimental) Resources will be Fargate Spot resources.(experimental) Resources will be EC2 On-Demand resources.(experimental) Resources will be EC2 SpotFleet resources. -
Method Summary
Modifier and TypeMethodDescriptionstatic ComputeResourceTypeReturns 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.
-
Enum Constant Details
-
ON_DEMAND
(experimental) Resources will be EC2 On-Demand resources. -
SPOT
(experimental) Resources will be EC2 SpotFleet resources. -
FARGATE
(experimental) Resources will be Fargate resources. -
FARGATE_SPOT
(experimental) Resources will be Fargate Spot resources.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.
-
-
Method Details
-
values
Returns an array containing the constants of this enum type, in the order they are declared.- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum type has no constant with the specified nameNullPointerException- if the argument is null
-