com.pulumi.awsnative.ec2.kotlin.outputs.SpotFleetInstanceRequirementsRequest.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of pulumi-aws-native-kotlin Show documentation
Show all versions of pulumi-aws-native-kotlin Show documentation
Build cloud applications and infrastructure by combining the safety and reliability of infrastructure as code with the power of the Kotlin programming language.
@file:Suppress("NAME_SHADOWING", "DEPRECATION")
package com.pulumi.awsnative.ec2.kotlin.outputs
import com.pulumi.awsnative.ec2.kotlin.enums.SpotFleetInstanceRequirementsRequestAcceleratorManufacturersItem
import com.pulumi.awsnative.ec2.kotlin.enums.SpotFleetInstanceRequirementsRequestAcceleratorNamesItem
import com.pulumi.awsnative.ec2.kotlin.enums.SpotFleetInstanceRequirementsRequestAcceleratorTypesItem
import com.pulumi.awsnative.ec2.kotlin.enums.SpotFleetInstanceRequirementsRequestBareMetal
import com.pulumi.awsnative.ec2.kotlin.enums.SpotFleetInstanceRequirementsRequestBurstablePerformance
import com.pulumi.awsnative.ec2.kotlin.enums.SpotFleetInstanceRequirementsRequestCpuManufacturersItem
import com.pulumi.awsnative.ec2.kotlin.enums.SpotFleetInstanceRequirementsRequestInstanceGenerationsItem
import com.pulumi.awsnative.ec2.kotlin.enums.SpotFleetInstanceRequirementsRequestLocalStorage
import com.pulumi.awsnative.ec2.kotlin.enums.SpotFleetInstanceRequirementsRequestLocalStorageTypesItem
import kotlin.Boolean
import kotlin.Int
import kotlin.String
import kotlin.Suppress
import kotlin.collections.List
/**
*
* @property 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
* @property acceleratorManufacturers Indicates whether instance types must have accelerators by specific manufacturers.
* - For instance types with AWS devices, specify `amazon-web-services` .
* - For instance types with AMD devices, specify `amd` .
* - For instance types with Habana devices, specify `habana` .
* - For instance types with NVIDIA devices, specify `nvidia` .
* - For instance types with Xilinx devices, specify `xilinx` .
* Default: Any manufacturer
* @property acceleratorNames The accelerators that must be on the instance type.
* - For instance types with NVIDIA A10G GPUs, specify `a10g` .
* - For instance types with NVIDIA A100 GPUs, specify `a100` .
* - For instance types with NVIDIA H100 GPUs, specify `h100` .
* - For instance types with AWS Inferentia chips, specify `inferentia` .
* - For instance types with NVIDIA GRID K520 GPUs, specify `k520` .
* - For instance types with NVIDIA K80 GPUs, specify `k80` .
* - For instance types with NVIDIA M60 GPUs, specify `m60` .
* - For instance types with AMD Radeon Pro V520 GPUs, specify `radeon-pro-v520` .
* - For instance types with NVIDIA T4 GPUs, specify `t4` .
* - For instance types with NVIDIA T4G GPUs, specify `t4g` .
* - For instance types with Xilinx VU9P FPGAs, specify `vu9p` .
* - For instance types with NVIDIA V100 GPUs, specify `v100` .
* Default: Any accelerator
* @property acceleratorTotalMemoryMiB The minimum and maximum amount of total accelerator memory, in MiB.
* Default: No minimum or maximum limits
* @property acceleratorTypes The accelerator types that must be on the instance type.
* - To include instance types with GPU hardware, specify `gpu` .
* - To include instance types with FPGA hardware, specify `fpga` .
* - To include instance types with inference hardware, specify `inference` .
* Default: Any accelerator type
* @property allowedInstanceTypes The instance types to apply your specified attributes against. All other instance types are ignored, even if they match your specified attributes.
* You can use strings with one or more wild cards, represented by an asterisk ( `*` ), to allow 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 allow the entire C5 instance family, which includes all C5a and C5n instance types. If you specify `m5a.*` , Amazon EC2 will allow all the M5a instance types, but not the M5n instance types.
* > If you specify `AllowedInstanceTypes` , you can't specify `ExcludedInstanceTypes` .
* Default: All instance types
* @property bareMetal Indicates whether bare metal instance types must be included, excluded, or required.
* - To include bare metal instance types, specify `included` .
* - To require only bare metal instance types, specify `required` .
* - To exclude bare metal instance types, specify `excluded` .
* Default: `excluded`
* @property baselineEbsBandwidthMbps The minimum and maximum baseline bandwidth to Amazon EBS, in Mbps. For more information, see [Amazon EBS–optimized instances](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ebs-optimized.html) in the *Amazon EC2 User Guide* .
* Default: No minimum or maximum limits
* @property burstablePerformance Indicates whether burstable performance T instance types are included, excluded, or required. For more information, see [Burstable performance instances](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/burstable-performance-instances.html) .
* - To include burstable performance instance types, specify `included` .
* - To require only burstable performance instance types, specify `required` .
* - To exclude burstable performance instance types, specify `excluded` .
* Default: `excluded`
* @property cpuManufacturers The CPU manufacturers to include.
* - For instance types with Intel CPUs, specify `intel` .
* - For instance types with AMD CPUs, specify `amd` .
* - For instance types with AWS CPUs, specify `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
* @property excludedInstanceTypes The instance types to exclude.
* You can use strings with one or more wild cards, represented by an asterisk ( `*` ), to exclude an instance family, 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.
* > If you specify `ExcludedInstanceTypes` , you can't specify `AllowedInstanceTypes` .
* Default: No excluded instance types
* @property 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](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instance-types.html) 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
* @property localStorage Indicates whether instance types with instance store volumes are included, excluded, or required. For more information, [Amazon EC2 instance store](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/InstanceStorage.html) in the *Amazon EC2 User Guide* .
* - To include instance types with instance store volumes, specify `included` .
* - To require only instance types with instance store volumes, specify `required` .
* - To exclude instance types with instance store volumes, specify `excluded` .
* Default: `included`
* @property localStorageTypes The type of local storage that is required.
* - For instance types with hard disk drive (HDD) storage, specify `hdd` .
* - For instance types with solid state drive (SSD) storage, specify `ssd` .
* Default: `hdd` and `ssd`
* @property maxSpotPriceAsPercentageOfOptimalOnDemandPrice [Price protection] The price protection threshold for Spot Instances, as a percentage of 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 the lowest priced current generation instance types, and failing that, from the lowest priced previous generation instance types that match your attributes. When Amazon EC2 selects instance types with your attributes, it will exclude instance types whose price exceeds your specified threshold.
* The parameter accepts an integer, which Amazon EC2 interprets as a percentage.
* If you set `TargetCapacityUnitType` to `vcpu` or `memory-mib` , the price protection threshold is based on the per vCPU or per memory price instead of the per instance price.
* > Only one of `SpotMaxPricePercentageOverLowestPrice` or `MaxSpotPriceAsPercentageOfOptimalOnDemandPrice` can be specified. If you don't specify either, Amazon EC2 will automatically apply optimal price protection to consistently select from a wide range of instance types. To indicate no price protection threshold for Spot Instances, meaning you want to consider all instance types that match your attributes, include one of these parameters and specify a high value, such as `999999` .
* @property memoryGiBPerVCpu The minimum and maximum amount of memory per vCPU, in GiB.
* Default: No minimum or maximum limits
* @property memoryMiB The minimum and maximum amount of memory, in MiB.
* @property networkBandwidthGbps The minimum and maximum amount of baseline network bandwidth, in gigabits per second (Gbps). For more information, see [Amazon EC2 instance network bandwidth](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-instance-network-bandwidth.html) in the *Amazon EC2 User Guide* .
* Default: No minimum or maximum limits
* @property networkInterfaceCount The minimum and maximum number of network interfaces.
* Default: No minimum or maximum limits
* @property onDemandMaxPricePercentageOverLowestPrice [Price protection] 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. When Amazon EC2 selects instance types with your attributes, it will exclude instance types whose price exceeds your specified threshold.
* The parameter accepts an integer, which Amazon EC2 interprets as a percentage.
* To indicate no price protection threshold, specify a high value, such as `999999` .
* This parameter is not supported for [GetSpotPlacementScores](https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_GetSpotPlacementScores.html) and [GetInstanceTypesFromInstanceRequirements](https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_GetInstanceTypesFromInstanceRequirements.html) .
* > If you set `TargetCapacityUnitType` to `vcpu` or `memory-mib` , the price protection threshold is applied based on the per-vCPU or per-memory price instead of the per-instance price.
* Default: `20`
* @property requireHibernateSupport Indicates whether instance types must support hibernation for On-Demand Instances.
* This parameter is not supported for [GetSpotPlacementScores](https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_GetSpotPlacementScores.html) .
* Default: `false`
* @property spotMaxPricePercentageOverLowestPrice [Price protection] The price protection threshold for Spot Instances, as a percentage higher than an identified Spot price. The identified Spot price is the Spot 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 Spot price is from the lowest priced current generation instance types, and failing that, from the lowest priced previous generation instance types that match your attributes. When Amazon EC2 selects instance types with your attributes, it will exclude instance types whose Spot price exceeds your specified threshold.
* The parameter accepts an integer, which Amazon EC2 interprets as a percentage.
* If you set `TargetCapacityUnitType` to `vcpu` or `memory-mib` , the price protection threshold is applied based on the per-vCPU or per-memory price instead of the per-instance price.
* This parameter is not supported for [GetSpotPlacementScores](https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_GetSpotPlacementScores.html) and [GetInstanceTypesFromInstanceRequirements](https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_GetInstanceTypesFromInstanceRequirements.html) .
* > Only one of `SpotMaxPricePercentageOverLowestPrice` or `MaxSpotPriceAsPercentageOfOptimalOnDemandPrice` can be specified. If you don't specify either, Amazon EC2 will automatically apply optimal price protection to consistently select from a wide range of instance types. To indicate no price protection threshold for Spot Instances, meaning you want to consider all instance types that match your attributes, include one of these parameters and specify a high value, such as `999999` .
* Default: `100`
* @property totalLocalStorageGb The minimum and maximum amount of total local storage, in GB.
* Default: No minimum or maximum limits
* @property vCpuCount The minimum and maximum number of vCPUs.
*/
public data class SpotFleetInstanceRequirementsRequest(
public val acceleratorCount: SpotFleetAcceleratorCountRequest? = null,
public val acceleratorManufacturers: List? = null,
public val acceleratorNames: List? =
null,
public val acceleratorTotalMemoryMiB: SpotFleetAcceleratorTotalMemoryMiBRequest? = null,
public val acceleratorTypes: List? =
null,
public val allowedInstanceTypes: List? = null,
public val bareMetal: SpotFleetInstanceRequirementsRequestBareMetal? = null,
public val baselineEbsBandwidthMbps: SpotFleetBaselineEbsBandwidthMbpsRequest? = null,
public val burstablePerformance: SpotFleetInstanceRequirementsRequestBurstablePerformance? = null,
public val cpuManufacturers: List? =
null,
public val excludedInstanceTypes: List? = null,
public val instanceGenerations: List? =
null,
public val localStorage: SpotFleetInstanceRequirementsRequestLocalStorage? = null,
public val localStorageTypes: List? =
null,
public val maxSpotPriceAsPercentageOfOptimalOnDemandPrice: Int? = null,
public val memoryGiBPerVCpu: SpotFleetMemoryGiBPerVCpuRequest? = null,
public val memoryMiB: SpotFleetMemoryMiBRequest? = null,
public val networkBandwidthGbps: SpotFleetNetworkBandwidthGbpsRequest? = null,
public val networkInterfaceCount: SpotFleetNetworkInterfaceCountRequest? = null,
public val onDemandMaxPricePercentageOverLowestPrice: Int? = null,
public val requireHibernateSupport: Boolean? = null,
public val spotMaxPricePercentageOverLowestPrice: Int? = null,
public val totalLocalStorageGb: SpotFleetTotalLocalStorageGbRequest? = null,
public val vCpuCount: SpotFleetVCpuCountRangeRequest? = null,
) {
public companion object {
public fun toKotlin(javaType: com.pulumi.awsnative.ec2.outputs.SpotFleetInstanceRequirementsRequest): SpotFleetInstanceRequirementsRequest = SpotFleetInstanceRequirementsRequest(
acceleratorCount = javaType.acceleratorCount().map({ args0 ->
args0.let({ args0 ->
com.pulumi.awsnative.ec2.kotlin.outputs.SpotFleetAcceleratorCountRequest.Companion.toKotlin(args0)
})
}).orElse(null),
acceleratorManufacturers = javaType.acceleratorManufacturers().map({ args0 ->
args0.let({ args0 ->
com.pulumi.awsnative.ec2.kotlin.enums.SpotFleetInstanceRequirementsRequestAcceleratorManufacturersItem.Companion.toKotlin(args0)
})
}),
acceleratorNames = javaType.acceleratorNames().map({ args0 ->
args0.let({ args0 ->
com.pulumi.awsnative.ec2.kotlin.enums.SpotFleetInstanceRequirementsRequestAcceleratorNamesItem.Companion.toKotlin(args0)
})
}),
acceleratorTotalMemoryMiB = javaType.acceleratorTotalMemoryMiB().map({ args0 ->
args0.let({ args0 ->
com.pulumi.awsnative.ec2.kotlin.outputs.SpotFleetAcceleratorTotalMemoryMiBRequest.Companion.toKotlin(args0)
})
}).orElse(null),
acceleratorTypes = javaType.acceleratorTypes().map({ args0 ->
args0.let({ args0 ->
com.pulumi.awsnative.ec2.kotlin.enums.SpotFleetInstanceRequirementsRequestAcceleratorTypesItem.Companion.toKotlin(args0)
})
}),
allowedInstanceTypes = javaType.allowedInstanceTypes().map({ args0 -> args0 }),
bareMetal = javaType.bareMetal().map({ args0 ->
args0.let({ args0 ->
com.pulumi.awsnative.ec2.kotlin.enums.SpotFleetInstanceRequirementsRequestBareMetal.Companion.toKotlin(args0)
})
}).orElse(null),
baselineEbsBandwidthMbps = javaType.baselineEbsBandwidthMbps().map({ args0 ->
args0.let({ args0 ->
com.pulumi.awsnative.ec2.kotlin.outputs.SpotFleetBaselineEbsBandwidthMbpsRequest.Companion.toKotlin(args0)
})
}).orElse(null),
burstablePerformance = javaType.burstablePerformance().map({ args0 ->
args0.let({ args0 ->
com.pulumi.awsnative.ec2.kotlin.enums.SpotFleetInstanceRequirementsRequestBurstablePerformance.Companion.toKotlin(args0)
})
}).orElse(null),
cpuManufacturers = javaType.cpuManufacturers().map({ args0 ->
args0.let({ args0 ->
com.pulumi.awsnative.ec2.kotlin.enums.SpotFleetInstanceRequirementsRequestCpuManufacturersItem.Companion.toKotlin(args0)
})
}),
excludedInstanceTypes = javaType.excludedInstanceTypes().map({ args0 -> args0 }),
instanceGenerations = javaType.instanceGenerations().map({ args0 ->
args0.let({ args0 ->
com.pulumi.awsnative.ec2.kotlin.enums.SpotFleetInstanceRequirementsRequestInstanceGenerationsItem.Companion.toKotlin(args0)
})
}),
localStorage = javaType.localStorage().map({ args0 ->
args0.let({ args0 ->
com.pulumi.awsnative.ec2.kotlin.enums.SpotFleetInstanceRequirementsRequestLocalStorage.Companion.toKotlin(args0)
})
}).orElse(null),
localStorageTypes = javaType.localStorageTypes().map({ args0 ->
args0.let({ args0 ->
com.pulumi.awsnative.ec2.kotlin.enums.SpotFleetInstanceRequirementsRequestLocalStorageTypesItem.Companion.toKotlin(args0)
})
}),
maxSpotPriceAsPercentageOfOptimalOnDemandPrice = javaType.maxSpotPriceAsPercentageOfOptimalOnDemandPrice().map({ args0 ->
args0
}).orElse(null),
memoryGiBPerVCpu = javaType.memoryGiBPerVCpu().map({ args0 ->
args0.let({ args0 ->
com.pulumi.awsnative.ec2.kotlin.outputs.SpotFleetMemoryGiBPerVCpuRequest.Companion.toKotlin(args0)
})
}).orElse(null),
memoryMiB = javaType.memoryMiB().map({ args0 ->
args0.let({ args0 ->
com.pulumi.awsnative.ec2.kotlin.outputs.SpotFleetMemoryMiBRequest.Companion.toKotlin(args0)
})
}).orElse(null),
networkBandwidthGbps = javaType.networkBandwidthGbps().map({ args0 ->
args0.let({ args0 ->
com.pulumi.awsnative.ec2.kotlin.outputs.SpotFleetNetworkBandwidthGbpsRequest.Companion.toKotlin(args0)
})
}).orElse(null),
networkInterfaceCount = javaType.networkInterfaceCount().map({ args0 ->
args0.let({ args0 ->
com.pulumi.awsnative.ec2.kotlin.outputs.SpotFleetNetworkInterfaceCountRequest.Companion.toKotlin(args0)
})
}).orElse(null),
onDemandMaxPricePercentageOverLowestPrice = javaType.onDemandMaxPricePercentageOverLowestPrice().map({ args0 ->
args0
}).orElse(null),
requireHibernateSupport = javaType.requireHibernateSupport().map({ args0 -> args0 }).orElse(null),
spotMaxPricePercentageOverLowestPrice = javaType.spotMaxPricePercentageOverLowestPrice().map({ args0 ->
args0
}).orElse(null),
totalLocalStorageGb = javaType.totalLocalStorageGb().map({ args0 ->
args0.let({ args0 ->
com.pulumi.awsnative.ec2.kotlin.outputs.SpotFleetTotalLocalStorageGbRequest.Companion.toKotlin(args0)
})
}).orElse(null),
vCpuCount = javaType.vCpuCount().map({ args0 ->
args0.let({ args0 ->
com.pulumi.awsnative.ec2.kotlin.outputs.SpotFleetVCpuCountRangeRequest.Companion.toKotlin(args0)
})
}).orElse(null),
)
}
}