Show / Hide Table of Contents

Class CfnCapacityReservation

Creates a new Capacity Reservation with the specified attributes.

Inheritance
object
CfnElement
CfnRefElement
CfnResource
CfnCapacityReservation
Implements
IInspectable
ICapacityReservationRef
IConstruct
IDependable
IEnvironmentAware
Inherited Members
CfnResource.IsCfnResource(object)
CfnResource.AddDeletionOverride(string)
CfnResource.AddDependency(CfnResource)
CfnResource.AddDependsOn(CfnResource)
CfnResource.AddMetadata(string, object)
CfnResource.AddOverride(string, object)
CfnResource.AddPropertyDeletionOverride(string)
CfnResource.AddPropertyOverride(string, object)
CfnResource.ApplyRemovalPolicy(RemovalPolicy?, IRemovalPolicyOptions)
CfnResource.GetAtt(string, ResolutionTypeHint?)
CfnResource.GetMetadata(string)
CfnResource.ObtainDependencies()
CfnResource.ObtainResourceDependencies()
CfnResource.RemoveDependency(CfnResource)
CfnResource.ReplaceDependency(CfnResource, CfnResource)
CfnResource.ShouldSynthesize()
CfnResource.ToString()
CfnResource.ValidateProperties(object)
CfnResource.CfnOptions
CfnResource.CfnResourceType
CfnResource.Env
CfnResource.UpdatedProperites
CfnResource.UpdatedProperties
CfnRefElement.Ref
CfnElement.IsCfnElement(object)
CfnElement.OverrideLogicalId(string)
CfnElement.With(params IMixin[])
CfnElement.CreationStack
CfnElement.LogicalId
CfnElement.Stack
Namespace: Amazon.CDK.AWS.EC2
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public class CfnCapacityReservation : CfnResource, IInspectable, ICapacityReservationRef, IConstruct, IDependable, IEnvironmentAware
Syntax (vb)
Public Class CfnCapacityReservation Inherits CfnResource Implements IInspectable, ICapacityReservationRef, IConstruct, IDependable, IEnvironmentAware
Remarks

For more information, see Capacity Reservations in the Amazon EC2 User Guide .

See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-capacityreservation.html

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(Construct, string, ICfnCapacityReservationProps)

Create a new AWS::EC2::CapacityReservation.

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

Creates a new Capacity Reservation with the specified attributes.

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

Creates a new Capacity Reservation with the specified attributes.

AttrCreateDate

The date and time 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 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 ID of the Availability Zone in which the capacity is reserved.

CFN_RESOURCE_TYPE_NAME

The CloudFormation resource type name for this resource class.

CapacityReservationRef

A reference to a CapacityReservation resource.

CfnProperties

Creates a new Capacity Reservation with the specified attributes.

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

ArnForCapacityReservation(ICapacityReservationRef)

Creates a new Capacity Reservation with the specified attributes.

FromCapacityReservationArn(Construct, string, string)

Creates a new ICapacityReservationRef from an ARN.

FromCapacityReservationId(Construct, string, string)

Creates a new ICapacityReservationRef from a capacityReservationId.

Inspect(TreeInspector)

Examines the CloudFormation resource and discloses attributes.

IsCfnCapacityReservation(object)

Checks whether the given object is a CfnCapacityReservation.

RenderProperties(IDictionary<string, object>)

Creates a new Capacity Reservation with the specified attributes.

Constructors

CfnCapacityReservation(Construct, string, ICfnCapacityReservationProps)

Create a new AWS::EC2::CapacityReservation.

public CfnCapacityReservation(Construct scope, string id, ICfnCapacityReservationProps props)
Parameters
scope Construct

Scope in which this resource is defined.

id string

Construct identifier for this resource (unique in its scope).

props ICfnCapacityReservationProps

Resource properties.

Remarks

For more information, see Capacity Reservations in the Amazon EC2 User Guide .

See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-capacityreservation.html

CloudformationResource: AWS::EC2::CapacityReservation

ExampleMetadata: fixture=_generated

Properties

AttrAvailabilityZone

Returns the Availability Zone in which the capacity is reserved.

public virtual string AttrAvailabilityZone { get; }
Property Value

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

double

Remarks

For example: 9 .

CloudformationAttribute: AvailableInstanceCount

AttrCapacityAllocationSet

Creates a new Capacity Reservation with the specified attributes.

public virtual IResolvable AttrCapacityAllocationSet { get; }
Property Value

IResolvable

Remarks

CloudformationAttribute: CapacityAllocationSet

AttrCapacityReservationArn

The Amazon Resource Name (ARN) of the Capacity Reservation.

public virtual string AttrCapacityReservationArn { get; }
Property Value

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

string

Remarks

Only valid for Capacity Reservations that were created by a Capacity Reservation Fleet.

CloudformationAttribute: CapacityReservationFleetId

AttrCommitmentInfo

Creates a new Capacity Reservation with the specified attributes.

public virtual IResolvable AttrCommitmentInfo { get; }
Property Value

