public static final class CfnLaunchTemplate.InstanceRequirementsProperty.Builder
extends java.lang.Object
CfnLaunchTemplate.InstanceRequirementsProperty
Constructor and Description |
---|
Builder() |
public CfnLaunchTemplate.InstanceRequirementsProperty.Builder acceleratorCount(IResolvable acceleratorCount)
CfnLaunchTemplate.InstanceRequirementsProperty.getAcceleratorCount()
acceleratorCount
- The minimum and maximum number of accelerators (GPUs, FPGAs, or AWS Inferentia chips) on an instance.
To exclude accelerator-enabled instance types, set Max
to 0
.
Default: No minimum or maximum limits
this
public CfnLaunchTemplate.InstanceRequirementsProperty.Builder acceleratorCount(CfnLaunchTemplate.AcceleratorCountProperty acceleratorCount)
CfnLaunchTemplate.InstanceRequirementsProperty.getAcceleratorCount()
acceleratorCount
- The minimum and maximum number of accelerators (GPUs, FPGAs, or AWS Inferentia chips) on an instance.
To exclude accelerator-enabled instance types, set Max
to 0
.
Default: No minimum or maximum limits
this
public CfnLaunchTemplate.InstanceRequirementsProperty.Builder acceleratorManufacturers(java.util.List<java.lang.String> acceleratorManufacturers)
acceleratorManufacturers
- Indicates whether instance types must have accelerators by specific manufacturers.
nvidia
.amd
.amazon-web-services
.xilinx
.Default: Any manufacturer
this
public CfnLaunchTemplate.InstanceRequirementsProperty.Builder acceleratorNames(java.util.List<java.lang.String> acceleratorNames)
CfnLaunchTemplate.InstanceRequirementsProperty.getAcceleratorNames()
acceleratorNames
- The accelerators that must be on the instance type.
a100
.v100
.k80
.t4
.m60
.radeon-pro-v520
.vu9p
.Default: Any accelerator
this
public CfnLaunchTemplate.InstanceRequirementsProperty.Builder acceleratorTotalMemoryMiB(IResolvable acceleratorTotalMemoryMiB)
acceleratorTotalMemoryMiB
- The minimum and maximum amount of total accelerator memory, in MiB.
Default: No minimum or maximum limitsthis
public CfnLaunchTemplate.InstanceRequirementsProperty.Builder acceleratorTotalMemoryMiB(CfnLaunchTemplate.AcceleratorTotalMemoryMiBProperty acceleratorTotalMemoryMiB)
acceleratorTotalMemoryMiB
- The minimum and maximum amount of total accelerator memory, in MiB.
Default: No minimum or maximum limitsthis
public CfnLaunchTemplate.InstanceRequirementsProperty.Builder acceleratorTypes(java.util.List<java.lang.String> acceleratorTypes)
CfnLaunchTemplate.InstanceRequirementsProperty.getAcceleratorTypes()
acceleratorTypes
- The accelerator types that must be on the instance type.
gpu
.fpga
.inference
.Default: Any accelerator type
this
public CfnLaunchTemplate.InstanceRequirementsProperty.Builder bareMetal(java.lang.String bareMetal)
CfnLaunchTemplate.InstanceRequirementsProperty.getBareMetal()
bareMetal
- Indicates whether bare metal instance types must be included, excluded, or required.
included
.required
.excluded
.
Default: excluded
this
public CfnLaunchTemplate.InstanceRequirementsProperty.Builder baselineEbsBandwidthMbps(IResolvable baselineEbsBandwidthMbps)
baselineEbsBandwidthMbps
- The minimum and maximum baseline bandwidth to Amazon EBS, in Mbps.
For more information, see Amazon EBS–optimized instances in the Amazon EC2 User Guide .
Default: No minimum or maximum limits
this
public CfnLaunchTemplate.InstanceRequirementsProperty.Builder baselineEbsBandwidthMbps(CfnLaunchTemplate.BaselineEbsBandwidthMbpsProperty baselineEbsBandwidthMbps)
baselineEbsBandwidthMbps
- The minimum and maximum baseline bandwidth to Amazon EBS, in Mbps.
For more information, see Amazon EBS–optimized instances in the Amazon EC2 User Guide .
Default: No minimum or maximum limits
this
public CfnLaunchTemplate.InstanceRequirementsProperty.Builder burstablePerformance(java.lang.String burstablePerformance)
CfnLaunchTemplate.InstanceRequirementsProperty.getBurstablePerformance()
burstablePerformance
- Indicates whether burstable performance T instance types are included, excluded, or required.
For more information, see Burstable performance instances .
included
.required
.excluded
.
Default: excluded
this
public CfnLaunchTemplate.InstanceRequirementsProperty.Builder cpuManufacturers(java.util.List<java.lang.String> cpuManufacturers)
CfnLaunchTemplate.InstanceRequirementsProperty.getCpuManufacturers()
cpuManufacturers
- The CPU manufacturers to include.
intel
.amd
.amazon-web-services
.
Don't confuse the CPU manufacturer with the CPU architecture. Instances will be launched with a compatible CPU architecture based on the Amazon Machine Image (AMI) that you specify in your launch template.
Default: Any manufacturer
this
public CfnLaunchTemplate.InstanceRequirementsProperty.Builder excludedInstanceTypes(java.util.List<java.lang.String> excludedInstanceTypes)
excludedInstanceTypes
- The instance types to exclude.
You can use strings with one or more wild cards, represented by an asterisk ( *
), to exclude an instance type, size, or generation. The following are examples: m5.8xlarge
, c5*.*
, m5a.*
, r*
, *3*
.
For example, if you specify c5*
,Amazon EC2 will exclude the entire C5 instance family, which includes all C5a and C5n instance types. If you specify m5a.*
, Amazon EC2 will exclude all the M5a instance types, but not the M5n instance types.
Default: No excluded instance types
this
public CfnLaunchTemplate.InstanceRequirementsProperty.Builder instanceGenerations(java.util.List<java.lang.String> instanceGenerations)
CfnLaunchTemplate.InstanceRequirementsProperty.getInstanceGenerations()
instanceGenerations
- Indicates whether current or previous generation instance types are included.
The current generation instance types are recommended for use. Current generation instance types are typically the latest two to three generations in each instance family. For more information, see Instance types in the Amazon EC2 User Guide .
For current generation instance types, specify current
.
For previous generation instance types, specify previous
.
Default: Current and previous generation instance types
this
public CfnLaunchTemplate.InstanceRequirementsProperty.Builder localStorage(java.lang.String localStorage)
CfnLaunchTemplate.InstanceRequirementsProperty.getLocalStorage()
localStorage
- Indicates whether instance types with instance store volumes are included, excluded, or required.
For more information, Amazon EC2 instance store in the Amazon EC2 User Guide .
included
.required
.excluded
.
Default: included
this
public CfnLaunchTemplate.InstanceRequirementsProperty.Builder localStorageTypes(java.util.List<java.lang.String> localStorageTypes)
CfnLaunchTemplate.InstanceRequirementsProperty.getLocalStorageTypes()
localStorageTypes
- The type of local storage that is required.
hdd
.sdd
.
Default: hdd
and sdd
this
public CfnLaunchTemplate.InstanceRequirementsProperty.Builder memoryGiBPerVCpu(IResolvable memoryGiBPerVCpu)
CfnLaunchTemplate.InstanceRequirementsProperty.getMemoryGiBPerVCpu()
memoryGiBPerVCpu
- The minimum and maximum amount of memory per vCPU, in GiB.
Default: No minimum or maximum limitsthis
public CfnLaunchTemplate.InstanceRequirementsProperty.Builder memoryGiBPerVCpu(CfnLaunchTemplate.MemoryGiBPerVCpuProperty memoryGiBPerVCpu)
CfnLaunchTemplate.InstanceRequirementsProperty.getMemoryGiBPerVCpu()
memoryGiBPerVCpu
- The minimum and maximum amount of memory per vCPU, in GiB.
Default: No minimum or maximum limitsthis
public CfnLaunchTemplate.InstanceRequirementsProperty.Builder memoryMiB(IResolvable memoryMiB)
CfnLaunchTemplate.InstanceRequirementsProperty.getMemoryMiB()
memoryMiB
- The minimum and maximum amount of memory, in MiB.this
public CfnLaunchTemplate.InstanceRequirementsProperty.Builder memoryMiB(CfnLaunchTemplate.MemoryMiBProperty memoryMiB)
CfnLaunchTemplate.InstanceRequirementsProperty.getMemoryMiB()
memoryMiB
- The minimum and maximum amount of memory, in MiB.this
public CfnLaunchTemplate.InstanceRequirementsProperty.Builder networkInterfaceCount(IResolvable networkInterfaceCount)
networkInterfaceCount
- The minimum and maximum number of network interfaces.
Default: No minimum or maximum limitsthis
public CfnLaunchTemplate.InstanceRequirementsProperty.Builder networkInterfaceCount(CfnLaunchTemplate.NetworkInterfaceCountProperty networkInterfaceCount)
networkInterfaceCount
- The minimum and maximum number of network interfaces.
Default: No minimum or maximum limitsthis
public CfnLaunchTemplate.InstanceRequirementsProperty.Builder onDemandMaxPricePercentageOverLowestPrice(java.lang.Number onDemandMaxPricePercentageOverLowestPrice)
CfnLaunchTemplate.InstanceRequirementsProperty.getOnDemandMaxPricePercentageOverLowestPrice()
onDemandMaxPricePercentageOverLowestPrice
- The price protection threshold for On-Demand Instances.
This is the maximum you’ll pay for an On-Demand Instance, expressed as a percentage above the cheapest M, C, or R instance type with your specified attributes. When Amazon EC2 selects instance types with your attributes, it excludes instance types priced above your threshold.
The parameter accepts an integer, which Amazon EC2 interprets as a percentage.
To turn off price protection, specify a high value, such as 999999
.
This parameter is not supported for GetSpotPlacementScores and GetInstanceTypesFromInstanceRequirements .
If you set
TargetCapacityUnitType
tovcpu
ormemory-mib
, the price protection threshold is applied based on the per-vCPU or per-memory price instead of the per-instance price.
Default: 20
this
public CfnLaunchTemplate.InstanceRequirementsProperty.Builder requireHibernateSupport(java.lang.Boolean requireHibernateSupport)
requireHibernateSupport
- Indicates whether instance types must support hibernation for On-Demand Instances.
This parameter is not supported for GetSpotPlacementScores .
Default: false
this
public CfnLaunchTemplate.InstanceRequirementsProperty.Builder requireHibernateSupport(IResolvable requireHibernateSupport)
requireHibernateSupport
- Indicates whether instance types must support hibernation for On-Demand Instances.
This parameter is not supported for GetSpotPlacementScores .
Default: false
this
public CfnLaunchTemplate.InstanceRequirementsProperty.Builder spotMaxPricePercentageOverLowestPrice(java.lang.Number spotMaxPricePercentageOverLowestPrice)
CfnLaunchTemplate.InstanceRequirementsProperty.getSpotMaxPricePercentageOverLowestPrice()
spotMaxPricePercentageOverLowestPrice
- The price protection threshold for Spot Instances.
This is the maximum you’ll pay for a Spot Instance, expressed as a percentage above the cheapest M, C, or R instance type with your specified attributes. When Amazon EC2 selects instance types with your attributes, it excludes instance types priced above your threshold.
The parameter accepts an integer, which Amazon EC2 interprets as a percentage.
To turn off price protection, specify a high value, such as 999999
.
This parameter is not supported for GetSpotPlacementScores and GetInstanceTypesFromInstanceRequirements .
If you set
TargetCapacityUnitType
tovcpu
ormemory-mib
, the price protection threshold is applied based on the per-vCPU or per-memory price instead of the per-instance price.
Default: 100
this
public CfnLaunchTemplate.InstanceRequirementsProperty.Builder totalLocalStorageGb(IResolvable totalLocalStorageGb)
CfnLaunchTemplate.InstanceRequirementsProperty.getTotalLocalStorageGb()
totalLocalStorageGb
- The minimum and maximum amount of total local storage, in GB.
Default: No minimum or maximum limitsthis
public CfnLaunchTemplate.InstanceRequirementsProperty.Builder totalLocalStorageGb(CfnLaunchTemplate.TotalLocalStorageGBProperty totalLocalStorageGb)
CfnLaunchTemplate.InstanceRequirementsProperty.getTotalLocalStorageGb()
totalLocalStorageGb
- The minimum and maximum amount of total local storage, in GB.
Default: No minimum or maximum limitsthis
public CfnLaunchTemplate.InstanceRequirementsProperty.Builder vCpuCount(IResolvable vCpuCount)
CfnLaunchTemplate.InstanceRequirementsProperty.getVCpuCount()
vCpuCount
- The minimum and maximum number of vCPUs.this
public CfnLaunchTemplate.InstanceRequirementsProperty.Builder vCpuCount(CfnLaunchTemplate.VCpuCountProperty vCpuCount)
CfnLaunchTemplate.InstanceRequirementsProperty.getVCpuCount()
vCpuCount
- The minimum and maximum number of vCPUs.this
public CfnLaunchTemplate.InstanceRequirementsProperty build()
CfnLaunchTemplate.InstanceRequirementsProperty
java.lang.NullPointerException
- if any required attribute was not provided