Class CfnCapacityReservationProps
Properties for defining a CfnCapacityReservation
.
Inheritance
Implements
Namespace: Amazon.CDK.AWS.EC2
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public class CfnCapacityReservationProps : Object, ICfnCapacityReservationProps
Syntax (vb)
Public Class CfnCapacityReservationProps
Inherits Object
Implements ICfnCapacityReservationProps
Remarks
ExampleMetadata: fixture=_generated
Examples
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK.AWS.EC2;
var cfnCapacityReservationProps = new CfnCapacityReservationProps {
InstanceCount = 123,
InstancePlatform = "instancePlatform",
InstanceType = "instanceType",
// the properties below are optional
AvailabilityZone = "availabilityZone",
AvailabilityZoneId = "availabilityZoneId",
EbsOptimized = false,
EndDate = "endDate",
EndDateType = "endDateType",
EphemeralStorage = false,
InstanceMatchCriteria = "instanceMatchCriteria",
OutPostArn = "outPostArn",
PlacementGroupArn = "placementGroupArn",
TagSpecifications = new [] { new TagSpecificationProperty {
ResourceType = "resourceType",
Tags = new [] { new CfnTag {
Key = "key",
Value = "value"
} }
} },
Tenancy = "tenancy",
UnusedReservationBillingOwnerId = "unusedReservationBillingOwnerId"
};
Synopsis
Constructors
CfnCapacityReservationProps() |
Properties
AvailabilityZone | The Availability Zone in which to create the Capacity Reservation. |
AvailabilityZoneId | The Availability Zone ID of the Capacity Reservation. |
EbsOptimized | Indicates whether the Capacity Reservation supports EBS-optimized instances. |
EndDate | The date and time at which the Capacity Reservation expires. |
EndDateType | Indicates the way in which the Capacity Reservation ends. |
EphemeralStorage | Deprecated.. |
InstanceCount | The number of instances for which to reserve capacity. |
InstanceMatchCriteria | Indicates the type of instance launches that the Capacity Reservation accepts. The options include:. |
InstancePlatform | The type of operating system for which to reserve capacity. |
InstanceType | The instance type for which to reserve capacity. |
OutPostArn | Not supported for future-dated Capacity Reservations. |
PlacementGroupArn | Not supported for future-dated Capacity Reservations. |
TagSpecifications | The tags to apply to the Capacity Reservation during launch. |
Tenancy | Indicates the tenancy of the Capacity Reservation. A Capacity Reservation can have one of the following tenancy settings:. |
UnusedReservationBillingOwnerId | The ID of the AWS account to which to assign billing of the unused capacity of the Capacity Reservation. |
Constructors
CfnCapacityReservationProps()
public CfnCapacityReservationProps()
Properties
AvailabilityZone
The Availability Zone in which to create the Capacity Reservation.
public string AvailabilityZone { get; set; }
Property Value
System.String
Remarks
AvailabilityZoneId
The Availability Zone ID of the Capacity Reservation.
public string AvailabilityZoneId { get; set; }
Property Value
System.String
Remarks
EbsOptimized
Indicates whether the Capacity Reservation supports EBS-optimized instances.
public object EbsOptimized { get; set; }
Property Value
System.Object
Remarks
This optimization provides dedicated throughput to Amazon EBS and an optimized configuration stack to provide optimal I/O performance. This optimization isn't available with all instance types. Additional usage charges apply when using an EBS- optimized instance.
EndDate
The date and time at which the Capacity Reservation expires.
public string EndDate { get; set; }
Property Value
System.String
Remarks
When a Capacity Reservation expires, the reserved capacity is released and you can no longer launch instances into it. The Capacity Reservation's state changes to expired
when it reaches its end date and time.
You must provide an EndDate
value if EndDateType
is limited
. Omit EndDate
if EndDateType
is unlimited
.
If the EndDateType
is limited
, the Capacity Reservation is cancelled within an hour from the specified time. For example, if you specify 5/31/2019, 13:30:55, the Capacity Reservation is guaranteed to end between 13:30:55 and 14:30:55 on 5/31/2019.
If you are requesting a future-dated Capacity Reservation, you can't specify an end date and time that is within the commitment duration.
EndDateType
Indicates the way in which the Capacity Reservation ends.
public string EndDateType { get; set; }
Property Value
System.String
Remarks
A Capacity Reservation can have one of the following end types:
EphemeralStorage
Deprecated..
public object EphemeralStorage { get; set; }
Property Value
System.Object
Remarks
InstanceCount
The number of instances for which to reserve capacity.
public double InstanceCount { get; set; }
Property Value
System.Double
Remarks
You can request future-dated Capacity Reservations for an instance count with a minimum of 100 vCPUs. For example, if you request a future-dated Capacity Reservation for m5.xlarge
instances, you must request at least 25 instances ( 25 * m5.xlarge = 100 vCPUs ).
Valid range: 1 - 1000
InstanceMatchCriteria
Indicates the type of instance launches that the Capacity Reservation accepts. The options include:.
public string InstanceMatchCriteria { get; set; }
Property Value
System.String
Remarks
If you are requesting a future-dated Capacity Reservation, you must specify <code>targeted</code> .
Default: open
InstancePlatform
The type of operating system for which to reserve capacity.
public string InstancePlatform { get; set; }
Property Value
System.String
Remarks
InstanceType
The instance type for which to reserve capacity.
public string InstanceType { get; set; }
Property Value
System.String
Remarks
You can request future-dated Capacity Reservations for instance types in the C, M, R, I, and T instance families only.
For more information, see Instance types in the Amazon EC2 User Guide .
OutPostArn
Not supported for future-dated Capacity Reservations.
public string OutPostArn { get; set; }
Property Value
System.String
Remarks
The Amazon Resource Name (ARN) of the Outpost on which to create the Capacity Reservation.
PlacementGroupArn
Not supported for future-dated Capacity Reservations.
public string PlacementGroupArn { get; set; }
Property Value
System.String
Remarks
The Amazon Resource Name (ARN) of the cluster placement group in which to create the Capacity Reservation. For more information, see Capacity Reservations for cluster placement groups in the Amazon EC2 User Guide .
TagSpecifications
The tags to apply to the Capacity Reservation during launch.
public CfnCapacityReservation.ITagSpecificationProperty[] TagSpecifications { get; set; }
Property Value
CfnCapacityReservation.ITagSpecificationProperty[]
Remarks
Tenancy
Indicates the tenancy of the Capacity Reservation. A Capacity Reservation can have one of the following tenancy settings:.
public string Tenancy { get; set; }
Property Value
System.String
Remarks
UnusedReservationBillingOwnerId
The ID of the AWS account to which to assign billing of the unused capacity of the Capacity Reservation.
public string UnusedReservationBillingOwnerId { get; set; }
Property Value
System.String
Remarks
A request will be sent to the specified account. That account must accept the request for the billing to be assigned to their account. For more information, see Billing assignment for shared Amazon EC2 Capacity Reservations .
You can assign billing only for shared Capacity Reservations. To share a Capacity Reservation, you must add it to a resource share. For more information, see AWS::RAM::ResourceShare .