Capacity Reservation
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
The Availability Zone in which to create the Capacity Reservation.
Indicates whether the Capacity Reservation supports EBS-optimized instances.
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
)
Indicates the way in which the Capacity Reservation ends. Specify either unlimited
or limited
.
Indicates whether the Capacity Reservation supports instances with temporary, block-level storage.
The number of instances for which to reserve capacity.
Indicates the type of instance launches that the Capacity Reservation accepts. Specify either open
or targeted
.
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
.
The instance type for which to reserve capacity.
The Amazon Resource Name (ARN) of the Outpost on which to create the Capacity Reservation.
The Amazon Resource Name (ARN) of the cluster placement group in which to create the Capacity Reservation.