Class CfnCapacityReservation
Creates a new Capacity Reservation with the specified attributes.
Inherited Members
Namespace: Amazon.CDK.AWS.EC2
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public class CfnCapacityReservation : CfnResource, IInspectable, ITaggableV2
Syntax (vb)
Public Class CfnCapacityReservation
Inherits CfnResource
Implements IInspectable, ITaggableV2
Remarks
For more information, see Capacity Reservations in the Amazon EC2 User Guide .
CloudformationResource: AWS::EC2::CapacityReservation
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 cfnCapacityReservation = new CfnCapacityReservation(this, "MyCfnCapacityReservation", 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
CfnCapacityReservation(ByRefValue) | Used by jsii to construct an instance of this class from a Javascript-owned object reference |
CfnCapacityReservation(DeputyBase.DeputyProps) | Used by jsii to construct an instance of this class from DeputyProps |
CfnCapacityReservation(Construct, String, ICfnCapacityReservationProps) |
Properties
AttrAvailabilityZone | Returns the Availability Zone in which the capacity is reserved. |
AttrAvailableInstanceCount | Returns the remaining capacity, which indicates the number of instances that can be launched in the Capacity Reservation. |
AttrCapacityAllocationSet | |
AttrCapacityReservationArn | The Amazon Resource Name (ARN) of the Capacity Reservation. |
AttrCapacityReservationFleetId | The ID of the Capacity Reservation Fleet to which the Capacity Reservation belongs. |
AttrCommitmentInfo | |
AttrCreateDate | The date and time at which the Capacity Reservation was created. |
AttrDeliveryPreference | The delivery method for a future-dated Capacity Reservation. |
AttrId | The ID of the Capacity Reservation. |
AttrInstanceType | Returns the type of instance for which the capacity is reserved. |
AttrOwnerId | The ID of the AWS account that owns the Capacity Reservation. |
AttrReservationType | The type of Capacity Reservation. |
AttrStartDate | The date and time at which the Capacity Reservation was started. |
AttrState | The current state of the Capacity Reservation. A Capacity Reservation can be in one of the following states:. |
AttrTenancy | Returns the tenancy of the Capacity Reservation. |
AttrTotalInstanceCount | Returns the total number of instances for which the Capacity Reservation reserves capacity. |
AvailabilityZone | The Availability Zone in which to create the Capacity Reservation. |
AvailabilityZoneId | The Availability Zone ID of the Capacity Reservation. |
CdkTagManager | Tag Manager which manages the tags for this resource. |
CFN_RESOURCE_TYPE_NAME | The CloudFormation resource type name for this resource class. |
CfnProperties | |
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. |
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. |
UnusedReservationBillingOwnerId | The ID of the AWS account to which to assign billing of the unused capacity of the Capacity Reservation. |
Methods
Inspect(TreeInspector) | Examines the CloudFormation resource and discloses attributes. |
RenderProperties(IDictionary<String, Object>) |
Constructors
CfnCapacityReservation(ByRefValue)
Used by jsii to construct an instance of this class from a Javascript-owned object reference
protected CfnCapacityReservation(ByRefValue reference)
Parameters
- reference Amazon.JSII.Runtime.Deputy.ByRefValue
The Javascript-owned object reference
CfnCapacityReservation(DeputyBase.DeputyProps)
Used by jsii to construct an instance of this class from DeputyProps
protected CfnCapacityReservation(DeputyBase.DeputyProps props)
Parameters
- props Amazon.JSII.Runtime.Deputy.DeputyBase.DeputyProps
The deputy props
CfnCapacityReservation(Construct, String, ICfnCapacityReservationProps)
public CfnCapacityReservation(Construct scope, string id, ICfnCapacityReservationProps props)
Parameters
- scope Constructs.Construct
Scope in which this resource is defined.
- id System.String
Construct identifier for this resource (unique in its scope).
- props ICfnCapacityReservationProps
Resource properties.
Properties
AttrAvailabilityZone
Returns the Availability Zone in which the capacity is reserved.
public virtual string AttrAvailabilityZone { get; }
Property Value
System.String
Remarks
For example: us-east-1a
.
CloudformationAttribute: AvailabilityZone
AttrAvailableInstanceCount
Returns the remaining capacity, which indicates the number of instances that can be launched in the Capacity Reservation.
public virtual double AttrAvailableInstanceCount { get; }
Property Value
System.Double
Remarks
For example: 9
.
CloudformationAttribute: AvailableInstanceCount
AttrCapacityAllocationSet
public virtual IResolvable AttrCapacityAllocationSet { get; }
Property Value
Remarks
CloudformationAttribute: CapacityAllocationSet
AttrCapacityReservationArn
The Amazon Resource Name (ARN) of the Capacity Reservation.
public virtual string AttrCapacityReservationArn { get; }
Property Value
System.String
Remarks
CloudformationAttribute: CapacityReservationArn
AttrCapacityReservationFleetId
The ID of the Capacity Reservation Fleet to which the Capacity Reservation belongs.
public virtual string AttrCapacityReservationFleetId { get; }
Property Value
System.String
Remarks
Only valid for Capacity Reservations that were created by a Capacity Reservation Fleet.
CloudformationAttribute: CapacityReservationFleetId
AttrCommitmentInfo
public virtual IResolvable AttrCommitmentInfo { get; }
Property Value
Remarks
CloudformationAttribute: CommitmentInfo
AttrCreateDate
The date and time at which the Capacity Reservation was created.
public virtual string AttrCreateDate { get; }
Property Value
System.String
Remarks
CloudformationAttribute: CreateDate
AttrDeliveryPreference
The delivery method for a future-dated Capacity Reservation.
public virtual string AttrDeliveryPreference { get; }
Property Value
System.String
Remarks
incremental
indicates that the requested capacity is delivered in addition to any running instances and reserved capacity that you have in your account at the requested date and time.
CloudformationAttribute: DeliveryPreference
AttrId
The ID of the Capacity Reservation.
public virtual string AttrId { get; }
Property Value
System.String
Remarks
CloudformationAttribute: Id
AttrInstanceType
Returns the type of instance for which the capacity is reserved.
public virtual string AttrInstanceType { get; }
Property Value
System.String
Remarks
For example: m4.large
.
CloudformationAttribute: InstanceType
AttrOwnerId
The ID of the AWS account that owns the Capacity Reservation.
public virtual string AttrOwnerId { get; }
Property Value
System.String
Remarks
CloudformationAttribute: OwnerId
AttrReservationType
The type of Capacity Reservation.
public virtual string AttrReservationType { get; }
Property Value
System.String
Remarks
CloudformationAttribute: ReservationType
AttrStartDate
The date and time at which the Capacity Reservation was started.
public virtual string AttrStartDate { get; }
Property Value
System.String
Remarks
CloudformationAttribute: StartDate
AttrState
The current state of the Capacity Reservation. A Capacity Reservation can be in one of the following states:.
public virtual string AttrState { get; }
Property Value
System.String
Remarks
CloudformationAttribute: State
AttrTenancy
Returns the tenancy of the Capacity Reservation.
public virtual string AttrTenancy { get; }
Property Value
System.String
Remarks
For example: dedicated
.
CloudformationAttribute: Tenancy
AttrTotalInstanceCount
Returns the total number of instances for which the Capacity Reservation reserves capacity.
public virtual double AttrTotalInstanceCount { get; }
Property Value
System.Double
Remarks
For example: 15
.
CloudformationAttribute: TotalInstanceCount
AvailabilityZone
The Availability Zone in which to create the Capacity Reservation.
public virtual string AvailabilityZone { get; set; }
Property Value
System.String
AvailabilityZoneId
The Availability Zone ID of the Capacity Reservation.
public virtual string AvailabilityZoneId { get; set; }
Property Value
System.String
CdkTagManager
Tag Manager which manages the tags for this resource.
public virtual TagManager CdkTagManager { get; }
Property Value
CFN_RESOURCE_TYPE_NAME
The CloudFormation resource type name for this resource class.
public static string CFN_RESOURCE_TYPE_NAME { get; }
Property Value
System.String
CfnProperties
protected override IDictionary<string, object> CfnProperties { get; }
Property Value
System.Collections.Generic.IDictionary<System.String, System.Object>
Overrides
EbsOptimized
Indicates whether the Capacity Reservation supports EBS-optimized instances.
public virtual object EbsOptimized { get; set; }
Property Value
System.Object
EndDate
The date and time at which the Capacity Reservation expires.
public virtual string EndDate { get; set; }
Property Value
System.String
EndDateType
Indicates the way in which the Capacity Reservation ends.
public virtual string EndDateType { get; set; }
Property Value
System.String
EphemeralStorage
Deprecated..
public virtual object EphemeralStorage { get; set; }
Property Value
System.Object
InstanceCount
The number of instances for which to reserve capacity.
public virtual double InstanceCount { get; set; }
Property Value
System.Double
InstanceMatchCriteria
Indicates the type of instance launches that the Capacity Reservation accepts.
public virtual string InstanceMatchCriteria { get; set; }
Property Value
System.String
Remarks
The options include:.
InstancePlatform
The type of operating system for which to reserve capacity.
public virtual string InstancePlatform { get; set; }
Property Value
System.String
InstanceType
The instance type for which to reserve capacity.
public virtual string InstanceType { get; set; }
Property Value
System.String
OutPostArn
Not supported for future-dated Capacity Reservations.
public virtual string OutPostArn { get; set; }
Property Value
System.String
PlacementGroupArn
Not supported for future-dated Capacity Reservations.
public virtual string PlacementGroupArn { get; set; }
Property Value
System.String
TagSpecifications
The tags to apply to the Capacity Reservation during launch.
public virtual CfnCapacityReservation.ITagSpecificationProperty[] TagSpecifications { get; set; }
Property Value
CfnCapacityReservation.ITagSpecificationProperty[]
Tenancy
Indicates the tenancy of the Capacity Reservation.
public virtual string Tenancy { get; set; }
Property Value
System.String
Remarks
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.
public virtual string UnusedReservationBillingOwnerId { get; set; }
Property Value
System.String
Methods
Inspect(TreeInspector)
Examines the CloudFormation resource and discloses attributes.
public virtual void Inspect(TreeInspector inspector)
Parameters
- inspector TreeInspector
tree inspector to collect and process attributes.
RenderProperties(IDictionary<String, Object>)
protected override IDictionary<string, object> RenderProperties(IDictionary<string, object> props)
Parameters
- props System.Collections.Generic.IDictionary<System.String, System.Object>
Returns
System.Collections.Generic.IDictionary<System.String, System.Object>