CapacityReservation

class CapacityReservation : KotlinCustomResource

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

Properties

Link copied to clipboard
val arn: Output<String>

The ARN of the Capacity Reservation.

Link copied to clipboard

The Availability Zone in which to create the Capacity Reservation.

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

Indicates whether the Capacity Reservation supports EBS-optimized instances.

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

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

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

Link copied to clipboard

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

Link copied to clipboard
val id: Output<String>
Link copied to clipboard
val instanceCount: Output<Int>

The number of instances for which to reserve capacity.

Link copied to clipboard

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

Link copied to clipboard

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

The instance type for which to reserve capacity.

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

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

Link copied to clipboard
val ownerId: Output<String>

The ID of the AWS account that owns the Capacity Reservation.

Link copied to clipboard

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

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

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 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
val tenancy: Output<String>?

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

Link copied to clipboard
val urn: Output<String>