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

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

Go to download

Build cloud applications and infrastructure by combining the safety and reliability of infrastructure as code with the power of the Kotlin programming language.

There is a newer version: 0.122.0.0
Show newest version
@file:Suppress("NAME_SHADOWING", "DEPRECATION")

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

import com.pulumi.awsnative.ec2.kotlin.enums.Ec2FleetTargetCapacitySpecificationRequestDefaultTargetCapacityType
import com.pulumi.awsnative.ec2.kotlin.enums.Ec2FleetTargetCapacitySpecificationRequestTargetCapacityUnitType
import kotlin.Int
import kotlin.Suppress

/**
 *
 * @property defaultTargetCapacityType The default target capacity type.
 * @property onDemandTargetCapacity The number of On-Demand units to request.
 * @property spotTargetCapacity The number of Spot units to request.
 * @property targetCapacityUnitType The unit for the target capacity. You can specify this parameter only when using attributed-based instance type selection.
 * Default: `units` (the number of instances)
 * @property totalTargetCapacity The number of units to request, filled using the default target capacity type.
 */
public data class Ec2FleetTargetCapacitySpecificationRequest(
    public val defaultTargetCapacityType: Ec2FleetTargetCapacitySpecificationRequestDefaultTargetCapacityType? = null,
    public val onDemandTargetCapacity: Int? = null,
    public val spotTargetCapacity: Int? = null,
    public val targetCapacityUnitType: Ec2FleetTargetCapacitySpecificationRequestTargetCapacityUnitType? = null,
    public val totalTargetCapacity: Int,
) {
    public companion object {
        public fun toKotlin(javaType: com.pulumi.awsnative.ec2.outputs.Ec2FleetTargetCapacitySpecificationRequest): Ec2FleetTargetCapacitySpecificationRequest = Ec2FleetTargetCapacitySpecificationRequest(
            defaultTargetCapacityType = javaType.defaultTargetCapacityType().map({ args0 ->
                args0.let({ args0 ->
                    com.pulumi.awsnative.ec2.kotlin.enums.Ec2FleetTargetCapacitySpecificationRequestDefaultTargetCapacityType.Companion.toKotlin(args0)
                })
            }).orElse(null),
            onDemandTargetCapacity = javaType.onDemandTargetCapacity().map({ args0 -> args0 }).orElse(null),
            spotTargetCapacity = javaType.spotTargetCapacity().map({ args0 -> args0 }).orElse(null),
            targetCapacityUnitType = javaType.targetCapacityUnitType().map({ args0 ->
                args0.let({ args0 ->
                    com.pulumi.awsnative.ec2.kotlin.enums.Ec2FleetTargetCapacitySpecificationRequestTargetCapacityUnitType.Companion.toKotlin(args0)
                })
            }).orElse(null),
            totalTargetCapacity = javaType.totalTargetCapacity(),
        )
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy