Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance. Project price only 1 $
You can buy this project and download/modify it how often you want.
@file:Suppress("NAME_SHADOWING", "DEPRECATION")
package com.pulumi.awsnative.ec2.kotlin
import com.pulumi.awsnative.ec2.Ec2FleetArgs.builder
import com.pulumi.awsnative.ec2.kotlin.enums.Ec2FleetExcessCapacityTerminationPolicy
import com.pulumi.awsnative.ec2.kotlin.enums.Ec2FleetType
import com.pulumi.awsnative.ec2.kotlin.inputs.Ec2FleetFleetLaunchTemplateConfigRequestArgs
import com.pulumi.awsnative.ec2.kotlin.inputs.Ec2FleetFleetLaunchTemplateConfigRequestArgsBuilder
import com.pulumi.awsnative.ec2.kotlin.inputs.Ec2FleetOnDemandOptionsRequestArgs
import com.pulumi.awsnative.ec2.kotlin.inputs.Ec2FleetOnDemandOptionsRequestArgsBuilder
import com.pulumi.awsnative.ec2.kotlin.inputs.Ec2FleetSpotOptionsRequestArgs
import com.pulumi.awsnative.ec2.kotlin.inputs.Ec2FleetSpotOptionsRequestArgsBuilder
import com.pulumi.awsnative.ec2.kotlin.inputs.Ec2FleetTagSpecificationArgs
import com.pulumi.awsnative.ec2.kotlin.inputs.Ec2FleetTagSpecificationArgsBuilder
import com.pulumi.awsnative.ec2.kotlin.inputs.Ec2FleetTargetCapacitySpecificationRequestArgs
import com.pulumi.awsnative.ec2.kotlin.inputs.Ec2FleetTargetCapacitySpecificationRequestArgsBuilder
import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiTagMarker
import com.pulumi.kotlin.applySuspend
import kotlin.Boolean
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.List
import kotlin.jvm.JvmName
/**
* Resource Type definition for AWS::EC2::EC2Fleet
* @property context Reserved.
* @property excessCapacityTerminationPolicy Indicates whether running instances should be terminated if the total target capacity of the EC2 Fleet is decreased below the current size of the EC2 Fleet.
* Supported only for fleets of type `maintain` .
* @property launchTemplateConfigs The configuration for the EC2 Fleet.
* @property onDemandOptions Describes the configuration of On-Demand Instances in an EC2 Fleet.
* @property replaceUnhealthyInstances Indicates whether EC2 Fleet should replace unhealthy Spot Instances. Supported only for fleets of type `maintain` . For more information, see [EC2 Fleet health checks](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/manage-ec2-fleet.html#ec2-fleet-health-checks) in the *Amazon EC2 User Guide* .
* @property spotOptions Describes the configuration of Spot Instances in an EC2 Fleet.
* @property tagSpecifications The key-value pair for tagging the EC2 Fleet request on creation. For more information, see [Tag your resources](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Using_Tags.html#tag-resources) .
* If the fleet type is `instant` , specify a resource type of `fleet` to tag the fleet or `instance` to tag the instances at launch.
* If the fleet type is `maintain` or `request` , specify a resource type of `fleet` to tag the fleet. You cannot specify a resource type of `instance` . To tag instances at launch, specify the tags in a [launch template](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-launch-templates.html#create-launch-template) .
* @property targetCapacitySpecification The number of units to request.
* @property terminateInstancesWithExpiration Indicates whether running instances should be terminated when the EC2 Fleet expires.
* @property type The fleet type. The default value is `maintain` .
* - `maintain` - The EC2 Fleet places an asynchronous request for your desired capacity, and continues to maintain your desired Spot capacity by replenishing interrupted Spot Instances.
* - `request` - The EC2 Fleet places an asynchronous one-time request for your desired capacity, but does submit Spot requests in alternative capacity pools if Spot capacity is unavailable, and does not maintain Spot capacity if Spot Instances are interrupted.
* - `instant` - The EC2 Fleet places a synchronous one-time request for your desired capacity, and returns errors for any instances that could not be launched.
* For more information, see [EC2 Fleet request types](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-fleet-request-type.html) in the *Amazon EC2 User Guide* .
* @property validFrom The start date and time of the request, in UTC format (for example, *YYYY* - *MM* - *DD* T *HH* : *MM* : *SS* Z). The default is to start fulfilling the request immediately.
* @property validUntil The end date and time of the request, in UTC format (for example, *YYYY* - *MM* - *DD* T *HH* : *MM* : *SS* Z). At this point, no new EC2 Fleet requests are placed or able to fulfill the request. If no value is specified, the request remains until you cancel it.
*/
public data class Ec2FleetArgs(
public val context: Output? = null,
public val excessCapacityTerminationPolicy: Output? =
null,
public val launchTemplateConfigs: Output>? =
null,
public val onDemandOptions: Output? = null,
public val replaceUnhealthyInstances: Output? = null,
public val spotOptions: Output? = null,
public val tagSpecifications: Output>? = null,
public val targetCapacitySpecification: Output? =
null,
public val terminateInstancesWithExpiration: Output? = null,
public val type: Output? = null,
public val validFrom: Output? = null,
public val validUntil: Output? = null,
) : ConvertibleToJava {
override fun toJava(): com.pulumi.awsnative.ec2.Ec2FleetArgs =
com.pulumi.awsnative.ec2.Ec2FleetArgs.builder()
.context(context?.applyValue({ args0 -> args0 }))
.excessCapacityTerminationPolicy(
excessCapacityTerminationPolicy?.applyValue({ args0 ->
args0.let({ args0 -> args0.toJava() })
}),
)
.launchTemplateConfigs(
launchTemplateConfigs?.applyValue({ args0 ->
args0.map({ args0 ->
args0.let({ args0 -> args0.toJava() })
})
}),
)
.onDemandOptions(onDemandOptions?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
.replaceUnhealthyInstances(replaceUnhealthyInstances?.applyValue({ args0 -> args0 }))
.spotOptions(spotOptions?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
.tagSpecifications(
tagSpecifications?.applyValue({ args0 ->
args0.map({ args0 ->
args0.let({ args0 ->
args0.toJava()
})
})
}),
)
.targetCapacitySpecification(
targetCapacitySpecification?.applyValue({ args0 ->
args0.let({ args0 ->
args0.toJava()
})
}),
)
.terminateInstancesWithExpiration(terminateInstancesWithExpiration?.applyValue({ args0 -> args0 }))
.type(type?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
.validFrom(validFrom?.applyValue({ args0 -> args0 }))
.validUntil(validUntil?.applyValue({ args0 -> args0 })).build()
}
/**
* Builder for [Ec2FleetArgs].
*/
@PulumiTagMarker
public class Ec2FleetArgsBuilder internal constructor() {
private var context: Output? = null
private var excessCapacityTerminationPolicy: Output? =
null
private var launchTemplateConfigs: Output>? =
null
private var onDemandOptions: Output? = null
private var replaceUnhealthyInstances: Output? = null
private var spotOptions: Output? = null
private var tagSpecifications: Output>? = null
private var targetCapacitySpecification: Output? =
null
private var terminateInstancesWithExpiration: Output? = null
private var type: Output? = null
private var validFrom: Output? = null
private var validUntil: Output? = null
/**
* @param value Reserved.
*/
@JvmName("vqldbmmsnkbuosye")
public suspend fun context(`value`: Output) {
this.context = value
}
/**
* @param value Indicates whether running instances should be terminated if the total target capacity of the EC2 Fleet is decreased below the current size of the EC2 Fleet.
* Supported only for fleets of type `maintain` .
*/
@JvmName("hrywyahvfmcbmjxd")
public suspend fun excessCapacityTerminationPolicy(`value`: Output) {
this.excessCapacityTerminationPolicy = value
}
/**
* @param value The configuration for the EC2 Fleet.
*/
@JvmName("rmvwkybilwtrxrmx")
public suspend fun launchTemplateConfigs(`value`: Output>) {
this.launchTemplateConfigs = value
}
@JvmName("uqynrnvnxpeyfbih")
public suspend fun launchTemplateConfigs(vararg values: Output) {
this.launchTemplateConfigs = Output.all(values.asList())
}
/**
* @param values The configuration for the EC2 Fleet.
*/
@JvmName("yhiwhrswvbyirkat")
public suspend fun launchTemplateConfigs(values: List