Class CfnCapacityReservation
Creates a new Capacity Reservation with the specified attributes.
Implements
Inherited Members
Namespace: Amazon.CDK.AWS.EC2
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public class CfnCapacityReservation : CfnResource, IInspectable
Syntax (vb)
Public Class CfnCapacityReservation
Inherits CfnResource
Implements IInspectable
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 {
AvailabilityZone = "availabilityZone",
InstanceCount = 123,
InstancePlatform = "instancePlatform",
InstanceType = "instanceType",
// the properties below are optional
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"
});
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. |
AttrId | The ID of the Capacity Reservation. |
AttrInstanceType | Returns the type of instance for which the capacity is reserved. |
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. |
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 | The Amazon Resource Name (ARN) of the Outpost on which to create the Capacity Reservation. |
PlacementGroupArn | The Amazon Resource Name (ARN) of the cluster placement group in which to create the Capacity Reservation. |
TagSpecifications | The tags to apply to the Capacity Reservation during launch. |
Tenancy | Indicates the tenancy 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
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
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
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
The Amazon Resource Name (ARN) of the Outpost on which to create the Capacity Reservation.
public virtual string OutPostArn { get; set; }
Property Value
System.String
PlacementGroupArn
The Amazon Resource Name (ARN) of the cluster placement group in which to create the Capacity Reservation.
public virtual string PlacementGroupArn { get; set; }
Property Value
System.String
TagSpecifications
The tags to apply to the Capacity Reservation during launch.
public virtual object TagSpecifications { get; set; }
Property Value
System.Object
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:.
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>