FleetArgs

data class FleetArgs(val context: Output<String>? = null, val excessCapacityTerminationPolicy: Output<String>? = null, val fleetInstanceSets: Output<List<FleetFleetInstanceSetArgs>>? = null, val fleetState: Output<String>? = null, val fulfilledCapacity: Output<Double>? = null, val fulfilledOnDemandCapacity: Output<Double>? = 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, val validFrom: Output<String>? = null, val validUntil: 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
constructor(context: Output<String>? = null, excessCapacityTerminationPolicy: Output<String>? = null, fleetInstanceSets: Output<List<FleetFleetInstanceSetArgs>>? = null, fleetState: Output<String>? = null, fulfilledCapacity: Output<Double>? = null, fulfilledOnDemandCapacity: Output<Double>? = 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, validFrom: Output<String>? = null, validUntil: Output<String>? = null)

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. Supported only for fleets of type maintain.

Link copied to clipboard

Information about the instances that were launched by the fleet. Available only when type is set to instant.

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

The state of the EC2 Fleet.

Link copied to clipboard
val fulfilledCapacity: Output<Double>? = null

The number of units fulfilled by this request compared to the set target capacity.

Link copied to clipboard
val fulfilledOnDemandCapacity: Output<Double>? = null

The number of units fulfilled by this request compared to the set target On-Demand capacity.

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. Supported only for fleets of type maintain.

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, instant. Defaults to maintain.

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

The start date and time of the request, in UTC format (for example, YYYY-MM-DDTHH:MM:SSZ). The default is to start fulfilling the request immediately.

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

The end date and time of the request, in UTC format (for example, YYYY-MM-DDTHH:MM:SSZ). 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.

Functions

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