All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.pulumi.awsnative.ec2.kotlin.outputs.LaunchTemplateCapacityReservationSpecification.kt Maven / Gradle / Ivy

@file:Suppress("NAME_SHADOWING", "DEPRECATION")

package com.pulumi.awsnative.ec2.kotlin.outputs

import kotlin.String
import kotlin.Suppress

/**
 * Specifies an instance's Capacity Reservation targeting option. You can specify only one option at a time.
 *   ``CapacityReservationSpecification`` is a property of [AWS::EC2::LaunchTemplate LaunchTemplateData](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-launchtemplate-launchtemplatedata.html).
 * @property capacityReservationPreference Indicates the instance's Capacity Reservation preferences. Possible preferences include:
 *   +   ``open`` - The instance can run in any ``open`` Capacity Reservation that has matching attributes (instance type, platform, Availability Zone).
 *   +   ``none`` - The instance avoids running in a Capacity Reservation even if one is available. The instance runs in On-Demand capacity.
 * @property capacityReservationTarget Information about the target Capacity Reservation or Capacity Reservation group.
 */
public data class LaunchTemplateCapacityReservationSpecification(
    public val capacityReservationPreference: String? = null,
    public val capacityReservationTarget: LaunchTemplateCapacityReservationTarget? = null,
) {
    public companion object {
        public fun toKotlin(javaType: com.pulumi.awsnative.ec2.outputs.LaunchTemplateCapacityReservationSpecification): LaunchTemplateCapacityReservationSpecification =
            LaunchTemplateCapacityReservationSpecification(
                capacityReservationPreference = javaType.capacityReservationPreference().map({ args0 ->
                    args0
                }).orElse(null),
                capacityReservationTarget = javaType.capacityReservationTarget().map({ args0 ->
                    args0.let({ args0 ->
                        com.pulumi.awsnative.ec2.kotlin.outputs.LaunchTemplateCapacityReservationTarget.Companion.toKotlin(args0)
                    })
                }).orElse(null),
            )
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy