Interface CfnCapacityProvider.InstanceRequirementsRequestProperty
- All Superinterfaces:
software.amazon.jsii.JsiiSerializable
- All Known Implementing Classes:
CfnCapacityProvider.InstanceRequirementsRequestProperty.Jsii$Proxy
- Enclosing class:
CfnCapacityProvider
Instead of specifying exact instance types, you define requirements such as vCPU count, memory size, network performance, and accelerator specifications. Amazon ECS automatically selects Amazon EC2 instance types that match these requirements, providing flexibility and helping to mitigate capacity constraints.
Example:
// The code below shows an example of how to instantiate this type. // The values are placeholders you should change. import software.amazon.awscdk.services.ecs.*; InstanceRequirementsRequestProperty instanceRequirementsRequestProperty = InstanceRequirementsRequestProperty.builder() .memoryMiB(MemoryMiBRequestProperty.builder() .min(123) // the properties below are optional .max(123) .build()) .vCpuCount(VCpuCountRangeRequestProperty.builder() .min(123) // the properties below are optional .max(123) .build()) // the properties below are optional .acceleratorCount(AcceleratorCountRequestProperty.builder() .max(123) .min(123) .build()) .acceleratorManufacturers(List.of("acceleratorManufacturers")) .acceleratorNames(List.of("acceleratorNames")) .acceleratorTotalMemoryMiB(AcceleratorTotalMemoryMiBRequestProperty.builder() .max(123) .min(123) .build()) .acceleratorTypes(List.of("acceleratorTypes")) .allowedInstanceTypes(List.of("allowedInstanceTypes")) .bareMetal("bareMetal") .baselineEbsBandwidthMbps(BaselineEbsBandwidthMbpsRequestProperty.builder() .max(123) .min(123) .build()) .burstablePerformance("burstablePerformance") .cpuManufacturers(List.of("cpuManufacturers")) .excludedInstanceTypes(List.of("excludedInstanceTypes")) .instanceGenerations(List.of("instanceGenerations")) .localStorage("localStorage") .localStorageTypes(List.of("localStorageTypes")) .maxSpotPriceAsPercentageOfOptimalOnDemandPrice(123) .memoryGiBPerVCpu(MemoryGiBPerVCpuRequestProperty.builder() .max(123) .min(123) .build()) .networkBandwidthGbps(NetworkBandwidthGbpsRequestProperty.builder() .max(123) .min(123) .build()) .networkInterfaceCount(NetworkInterfaceCountRequestProperty.builder() .max(123) .min(123) .build()) .onDemandMaxPricePercentageOverLowestPrice(123) .requireHibernateSupport(false) .spotMaxPricePercentageOverLowestPrice(123) .totalLocalStorageGb(TotalLocalStorageGBRequestProperty.builder() .max(123) .min(123) .build()) .build();
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic final class
A builder forCfnCapacityProvider.InstanceRequirementsRequestProperty
static final class
An implementation forCfnCapacityProvider.InstanceRequirementsRequestProperty
-
Method Summary
Modifier and TypeMethodDescriptionbuilder()
default Object
The minimum and maximum number of accelerators for the instance types.The accelerator manufacturers to include.The specific accelerator names to include.default Object
The minimum and maximum total accelerator memory in mebibytes (MiB).The accelerator types to include.The instance types to include in the selection.default String
Indicates whether to include bare metal instance types.default Object
The minimum and maximum baseline Amazon EBS bandwidth in megabits per second (Mbps).default String
Indicates whether to include burstable performance instance types (T2, T3, T3a, T4g).The CPU manufacturers to include or exclude.The instance types to exclude from selection.The instance generations to include.default String
Indicates whether to include instance types with local storage.The local storage types to include.default Number
The maximum price for Spot instances as a percentage of the optimal On-Demand price.default Object
The minimum and maximum amount of memory per vCPU in gibibytes (GiB).The minimum and maximum amount of memory in mebibytes (MiB) for the instance types.default Object
The minimum and maximum network bandwidth in gigabits per second (Gbps).default Object
The minimum and maximum number of network interfaces for the instance types.default Number
The price protection threshold for On-Demand Instances, as a percentage higher than an identified On-Demand price.default Object
Indicates whether the instance types must support hibernation.default Number
The maximum price for Spot instances as a percentage over the lowest priced On-Demand instance.default Object
The minimum and maximum total local storage in gigabytes (GB) for instance types with local storage.The minimum and maximum number of vCPUs for the instance types.Methods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Method Details
-
getMemoryMiB
The minimum and maximum amount of memory in mebibytes (MiB) for the instance types.Amazon ECS selects instance types that have memory within this range.
- See Also:
-
getVCpuCount
The minimum and maximum number of vCPUs for the instance types.Amazon ECS selects instance types that have vCPU counts within this range.
- See Also:
-
getAcceleratorCount
The minimum and maximum number of accelerators for the instance types.This is used when you need instances with specific numbers of GPUs or other accelerators.
- See Also:
-
getAcceleratorManufacturers
The accelerator manufacturers to include.You can specify
nvidia
,amd
,amazon-web-services
, orxilinx
depending on your accelerator requirements.- See Also:
-
getAcceleratorNames
The specific accelerator names to include.For example, you can specify
a100
,v100
,k80
, or other specific accelerator models.- See Also:
-
getAcceleratorTotalMemoryMiB
The minimum and maximum total accelerator memory in mebibytes (MiB).This is important for GPU workloads that require specific amounts of video memory.
- See Also:
-
getAcceleratorTypes
The accelerator types to include.You can specify
gpu
for graphics processing units,fpga
for field programmable gate arrays, orinference
for machine learning inference accelerators.- See Also:
-
getAllowedInstanceTypes
The instance types to include in the selection.When specified, Amazon ECS only considers these instance types, subject to the other requirements specified.
- See Also:
-
getBareMetal
Indicates whether to include bare metal instance types.Set to
included
to allow bare metal instances,excluded
to exclude them, orrequired
to use only bare metal instances.- See Also:
-
getBaselineEbsBandwidthMbps
The minimum and maximum baseline Amazon EBS bandwidth in megabits per second (Mbps).This is important for workloads with high storage I/O requirements.
- See Also:
-
getBurstablePerformance
Indicates whether to include burstable performance instance types (T2, T3, T3a, T4g).Set to
included
to allow burstable instances,excluded
to exclude them, orrequired
to use only burstable instances.- See Also:
-
getCpuManufacturers
The CPU manufacturers to include or exclude.You can specify
intel
,amd
, oramazon-web-services
to control which CPU types are used for your workloads.- See Also:
-
getExcludedInstanceTypes
The instance types to exclude from selection.Use this to prevent Amazon ECS from selecting specific instance types that may not be suitable for your workloads.
- See Also:
-
getInstanceGenerations
The instance generations to include.You can specify
current
to use the latest generation instances, orprevious
to include previous generation instances for cost optimization.- See Also:
-
getLocalStorage
Indicates whether to include instance types with local storage.Set to
included
to allow local storage,excluded
to exclude it, orrequired
to use only instances with local storage.- See Also:
-
getLocalStorageTypes
The local storage types to include.You can specify
hdd
for hard disk drives,ssd
for solid state drives, or both.- See Also:
-
getMaxSpotPriceAsPercentageOfOptimalOnDemandPrice
The maximum price for Spot instances as a percentage of the optimal On-Demand price.This provides more precise cost control for Spot instance selection.
- See Also:
-
getMemoryGiBPerVCpu
The minimum and maximum amount of memory per vCPU in gibibytes (GiB).This helps ensure that instance types have the appropriate memory-to-CPU ratio for your workloads.
- See Also:
-
getNetworkBandwidthGbps
The minimum and maximum network bandwidth in gigabits per second (Gbps).This is crucial for network-intensive workloads that require high throughput.
- See Also:
-
getNetworkInterfaceCount
The minimum and maximum number of network interfaces for the instance types.This is useful for workloads that require multiple network interfaces.
- See Also:
-
getOnDemandMaxPricePercentageOverLowestPrice
The price protection threshold for On-Demand Instances, as a percentage higher than an identified On-Demand price.The identified On-Demand price is the price of the lowest priced current generation C, M, or R instance type with your specified attributes. If no current generation C, M, or R instance type matches your attributes, then the identified price is from either the lowest priced current generation instance types or, failing that, the lowest priced previous generation instance types that match your attributes. When Amazon ECS selects instance types with your attributes, we will exclude instance types whose price exceeds your specified threshold.
- See Also:
-
getRequireHibernateSupport
Indicates whether the instance types must support hibernation.When set to
true
, only instance types that support hibernation are selected.- See Also:
-
getSpotMaxPricePercentageOverLowestPrice
The maximum price for Spot instances as a percentage over the lowest priced On-Demand instance.This helps control Spot instance costs while maintaining access to capacity.
- See Also:
-
getTotalLocalStorageGb
The minimum and maximum total local storage in gigabytes (GB) for instance types with local storage.- See Also:
-
builder
-