Class CfnCapacityProvider.InstanceRequirementsRequestProperty.Builder
java.lang.Object
software.amazon.awscdk.services.ecs.CfnCapacityProvider.InstanceRequirementsRequestProperty.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<CfnCapacityProvider.InstanceRequirementsRequestProperty>
- Enclosing interface:
CfnCapacityProvider.InstanceRequirementsRequestProperty
@Stability(Stable)
public static final class CfnCapacityProvider.InstanceRequirementsRequestProperty.Builder
extends Object
implements software.amazon.jsii.Builder<CfnCapacityProvider.InstanceRequirementsRequestProperty>
A builder for
CfnCapacityProvider.InstanceRequirementsRequestProperty-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionacceleratorCount(IResolvable acceleratorCount) acceleratorCount(CfnCapacityProvider.AcceleratorCountRequestProperty acceleratorCount) acceleratorManufacturers(List<String> acceleratorManufacturers) acceleratorNames(List<String> acceleratorNames) acceleratorTotalMemoryMiB(IResolvable acceleratorTotalMemoryMiB) acceleratorTotalMemoryMiB(CfnCapacityProvider.AcceleratorTotalMemoryMiBRequestProperty acceleratorTotalMemoryMiB) acceleratorTypes(List<String> acceleratorTypes) allowedInstanceTypes(List<String> allowedInstanceTypes) Sets the value ofCfnCapacityProvider.InstanceRequirementsRequestProperty.getBareMetal()baselineEbsBandwidthMbps(IResolvable baselineEbsBandwidthMbps) baselineEbsBandwidthMbps(CfnCapacityProvider.BaselineEbsBandwidthMbpsRequestProperty baselineEbsBandwidthMbps) build()Builds the configured instance.burstablePerformance(String burstablePerformance) cpuManufacturers(List<String> cpuManufacturers) excludedInstanceTypes(List<String> excludedInstanceTypes) instanceGenerations(List<String> instanceGenerations) localStorage(String localStorage) localStorageTypes(List<String> localStorageTypes) maxSpotPriceAsPercentageOfOptimalOnDemandPrice(Number maxSpotPriceAsPercentageOfOptimalOnDemandPrice) memoryGiBPerVCpu(IResolvable memoryGiBPerVCpu) memoryGiBPerVCpu(CfnCapacityProvider.MemoryGiBPerVCpuRequestProperty memoryGiBPerVCpu) memoryMiB(IResolvable memoryMiB) Sets the value ofCfnCapacityProvider.InstanceRequirementsRequestProperty.getMemoryMiB()Sets the value ofCfnCapacityProvider.InstanceRequirementsRequestProperty.getMemoryMiB()networkBandwidthGbps(IResolvable networkBandwidthGbps) networkBandwidthGbps(CfnCapacityProvider.NetworkBandwidthGbpsRequestProperty networkBandwidthGbps) networkInterfaceCount(IResolvable networkInterfaceCount) networkInterfaceCount(CfnCapacityProvider.NetworkInterfaceCountRequestProperty networkInterfaceCount) onDemandMaxPricePercentageOverLowestPrice(Number onDemandMaxPricePercentageOverLowestPrice) requireHibernateSupport(Boolean requireHibernateSupport) requireHibernateSupport(IResolvable requireHibernateSupport) spotMaxPricePercentageOverLowestPrice(Number spotMaxPricePercentageOverLowestPrice) totalLocalStorageGb(IResolvable totalLocalStorageGb) totalLocalStorageGb(CfnCapacityProvider.TotalLocalStorageGBRequestProperty totalLocalStorageGb) vCpuCount(IResolvable vCpuCount) Sets the value ofCfnCapacityProvider.InstanceRequirementsRequestProperty.getVCpuCount()Sets the value ofCfnCapacityProvider.InstanceRequirementsRequestProperty.getVCpuCount()
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
memoryMiB
@Stability(Stable) public CfnCapacityProvider.InstanceRequirementsRequestProperty.Builder memoryMiB(IResolvable memoryMiB) Sets the value ofCfnCapacityProvider.InstanceRequirementsRequestProperty.getMemoryMiB()- Parameters:
memoryMiB- The minimum and maximum amount of memory in mebibytes (MiB) for the instance types. This parameter is required. Amazon ECS selects instance types that have memory within this range.- Returns:
this
-
memoryMiB
@Stability(Stable) public CfnCapacityProvider.InstanceRequirementsRequestProperty.Builder memoryMiB(CfnCapacityProvider.MemoryMiBRequestProperty memoryMiB) Sets the value ofCfnCapacityProvider.InstanceRequirementsRequestProperty.getMemoryMiB()- Parameters:
memoryMiB- The minimum and maximum amount of memory in mebibytes (MiB) for the instance types. This parameter is required. Amazon ECS selects instance types that have memory within this range.- Returns:
this
-
vCpuCount
@Stability(Stable) public CfnCapacityProvider.InstanceRequirementsRequestProperty.Builder vCpuCount(IResolvable vCpuCount) Sets the value ofCfnCapacityProvider.InstanceRequirementsRequestProperty.getVCpuCount()- Parameters:
vCpuCount- The minimum and maximum number of vCPUs for the instance types. This parameter is required. Amazon ECS selects instance types that have vCPU counts within this range.- Returns:
this
-
vCpuCount
@Stability(Stable) public CfnCapacityProvider.InstanceRequirementsRequestProperty.Builder vCpuCount(CfnCapacityProvider.VCpuCountRangeRequestProperty vCpuCount) Sets the value ofCfnCapacityProvider.InstanceRequirementsRequestProperty.getVCpuCount()- Parameters:
vCpuCount- The minimum and maximum number of vCPUs for the instance types. This parameter is required. Amazon ECS selects instance types that have vCPU counts within this range.- Returns:
this
-
acceleratorCount
@Stability(Stable) public CfnCapacityProvider.InstanceRequirementsRequestProperty.Builder acceleratorCount(IResolvable acceleratorCount) - Parameters:
acceleratorCount- 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.- Returns:
this
-
acceleratorCount
@Stability(Stable) public CfnCapacityProvider.InstanceRequirementsRequestProperty.Builder acceleratorCount(CfnCapacityProvider.AcceleratorCountRequestProperty acceleratorCount) - Parameters:
acceleratorCount- 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.- Returns:
this
-
acceleratorManufacturers
@Stability(Stable) public CfnCapacityProvider.InstanceRequirementsRequestProperty.Builder acceleratorManufacturers(List<String> acceleratorManufacturers) Sets the value ofCfnCapacityProvider.InstanceRequirementsRequestProperty.getAcceleratorManufacturers()- Parameters:
acceleratorManufacturers- The accelerator manufacturers to include. You can specifynvidia,amd,amazon-web-services, orxilinxdepending on your accelerator requirements.- Returns:
this
-
acceleratorNames
@Stability(Stable) public CfnCapacityProvider.InstanceRequirementsRequestProperty.Builder acceleratorNames(List<String> acceleratorNames) - Parameters:
acceleratorNames- The specific accelerator names to include. For example, you can specifya100,v100,k80, or other specific accelerator models.- Returns:
this
-
acceleratorTotalMemoryMiB
@Stability(Stable) public CfnCapacityProvider.InstanceRequirementsRequestProperty.Builder acceleratorTotalMemoryMiB(IResolvable acceleratorTotalMemoryMiB) Sets the value ofCfnCapacityProvider.InstanceRequirementsRequestProperty.getAcceleratorTotalMemoryMiB()- Parameters:
acceleratorTotalMemoryMiB- The minimum and maximum total accelerator memory in mebibytes (MiB). This is important for GPU workloads that require specific amounts of video memory.- Returns:
this
-
acceleratorTotalMemoryMiB
@Stability(Stable) public CfnCapacityProvider.InstanceRequirementsRequestProperty.Builder acceleratorTotalMemoryMiB(CfnCapacityProvider.AcceleratorTotalMemoryMiBRequestProperty acceleratorTotalMemoryMiB) Sets the value ofCfnCapacityProvider.InstanceRequirementsRequestProperty.getAcceleratorTotalMemoryMiB()- Parameters:
acceleratorTotalMemoryMiB- The minimum and maximum total accelerator memory in mebibytes (MiB). This is important for GPU workloads that require specific amounts of video memory.- Returns:
this
-
acceleratorTypes
@Stability(Stable) public CfnCapacityProvider.InstanceRequirementsRequestProperty.Builder acceleratorTypes(List<String> acceleratorTypes) - Parameters:
acceleratorTypes- The accelerator types to include. You can specifygpufor graphics processing units,fpgafor field programmable gate arrays, orinferencefor machine learning inference accelerators.- Returns:
this
-
allowedInstanceTypes
@Stability(Stable) public CfnCapacityProvider.InstanceRequirementsRequestProperty.Builder allowedInstanceTypes(List<String> allowedInstanceTypes) - Parameters:
allowedInstanceTypes- The instance types to include in the selection. When specified, Amazon ECS only considers these instance types, subject to the other requirements specified.- Returns:
this
-
bareMetal
@Stability(Stable) public CfnCapacityProvider.InstanceRequirementsRequestProperty.Builder bareMetal(String bareMetal) Sets the value ofCfnCapacityProvider.InstanceRequirementsRequestProperty.getBareMetal()- Parameters:
bareMetal- Indicates whether to include bare metal instance types. Set toincludedto allow bare metal instances,excludedto exclude them, orrequiredto use only bare metal instances.- Returns:
this
-
baselineEbsBandwidthMbps
@Stability(Stable) public CfnCapacityProvider.InstanceRequirementsRequestProperty.Builder baselineEbsBandwidthMbps(IResolvable baselineEbsBandwidthMbps) Sets the value ofCfnCapacityProvider.InstanceRequirementsRequestProperty.getBaselineEbsBandwidthMbps()- Parameters:
baselineEbsBandwidthMbps- The minimum and maximum baseline Amazon EBS bandwidth in megabits per second (Mbps). This is important for workloads with high storage I/O requirements.- Returns:
this
-
baselineEbsBandwidthMbps
@Stability(Stable) public CfnCapacityProvider.InstanceRequirementsRequestProperty.Builder baselineEbsBandwidthMbps(CfnCapacityProvider.BaselineEbsBandwidthMbpsRequestProperty baselineEbsBandwidthMbps) Sets the value ofCfnCapacityProvider.InstanceRequirementsRequestProperty.getBaselineEbsBandwidthMbps()- Parameters:
baselineEbsBandwidthMbps- The minimum and maximum baseline Amazon EBS bandwidth in megabits per second (Mbps). This is important for workloads with high storage I/O requirements.- Returns:
this
-
burstablePerformance
@Stability(Stable) public CfnCapacityProvider.InstanceRequirementsRequestProperty.Builder burstablePerformance(String burstablePerformance) - Parameters:
burstablePerformance- Indicates whether to include burstable performance instance types (T2, T3, T3a, T4g). Set toincludedto allow burstable instances,excludedto exclude them, orrequiredto use only burstable instances.- Returns:
this
-
cpuManufacturers
@Stability(Stable) public CfnCapacityProvider.InstanceRequirementsRequestProperty.Builder cpuManufacturers(List<String> cpuManufacturers) - Parameters:
cpuManufacturers- The CPU manufacturers to include or exclude. You can specifyintel,amd, oramazon-web-servicesto control which CPU types are used for your workloads.- Returns:
this
-
excludedInstanceTypes
@Stability(Stable) public CfnCapacityProvider.InstanceRequirementsRequestProperty.Builder excludedInstanceTypes(List<String> excludedInstanceTypes) Sets the value ofCfnCapacityProvider.InstanceRequirementsRequestProperty.getExcludedInstanceTypes()- Parameters:
excludedInstanceTypes- 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.- Returns:
this
-
instanceGenerations
@Stability(Stable) public CfnCapacityProvider.InstanceRequirementsRequestProperty.Builder instanceGenerations(List<String> instanceGenerations) - Parameters:
instanceGenerations- The instance generations to include. You can specifycurrentto use the latest generation instances, orpreviousto include previous generation instances for cost optimization.- Returns:
this
-
localStorage
@Stability(Stable) public CfnCapacityProvider.InstanceRequirementsRequestProperty.Builder localStorage(String localStorage) - Parameters:
localStorage- Indicates whether to include instance types with local storage. Set toincludedto allow local storage,excludedto exclude it, orrequiredto use only instances with local storage.- Returns:
this
-
localStorageTypes
@Stability(Stable) public CfnCapacityProvider.InstanceRequirementsRequestProperty.Builder localStorageTypes(List<String> localStorageTypes) - Parameters:
localStorageTypes- The local storage types to include. You can specifyhddfor hard disk drives,ssdfor solid state drives, or both.- Returns:
this
-
maxSpotPriceAsPercentageOfOptimalOnDemandPrice
@Stability(Stable) public CfnCapacityProvider.InstanceRequirementsRequestProperty.Builder maxSpotPriceAsPercentageOfOptimalOnDemandPrice(Number maxSpotPriceAsPercentageOfOptimalOnDemandPrice) Sets the value ofCfnCapacityProvider.InstanceRequirementsRequestProperty.getMaxSpotPriceAsPercentageOfOptimalOnDemandPrice()- Parameters:
maxSpotPriceAsPercentageOfOptimalOnDemandPrice- 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.- Returns:
this
-
memoryGiBPerVCpu
@Stability(Stable) public CfnCapacityProvider.InstanceRequirementsRequestProperty.Builder memoryGiBPerVCpu(IResolvable memoryGiBPerVCpu) - Parameters:
memoryGiBPerVCpu- 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.- Returns:
this
-
memoryGiBPerVCpu
@Stability(Stable) public CfnCapacityProvider.InstanceRequirementsRequestProperty.Builder memoryGiBPerVCpu(CfnCapacityProvider.MemoryGiBPerVCpuRequestProperty memoryGiBPerVCpu) - Parameters:
memoryGiBPerVCpu- 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.- Returns:
this
-
networkBandwidthGbps
@Stability(Stable) public CfnCapacityProvider.InstanceRequirementsRequestProperty.Builder networkBandwidthGbps(IResolvable networkBandwidthGbps) - Parameters:
networkBandwidthGbps- The minimum and maximum network bandwidth in gigabits per second (Gbps). This is crucial for network-intensive workloads that require high throughput.- Returns:
this
-
networkBandwidthGbps
@Stability(Stable) public CfnCapacityProvider.InstanceRequirementsRequestProperty.Builder networkBandwidthGbps(CfnCapacityProvider.NetworkBandwidthGbpsRequestProperty networkBandwidthGbps) - Parameters:
networkBandwidthGbps- The minimum and maximum network bandwidth in gigabits per second (Gbps). This is crucial for network-intensive workloads that require high throughput.- Returns:
this
-
networkInterfaceCount
@Stability(Stable) public CfnCapacityProvider.InstanceRequirementsRequestProperty.Builder networkInterfaceCount(IResolvable networkInterfaceCount) Sets the value ofCfnCapacityProvider.InstanceRequirementsRequestProperty.getNetworkInterfaceCount()- Parameters:
networkInterfaceCount- The minimum and maximum number of network interfaces for the instance types. This is useful for workloads that require multiple network interfaces.- Returns:
this
-
networkInterfaceCount
@Stability(Stable) public CfnCapacityProvider.InstanceRequirementsRequestProperty.Builder networkInterfaceCount(CfnCapacityProvider.NetworkInterfaceCountRequestProperty networkInterfaceCount) Sets the value ofCfnCapacityProvider.InstanceRequirementsRequestProperty.getNetworkInterfaceCount()- Parameters:
networkInterfaceCount- The minimum and maximum number of network interfaces for the instance types. This is useful for workloads that require multiple network interfaces.- Returns:
this
-
onDemandMaxPricePercentageOverLowestPrice
@Stability(Stable) public CfnCapacityProvider.InstanceRequirementsRequestProperty.Builder onDemandMaxPricePercentageOverLowestPrice(Number onDemandMaxPricePercentageOverLowestPrice) Sets the value ofCfnCapacityProvider.InstanceRequirementsRequestProperty.getOnDemandMaxPricePercentageOverLowestPrice()- Parameters:
onDemandMaxPricePercentageOverLowestPrice- 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.- Returns:
this
-
requireHibernateSupport
@Stability(Stable) public CfnCapacityProvider.InstanceRequirementsRequestProperty.Builder requireHibernateSupport(Boolean requireHibernateSupport) Sets the value ofCfnCapacityProvider.InstanceRequirementsRequestProperty.getRequireHibernateSupport()- Parameters:
requireHibernateSupport- Indicates whether the instance types must support hibernation. When set totrue, only instance types that support hibernation are selected.- Returns:
this
-
requireHibernateSupport
@Stability(Stable) public CfnCapacityProvider.InstanceRequirementsRequestProperty.Builder requireHibernateSupport(IResolvable requireHibernateSupport) Sets the value ofCfnCapacityProvider.InstanceRequirementsRequestProperty.getRequireHibernateSupport()- Parameters:
requireHibernateSupport- Indicates whether the instance types must support hibernation. When set totrue, only instance types that support hibernation are selected.- Returns:
this
-
spotMaxPricePercentageOverLowestPrice
@Stability(Stable) public CfnCapacityProvider.InstanceRequirementsRequestProperty.Builder spotMaxPricePercentageOverLowestPrice(Number spotMaxPricePercentageOverLowestPrice) Sets the value ofCfnCapacityProvider.InstanceRequirementsRequestProperty.getSpotMaxPricePercentageOverLowestPrice()- Parameters:
spotMaxPricePercentageOverLowestPrice- 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.- Returns:
this
-
totalLocalStorageGb
@Stability(Stable) public CfnCapacityProvider.InstanceRequirementsRequestProperty.Builder totalLocalStorageGb(IResolvable totalLocalStorageGb) - Parameters:
totalLocalStorageGb- The minimum and maximum total local storage in gigabytes (GB) for instance types with local storage.- Returns:
this
-
totalLocalStorageGb
@Stability(Stable) public CfnCapacityProvider.InstanceRequirementsRequestProperty.Builder totalLocalStorageGb(CfnCapacityProvider.TotalLocalStorageGBRequestProperty totalLocalStorageGb) - Parameters:
totalLocalStorageGb- The minimum and maximum total local storage in gigabytes (GB) for instance types with local storage.- Returns:
this
-
build
Builds the configured instance.- Specified by:
buildin interfacesoftware.amazon.jsii.Builder<CfnCapacityProvider.InstanceRequirementsRequestProperty>- Returns:
- a new instance of
CfnCapacityProvider.InstanceRequirementsRequestProperty - Throws:
NullPointerException- if any required attribute was not provided
-