IResolvable

Remarks

CloudformationAttribute: CommitmentInfo

AttrCreateDate

The date and time the Capacity Reservation was created.

public virtual string AttrCreateDate { get; }
Property Value

string

Remarks

CloudformationAttribute: CreateDate

AttrDeliveryPreference

The delivery method for a future-dated Capacity Reservation.

public virtual string AttrDeliveryPreference { get; }
Property Value

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

string

Remarks

CloudformationAttribute: Id

AttrInstanceType

Returns the type of instance for which the capacity is reserved.

public virtual string AttrInstanceType { get; }
Property Value

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

string

Remarks

CloudformationAttribute: OwnerId

AttrReservationType

The type of Capacity Reservation.

public virtual string AttrReservationType { get; }
Property Value

string

Remarks

CloudformationAttribute: ReservationType

AttrStartDate

The date and time the Capacity Reservation was started.

public virtual string AttrStartDate { get; }
Property Value

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

string

Remarks

    CloudformationAttribute: State

    AttrTenancy

    Returns the tenancy of the Capacity Reservation.

    public virtual string AttrTenancy { get; }
    Property Value

    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

    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

    string

    Remarks

    For more information, see Capacity Reservations in the Amazon EC2 User Guide .

    See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-capacityreservation.html

    CloudformationResource: AWS::EC2::CapacityReservation

    ExampleMetadata: fixture=_generated

    AvailabilityZoneId

    The ID of the Availability Zone in which the capacity is reserved.

    public virtual string? AvailabilityZoneId { get; set; }
    Property Value

    string

    Remarks

    For more information, see Capacity Reservations in the Amazon EC2 User Guide .

    See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-capacityreservation.html

    CloudformationResource: AWS::EC2::CapacityReservation

    ExampleMetadata: fixture=_generated

    CFN_RESOURCE_TYPE_NAME

    The CloudFormation resource type name for this resource class.

    public static string CFN_RESOURCE_TYPE_NAME { get; }
    Property Value

    string

    Remarks

    For more information, see Capacity Reservations in the Amazon EC2 User Guide .

    See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-capacityreservation.html

    CloudformationResource: AWS::EC2::CapacityReservation

    ExampleMetadata: fixture=_generated

    CapacityReservationRef

    A reference to a CapacityReservation resource.

    public virtual ICapacityReservationReference CapacityReservationRef { get; }
    Property Value

    ICapacityReservationReference

    Remarks

    For more information, see Capacity Reservations in the Amazon EC2 User Guide .

    See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-capacityreservation.html

    CloudformationResource: AWS::EC2::CapacityReservation

    ExampleMetadata: fixture=_generated

    CfnProperties

    Creates a new Capacity Reservation with the specified attributes.

    protected override IDictionary<string, object> CfnProperties { get; }
    Property Value

    IDictionary<string, object>

    Overrides
    CfnResource.CfnProperties
    Remarks

    For more information, see Capacity Reservations in the Amazon EC2 User Guide .

    See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-capacityreservation.html

    CloudformationResource: AWS::EC2::CapacityReservation

    ExampleMetadata: fixture=_generated

    EbsOptimized

    Indicates whether the Capacity Reservation supports EBS-optimized instances.

    public virtual object? EbsOptimized { get; set; }
    Property Value

    object

    Remarks

    Type union: either bool or IResolvable

    EndDate

    The date and time at which the Capacity Reservation expires.

    public virtual string? EndDate { get; set; }
    Property Value

    string

    Remarks

    For more information, see Capacity Reservations in the Amazon EC2 User Guide .

    See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-capacityreservation.html

    CloudformationResource: AWS::EC2::CapacityReservation

    ExampleMetadata: fixture=_generated

    EndDateType

    Indicates the way in which the Capacity Reservation ends.

    public virtual string? EndDateType { get; set; }
    Property Value

    string

    Remarks

    For more information, see Capacity Reservations in the Amazon EC2 User Guide .

    See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-capacityreservation.html

    CloudformationResource: AWS::EC2::CapacityReservation

    ExampleMetadata: fixture=_generated

    EphemeralStorage

    Deprecated..

    public virtual object? EphemeralStorage { get; set; }
    Property Value

    object

    Remarks

    Type union: either bool or IResolvable

    InstanceCount

    The number of instances for which to reserve capacity.

    public virtual double InstanceCount { get; set; }
    Property Value

    double

    Remarks

    For more information, see Capacity Reservations in the Amazon EC2 User Guide .

    See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-capacityreservation.html

    CloudformationResource: AWS::EC2::CapacityReservation

    ExampleMetadata: fixture=_generated

    InstanceMatchCriteria

    Indicates the type of instance launches that the Capacity Reservation accepts.

    public virtual string? InstanceMatchCriteria { get; set; }
    Property Value

    string

    Remarks

    The options include:.

    InstancePlatform

    The type of operating system for which to reserve capacity.

    public virtual string InstancePlatform { get; set; }
    Property Value

    string

    Remarks

    For more information, see Capacity Reservations in the Amazon EC2 User Guide .

    See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-capacityreservation.html

    CloudformationResource: AWS::EC2::CapacityReservation

    ExampleMetadata: fixture=_generated

    InstanceType

    The instance type for which to reserve capacity.

    public virtual string InstanceType { get; set; }
    Property Value

    string

    Remarks

    For more information, see Capacity Reservations in the Amazon EC2 User Guide .

    See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-capacityreservation.html

    CloudformationResource: AWS::EC2::CapacityReservation

    ExampleMetadata: fixture=_generated

    OutPostArn

    Not supported for future-dated Capacity Reservations.

    public virtual string? OutPostArn { get; set; }
    Property Value

    string

    Remarks

    For more information, see Capacity Reservations in the Amazon EC2 User Guide .

    See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-capacityreservation.html

    CloudformationResource: AWS::EC2::CapacityReservation

    ExampleMetadata: fixture=_generated

    PlacementGroupArn

    Not supported for future-dated Capacity Reservations.

    public virtual string? PlacementGroupArn { get; set; }
    Property Value

    string

    Remarks

    For more information, see Capacity Reservations in the Amazon EC2 User Guide .

    See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-capacityreservation.html

    CloudformationResource: AWS::EC2::CapacityReservation

    ExampleMetadata: fixture=_generated

    TagSpecifications

    The tags to apply to the Capacity Reservation during launch.

    public virtual object? TagSpecifications { get; set; }
    Property Value

    object

    Remarks

    Type union: either IResolvable or (either IResolvable or CfnCapacityReservation.ITagSpecificationProperty)[]

    Tenancy

    Indicates the tenancy of the Capacity Reservation.

    public virtual string? Tenancy { get; set; }
    Property Value

    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

    string

    Remarks

    For more information, see Capacity Reservations in the Amazon EC2 User Guide .

    See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-capacityreservation.html

    CloudformationResource: AWS::EC2::CapacityReservation

    ExampleMetadata: fixture=_generated

    Methods

    ArnForCapacityReservation(ICapacityReservationRef)

    Creates a new Capacity Reservation with the specified attributes.

    public static string ArnForCapacityReservation(ICapacityReservationRef resource)
    Parameters
    resource ICapacityReservationRef
    Returns

    string

    Remarks

    For more information, see Capacity Reservations in the Amazon EC2 User Guide .

    See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-capacityreservation.html

    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"
                 });

    FromCapacityReservationArn(Construct, string, string)

    Creates a new ICapacityReservationRef from an ARN.

    public static ICapacityReservationRef FromCapacityReservationArn(Construct scope, string id, string arn)
    Parameters
    scope Construct
    id string
    arn string
    Returns

    ICapacityReservationRef

    Remarks

    For more information, see Capacity Reservations in the Amazon EC2 User Guide .

    See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-capacityreservation.html

    CloudformationResource: AWS::EC2::CapacityReservation

    ExampleMetadata: fixture=_generated

    FromCapacityReservationId(Construct, string, string)

    Creates a new ICapacityReservationRef from a capacityReservationId.

    public static ICapacityReservationRef FromCapacityReservationId(Construct scope, string id, string capacityReservationId)
    Parameters
    scope Construct
    id string
    capacityReservationId string
    Returns

    ICapacityReservationRef

    Remarks

    For more information, see Capacity Reservations in the Amazon EC2 User Guide .

    See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-capacityreservation.html

    CloudformationResource: AWS::EC2::CapacityReservation

    ExampleMetadata: fixture=_generated

    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.

    Remarks

    For more information, see Capacity Reservations in the Amazon EC2 User Guide .

    See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-capacityreservation.html

    CloudformationResource: AWS::EC2::CapacityReservation

    ExampleMetadata: fixture=_generated

    IsCfnCapacityReservation(object)

    Checks whether the given object is a CfnCapacityReservation.

    public static bool IsCfnCapacityReservation(object x)
    Parameters
    x object
    Returns

    bool

    Remarks

    For more information, see Capacity Reservations in the Amazon EC2 User Guide .

    See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-capacityreservation.html

    CloudformationResource: AWS::EC2::CapacityReservation

    ExampleMetadata: fixture=_generated

    RenderProperties(IDictionary<string, object>)

    Creates a new Capacity Reservation with the specified attributes.

    protected override IDictionary<string, object> RenderProperties(IDictionary<string, object> props)
    Parameters
    props IDictionary<string, object>
    Returns

    IDictionary<string, object>

    Overrides
    CfnResource.RenderProperties(IDictionary<string, object>)
    Remarks

    For more information, see Capacity Reservations in the Amazon EC2 User Guide .

    See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-capacityreservation.html

    CloudformationResource: AWS::EC2::CapacityReservation

    ExampleMetadata: fixture=_generated

    Implements

    IInspectable
    ICapacityReservationRef
    Constructs.IConstruct
    Constructs.IDependable
    IEnvironmentAware
    Back to top Generated by DocFX