Class CapacityReservation
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
using Pulumi;
using Aws = Pulumi.Aws;
class MyStack : Stack
{
public MyStack()
{
var @default = new Aws.Ec2.CapacityReservation("default", new Aws.Ec2.CapacityReservationArgs
{
AvailabilityZone = "eu-west-1a",
InstanceCount = 1,
InstancePlatform = "Linux/UNIX",
InstanceType = "t2.micro",
});
}
}
Inherited Members
Namespace: Pulumi.Aws.Ec2
Assembly: Pulumi.Aws.dll
Syntax
public class CapacityReservation : CustomResource
Constructors
View SourceCapacityReservation(String, CapacityReservationArgs, CustomResourceOptions)
Create a CapacityReservation resource with the given unique name, arguments, and options.
Declaration
public CapacityReservation(string name, CapacityReservationArgs args, CustomResourceOptions options = null)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | name | The unique name of the resource |
| CapacityReservationArgs | args | The arguments used to populate this resource's properties |
| CustomResourceOptions | options | A bag of options that control this resource's behavior |
Properties
View SourceAvailabilityZone
The Availability Zone in which to create the Capacity Reservation.
Declaration
public Output<string> AvailabilityZone { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
EbsOptimized
Indicates whether the Capacity Reservation supports EBS-optimized instances.
Declaration
public Output<bool?> EbsOptimized { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.Nullable<System.Boolean>> |
EndDate
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)
Declaration
public Output<string> EndDate { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
EndDateType
Indicates the way in which the Capacity Reservation ends. Specify either unlimited or limited.
Declaration
public Output<string> EndDateType { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
EphemeralStorage
Indicates whether the Capacity Reservation supports instances with temporary, block-level storage.
Declaration
public Output<bool?> EphemeralStorage { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.Nullable<System.Boolean>> |
InstanceCount
The number of instances for which to reserve capacity.
Declaration
public Output<int> InstanceCount { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.Int32> |
InstanceMatchCriteria
Indicates the type of instance launches that the Capacity Reservation accepts. Specify either open or targeted.
Declaration
public Output<string> InstanceMatchCriteria { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
InstancePlatform
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.
Declaration
public Output<string> InstancePlatform { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
InstanceType
The instance type for which to reserve capacity.
Declaration
public Output<string> InstanceType { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
Tags
A map of tags to assign to the resource.
Declaration
public Output<ImmutableDictionary<string, object>> Tags { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.Collections.Immutable.ImmutableDictionary<System.String, System.Object>> |
Tenancy
Indicates the tenancy of the Capacity Reservation. Specify either default or dedicated.
Declaration
public Output<string> Tenancy { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
Methods
View SourceGet(String, Input<String>, CapacityReservationState, CustomResourceOptions)
Get an existing CapacityReservation resource's state with the given name, ID, and optional extra properties used to qualify the lookup.
Declaration
public static CapacityReservation Get(string name, Input<string> id, CapacityReservationState state = null, CustomResourceOptions options = null)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | name | The unique name of the resulting resource. |
| Input<System.String> | id | The unique provider ID of the resource to lookup. |
| CapacityReservationState | state | Any extra arguments used during the lookup. |
| CustomResourceOptions | options | A bag of options that control this resource's behavior |
Returns
| Type | Description |
|---|---|
| CapacityReservation |