aws-cdk-lib.aws_ec2.CfnEC2Fleet.TargetCapacitySpecificationRequestProperty

interface TargetCapacitySpecificationRequestProperty

LanguageType name
.NETAmazon.CDK.AWS.EC2.CfnEC2Fleet.TargetCapacitySpecificationRequestProperty
Gogithub.com/aws/aws-cdk-go/awscdk/v2/awsec2#CfnEC2Fleet_TargetCapacitySpecificationRequestProperty
Javasoftware.amazon.awscdk.services.ec2.CfnEC2Fleet.TargetCapacitySpecificationRequestProperty
Pythonaws_cdk.aws_ec2.CfnEC2Fleet.TargetCapacitySpecificationRequestProperty
TypeScript aws-cdk-lib » aws_ec2 » CfnEC2Fleet » TargetCapacitySpecificationRequestProperty

Specifies the number of units to request for an EC2 Fleet.

You can choose to set the target capacity in terms of instances or a performance characteristic that is important to your application workload, such as vCPUs, memory, or I/O. If the request type is maintain , you can specify a target capacity of 0 and add capacity later.

TargetCapacitySpecificationRequest is a property of the AWS::EC2::EC2Fleet resource.

Example

// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_ec2 as ec2 } from 'aws-cdk-lib';
const targetCapacitySpecificationRequestProperty: ec2.CfnEC2Fleet.TargetCapacitySpecificationRequestProperty = {
  totalTargetCapacity: 123,

  // the properties below are optional
  defaultTargetCapacityType: 'defaultTargetCapacityType',
  onDemandTargetCapacity: 123,
  spotTargetCapacity: 123,
  targetCapacityUnitType: 'targetCapacityUnitType',
};

Properties

NameTypeDescription
totalTargetCapacitynumberThe number of units to request, filled using DefaultTargetCapacityType .
defaultTargetCapacityType?stringThe default TotalTargetCapacity , which is either Spot or On-Demand .
onDemandTargetCapacity?numberThe number of On-Demand units to request.
spotTargetCapacity?numberThe number of Spot units to request.
targetCapacityUnitType?stringThe unit for the target capacity. TargetCapacityUnitType can only be specified when InstanceRequirements is specified.

totalTargetCapacity

Type: number

The number of units to request, filled using DefaultTargetCapacityType .


defaultTargetCapacityType?

Type: string (optional)

The default TotalTargetCapacity , which is either Spot or On-Demand .


onDemandTargetCapacity?

Type: number (optional)

The number of On-Demand units to request.


spotTargetCapacity?

Type: number (optional)

The number of Spot units to request.


targetCapacityUnitType?

Type: string (optional)

The unit for the target capacity. TargetCapacityUnitType can only be specified when InstanceRequirements is specified.

Default: units (translates to number of instances)