FleetArgs

data class FleetArgs(val context: Output<String>? = null, val excessCapacityTerminationPolicy: Output<String>? = null, val launchTemplateConfig: Output<FleetLaunchTemplateConfigArgs>? = null, val onDemandOptions: Output<FleetOnDemandOptionsArgs>? = null, val replaceUnhealthyInstances: Output<Boolean>? = null, val spotOptions: Output<FleetSpotOptionsArgs>? = null, val tags: Output<Map<String, String>>? = null, val targetCapacitySpecification: Output<FleetTargetCapacitySpecificationArgs>? = null, val terminateInstances: Output<Boolean>? = null, val terminateInstancesWithExpiration: Output<Boolean>? = null, val type: Output<String>? = null) : ConvertibleToJava<FleetArgs>

Provides a resource to manage EC2 Fleets.

Example Usage

package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.ec2.Fleet;
import com.pulumi.aws.ec2.FleetArgs;
import com.pulumi.aws.ec2.inputs.FleetLaunchTemplateConfigArgs;
import com.pulumi.aws.ec2.inputs.FleetLaunchTemplateConfigLaunchTemplateSpecificationArgs;
import com.pulumi.aws.ec2.inputs.FleetTargetCapacitySpecificationArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
var example = new Fleet("example", FleetArgs.builder()
.launchTemplateConfig(FleetLaunchTemplateConfigArgs.builder()
.launchTemplateSpecification(FleetLaunchTemplateConfigLaunchTemplateSpecificationArgs.builder()
.launchTemplateId(aws_launch_template.example().id())
.version(aws_launch_template.example().latest_version())
.build())
.build())
.targetCapacitySpecification(FleetTargetCapacitySpecificationArgs.builder()
.defaultTargetCapacityType("spot")
.totalTargetCapacity(5)
.build())
.build());
}
}

Import

aws_ec2_fleet can be imported by using the Fleet identifier, e.g.,

$ pulumi import aws:ec2/fleet:Fleet example fleet-b9b55d27-c5fc-41ac-a6f3-48fcc91f080c

Constructors

Link copied to clipboard
fun FleetArgs(context: Output<String>? = null, excessCapacityTerminationPolicy: Output<String>? = null, launchTemplateConfig: Output<FleetLaunchTemplateConfigArgs>? = null, onDemandOptions: Output<FleetOnDemandOptionsArgs>? = null, replaceUnhealthyInstances: Output<Boolean>? = null, spotOptions: Output<FleetSpotOptionsArgs>? = null, tags: Output<Map<String, String>>? = null, targetCapacitySpecification: Output<FleetTargetCapacitySpecificationArgs>? = null, terminateInstances: Output<Boolean>? = null, terminateInstancesWithExpiration: Output<Boolean>? = null, type: Output<String>? = null)

Functions

Link copied to clipboard
open override fun toJava(): FleetArgs

Properties

Link copied to clipboard
val context: Output<String>? = null

Reserved.

Link copied to clipboard

Whether running instances should be terminated if the total target capacity of the EC2 Fleet is decreased below the current size of the EC2. Valid values: no-termination, termination. Defaults to termination.

Link copied to clipboard

Nested argument containing EC2 Launch Template configurations. Defined below.

Link copied to clipboard

Nested argument containing On-Demand configurations. Defined below.

Link copied to clipboard
val replaceUnhealthyInstances: Output<Boolean>? = null

Whether EC2 Fleet should replace unhealthy instances. Defaults to false.

Link copied to clipboard
val spotOptions: Output<FleetSpotOptionsArgs>? = null

Nested argument containing Spot configurations. Defined below.

Link copied to clipboard
val tags: Output<Map<String, String>>? = null

Map of Fleet tags. To tag instances at launch, specify the tags in the Launch Template. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.

Link copied to clipboard

Nested argument containing target capacity configurations. Defined below.

Link copied to clipboard
val terminateInstances: Output<Boolean>? = null

Whether to terminate instances for an EC2 Fleet if it is deleted successfully. Defaults to false.

Link copied to clipboard

Whether running instances should be terminated when the EC2 Fleet expires. Defaults to false.

Link copied to clipboard
val type: Output<String>? = null

The type of request. Indicates whether the EC2 Fleet only requests the target capacity, or also attempts to maintain it. Valid values: maintain, request. Defaults to maintain.