Fleet

class Fleet : KotlinCustomResource

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

Properties

Link copied to clipboard
val arn: Output<String>

The ARN of the fleet

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

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>

The state of the EC2 Fleet.

Link copied to clipboard

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

Link copied to clipboard

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

Link copied to clipboard
val id: Output<String>
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 pulumiChildResources: Set<KotlinResource>
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

Whether EC2 Fleet should replace unhealthy instances. Defaults to false. Supported only for fleets of type maintain.

Link copied to clipboard

Nested argument containing Spot configurations. Defined below.

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

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
val tagsAll: Output<Map<String, String>>

A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

Link copied to clipboard

Nested argument containing target capacity configurations. Defined below.

Link copied to clipboard

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>?

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 urn: Output<String>
Link copied to clipboard
val validFrom: Output<String>?

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>?

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.