
com.pulumi.awsnative.ec2.kotlin.outputs.LaunchTemplateSpotOptions.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 kotlin.Int
import kotlin.String
import kotlin.Suppress
/**
* Specifies options for Spot Instances.
* ``SpotOptions`` is a property of [AWS::EC2::LaunchTemplate InstanceMarketOptions](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-launchtemplate-launchtemplatedata-instancemarketoptions.html).
* @property blockDurationMinutes Deprecated.
* @property instanceInterruptionBehavior The behavior when a Spot Instance is interrupted. The default is ``terminate``.
* @property maxPrice The maximum hourly price you're willing to pay for the Spot Instances. We do not recommend using this parameter because it can lead to increased interruptions. If you do not specify this parameter, you will pay the current Spot price.
* If you specify a maximum price, your Spot Instances will be interrupted more frequently than if you do not specify this parameter.
* @property spotInstanceType The Spot Instance request type.
* If you are using Spot Instances with an Auto Scaling group, use ``one-time`` requests, as the ASlong service handles requesting new Spot Instances whenever the group is below its desired capacity.
* @property validUntil The end date of the request, in UTC format (*YYYY-MM-DD*T*HH:MM:SS*Z). Supported only for persistent requests.
* + For a persistent request, the request remains active until the ``ValidUntil`` date and time is reached. Otherwise, the request remains active until you cancel it.
* + For a one-time request, ``ValidUntil`` is not supported. The request remains active until all instances launch or you cancel the request.
* Default: 7 days from the current date
*/
public data class LaunchTemplateSpotOptions(
public val blockDurationMinutes: Int? = null,
public val instanceInterruptionBehavior: String? = null,
public val maxPrice: String? = null,
public val spotInstanceType: String? = null,
public val validUntil: String? = null,
) {
public companion object {
public fun toKotlin(javaType: com.pulumi.awsnative.ec2.outputs.LaunchTemplateSpotOptions): LaunchTemplateSpotOptions = LaunchTemplateSpotOptions(
blockDurationMinutes = javaType.blockDurationMinutes().map({ args0 -> args0 }).orElse(null),
instanceInterruptionBehavior = javaType.instanceInterruptionBehavior().map({ args0 ->
args0
}).orElse(null),
maxPrice = javaType.maxPrice().map({ args0 -> args0 }).orElse(null),
spotInstanceType = javaType.spotInstanceType().map({ args0 -> args0 }).orElse(null),
validUntil = javaType.validUntil().map({ args0 -> args0 }).orElse(null),
)
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy