CapacityReservationArgs

data class CapacityReservationArgs(val availabilityZone: Output<String>? = null, val ebsOptimized: Output<Boolean>? = null, val endDate: Output<String>? = null, val endDateType: Output<String>? = null, val ephemeralStorage: Output<Boolean>? = null, val instanceCount: Output<Int>? = null, val instanceMatchCriteria: Output<String>? = null, val instancePlatform: Output<Either<String, InstancePlatform>>? = null, val instanceType: Output<Either<String, InstanceType>>? = null, val outpostArn: Output<String>? = null, val placementGroupArn: Output<String>? = null, val tags: Output<Map<String, String>>? = null, val tenancy: Output<Either<String, Tenancy>>? = null) : ConvertibleToJava<CapacityReservationArgs>

Provides an EC2 Capacity Reservation. This allows you to reserve capacity for your Amazon EC2 instances in a specific Availability Zone for any duration.

Example Usage

package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.ec2.CapacityReservation;
import com.pulumi.aws.ec2.CapacityReservationArgs;
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 default_ = new CapacityReservation("default", CapacityReservationArgs.builder()
.availabilityZone("eu-west-1a")
.instanceCount(1)
.instancePlatform("Linux/UNIX")
.instanceType("t2.micro")
.build());
}
}

Import

Capacity Reservations can be imported using the id, e.g.,

$ pulumi import aws:ec2/capacityReservation:CapacityReservation web cr-0123456789abcdef0

Constructors

Link copied to clipboard
constructor(availabilityZone: Output<String>? = null, ebsOptimized: Output<Boolean>? = null, endDate: Output<String>? = null, endDateType: Output<String>? = null, ephemeralStorage: Output<Boolean>? = null, instanceCount: Output<Int>? = null, instanceMatchCriteria: Output<String>? = null, instancePlatform: Output<Either<String, InstancePlatform>>? = null, instanceType: Output<Either<String, InstanceType>>? = null, outpostArn: Output<String>? = null, placementGroupArn: Output<String>? = null, tags: Output<Map<String, String>>? = null, tenancy: Output<Either<String, Tenancy>>? = null)

Properties

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

The Availability Zone in which to create the Capacity Reservation.

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

Indicates whether the Capacity Reservation supports EBS-optimized instances.

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

The date and time at which the Capacity Reservation expires. When a Capacity Reservation expires, the reserved capacity is released and you can no longer launch instances into it. Valid values: RFC3339 time string (YYYY-MM-DDTHH:MM:SSZ)

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

Indicates the way in which the Capacity Reservation ends. Specify either unlimited or limited.

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

Indicates whether the Capacity Reservation supports instances with temporary, block-level storage.

Link copied to clipboard
val instanceCount: Output<Int>? = null

The number of instances for which to reserve capacity.

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

Indicates the type of instance launches that the Capacity Reservation accepts. Specify either open or targeted.

Link copied to clipboard
val instancePlatform: Output<Either<String, InstancePlatform>>? = null

The type of operating system for which to reserve capacity. Valid options are Linux/UNIX, Red Hat Enterprise Linux, SUSE Linux, Windows, Windows with SQL Server, Windows with SQL Server Enterprise, Windows with SQL Server Standard or Windows with SQL Server Web.

Link copied to clipboard
val instanceType: Output<Either<String, InstanceType>>? = null

The instance type for which to reserve capacity.

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

The Amazon Resource Name (ARN) of the Outpost on which to create the Capacity Reservation.

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

The Amazon Resource Name (ARN) of the cluster placement group in which to create the Capacity Reservation.

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

A map of tags to assign to the resource. 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 tenancy: Output<Either<String, Tenancy>>? = null

Indicates the tenancy of the Capacity Reservation. Specify either default or dedicated.

Functions

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