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, unused_reservation_billing_owner_id=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 - 1000instance_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 toexpired
when it reaches its end date and time. You must provide anEndDate
value ifEndDateType
islimited
. OmitEndDate
ifEndDateType
isunlimited
. If theEndDateType
islimited
, 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 anEndDate
if theEndDateType
isunlimited
. -limited
- The Capacity Reservation expires automatically at a specified date and time. You must provide anEndDate
value if theEndDateType
value islimited
.ephemeral_storage (
Union
[bool
,IResolvable
,None
]) – Deprecated..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 .unused_reservation_billing_owner_id (
Optional
[str
]) – The ID of the AWS account to which to assign billing of the unused capacity of the Capacity Reservation. 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 .
- See:
- ExampleMetadata:
fixture=_generated
Example:
# The code below shows an example of how to instantiate this type. # The values are placeholders you should change. from aws_cdk import 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", unused_reservation_billing_owner_id="unusedReservationBillingOwnerId" )
Attributes
- availability_zone
The Availability Zone in which to create the Capacity Reservation.
- 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.
- 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 ifEndDateType
islimited
. OmitEndDate
ifEndDateType
isunlimited
.If the
EndDateType
islimited
, 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
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 anEndDate
if theEndDateType
isunlimited
.limited
- The Capacity Reservation expires automatically at a specified date and time. You must provide anEndDate
value if theEndDateType
value islimited
.
- ephemeral_storage
Deprecated..
- instance_count
The number of instances for which to reserve capacity.
Valid range: 1 - 1000
- 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
- See:
- Type:
Indicates the type of instance launches that the Capacity Reservation accepts. The options include
- instance_platform
The type of operating system for which to reserve capacity.
- instance_type
The instance type for which to reserve capacity.
For more information, see Instance types in the Amazon EC2 User Guide .
- out_post_arn
The Amazon Resource Name (ARN) of the Outpost on which to create the Capacity Reservation.
- 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 .
- tag_specifications
The tags to apply to the Capacity Reservation during launch.
- 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 .
- See:
- Type:
Indicates the tenancy of the Capacity Reservation. A Capacity Reservation can have one of the following tenancy settings
- unused_reservation_billing_owner_id
The ID of the AWS account to which to assign billing of the unused capacity of the Capacity Reservation.
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 .