CfnCapacityReservationProps

class aws_cdk.aws_ec2.CfnCapacityReservationProps(*, availability_zone, instance_count, instance_platform, instance_type, ebs_optimized=None, end_date=None, end_date_type=None, ephemeral_storage=None, instance_match_criteria=None, out_post_arn=None, placement_group_arn=None, tag_specifications=None, tenancy=None)

Bases: object

Properties for defining a CfnCapacityReservation.

Parameters
  • availability_zone (str) – The Availability Zone in which to create the Capacity Reservation.

  • instance_count (Union[int, float]) – The number of instances for which to reserve capacity. Valid range: 1 - 1000

  • instance_platform (str) – The type of operating system for which to reserve capacity.

  • instance_type (str) – The instance type for which to reserve capacity. For more information, see Instance types in the Amazon EC2 User Guide .

  • ebs_optimized (Union[bool, IResolvable, None]) – Indicates whether the Capacity Reservation supports EBS-optimized instances. 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.

  • end_date (Optional[str]) – 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. 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.

  • end_date_type (Optional[str]) – Indicates the way in which the Capacity Reservation ends. A Capacity Reservation can have one of the following end types: - unlimited - The Capacity Reservation remains active until you explicitly cancel it. Do not provide an EndDate if the EndDateType is unlimited . - limited - The Capacity Reservation expires automatically at a specified date and time. You must provide an EndDate value if the EndDateType value is limited .

  • ephemeral_storage (Union[bool, IResolvable, None]) – Indicates whether the Capacity Reservation supports instances with temporary, block-level storage.

  • instance_match_criteria (Optional[str]) – Indicates the type of instance launches that the Capacity Reservation accepts. The options include:. - open - The Capacity Reservation automatically matches all instances that have matching attributes (instance type, platform, and Availability Zone). Instances that have matching attributes run in the Capacity Reservation automatically without specifying any additional parameters. - targeted - The Capacity Reservation only accepts instances that have matching attributes (instance type, platform, and Availability Zone), and explicitly target the Capacity Reservation. This ensures that only permitted instances can use the reserved capacity. Default: open

  • out_post_arn (Optional[str]) – The Amazon Resource Name (ARN) of the Outpost on which to create the Capacity Reservation.

  • placement_group_arn (Optional[str]) – 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 .

  • tag_specifications (Union[IResolvable, Sequence[Union[IResolvable, TagSpecificationProperty, Dict[str, Any]]], None]) – The tags to apply to the Capacity Reservation during launch.

  • tenancy (Optional[str]) – Indicates the tenancy of the Capacity Reservation. A Capacity Reservation can have one of the following tenancy settings:. - default - The Capacity Reservation is created on hardware that is shared with other AWS accounts . - dedicated - The Capacity Reservation is created on single-tenant hardware that is dedicated to a single AWS account .

Link

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

ExampleMetadata

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
import aws_cdk.aws_ec2 as ec2

cfn_capacity_reservation_props = ec2.CfnCapacityReservationProps(
    availability_zone="availabilityZone",
    instance_count=123,
    instance_platform="instancePlatform",
    instance_type="instanceType",

    # the properties below are optional
    ebs_optimized=False,
    end_date="endDate",
    end_date_type="endDateType",
    ephemeral_storage=False,
    instance_match_criteria="instanceMatchCriteria",
    out_post_arn="outPostArn",
    placement_group_arn="placementGroupArn",
    tag_specifications=[ec2.CfnCapacityReservation.TagSpecificationProperty(
        resource_type="resourceType",
        tags=[CfnTag(
            key="key",
            value="value"
        )]
    )],
    tenancy="tenancy"
)

Attributes

availability_zone

The Availability Zone in which to create the Capacity Reservation.

Link

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

Return type

str

ebs_optimized

Indicates whether the Capacity Reservation supports EBS-optimized instances.

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.

Link

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

Return type

Union[bool, IResolvable, None]

end_date

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. 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.

Link

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

Return type

Optional[str]

end_date_type

Indicates the way in which the Capacity Reservation ends.

A Capacity Reservation can have one of the following end types:

  • unlimited - The Capacity Reservation remains active until you explicitly cancel it. Do not provide an EndDate if the EndDateType is unlimited .

  • limited - The Capacity Reservation expires automatically at a specified date and time. You must provide an EndDate value if the EndDateType value is limited .

Link

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

Return type

Optional[str]

ephemeral_storage

Indicates whether the Capacity Reservation supports instances with temporary, block-level storage.

Link

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

Return type

Union[bool, IResolvable, None]

instance_count

The number of instances for which to reserve capacity.

Valid range: 1 - 1000

Link

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

Return type

Union[int, float]

instance_match_criteria

.

  • open - The Capacity Reservation automatically matches all instances that have matching attributes (instance type, platform, and Availability Zone). Instances that have matching attributes run in the Capacity Reservation automatically without specifying any additional parameters.

  • targeted - The Capacity Reservation only accepts instances that have matching attributes (instance type, platform, and Availability Zone), and explicitly target the Capacity Reservation. This ensures that only permitted instances can use the reserved capacity.

Default: open

Link

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

Type

Indicates the type of instance launches that the Capacity Reservation accepts. The options include

Return type

Optional[str]

instance_platform

The type of operating system for which to reserve capacity.

Link

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

Return type

str

instance_type

The instance type for which to reserve capacity.

For more information, see Instance types in the Amazon EC2 User Guide .

Link

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

Return type

str

out_post_arn

The Amazon Resource Name (ARN) of the Outpost on which to create the Capacity Reservation.

Link

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

Return type

Optional[str]

placement_group_arn

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 .

Link

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

Return type

Optional[str]

tag_specifications

The tags to apply to the Capacity Reservation during launch.

Link

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

Return type

Union[IResolvable, List[Union[IResolvable, TagSpecificationProperty]], None]

tenancy

.

  • default - The Capacity Reservation is created on hardware that is shared with other AWS accounts .

  • dedicated - The Capacity Reservation is created on single-tenant hardware that is dedicated to a single AWS account .

Link

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

Type

Indicates the tenancy of the Capacity Reservation. A Capacity Reservation can have one of the following tenancy settings

Return type

Optional[str]