CfnCapacityReservationPropsMixin
- class aws_cdk.mixins_preview.aws_ec2.mixins.CfnCapacityReservationPropsMixin(props, *, strategy=None)
Bases:
MixinCreates a new Capacity Reservation with the specified attributes.
For more information, see Capacity Reservations in the Amazon EC2 User Guide .
- See:
- CloudformationResource:
AWS::EC2::CapacityReservation
- Mixin:
true
- 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.mixins_preview import mixins from aws_cdk.mixins_preview.aws_ec2 import mixins as ec2_mixins cfn_capacity_reservation_props_mixin = ec2_mixins.CfnCapacityReservationPropsMixin(ec2_mixins.CfnCapacityReservationMixinProps( availability_zone="availabilityZone", availability_zone_id="availabilityZoneId", ebs_optimized=False, end_date="endDate", end_date_type="endDateType", ephemeral_storage=False, instance_count=123, instance_match_criteria="instanceMatchCriteria", instance_platform="instancePlatform", instance_type="instanceType", out_post_arn="outPostArn", placement_group_arn="placementGroupArn", tag_specifications=[ec2_mixins.CfnCapacityReservationPropsMixin.TagSpecificationProperty( resource_type="resourceType", tags=[CfnTag( key="key", value="value" )] )], tenancy="tenancy", unused_reservation_billing_owner_id="unusedReservationBillingOwnerId" ), strategy=mixins.PropertyMergeStrategy.OVERRIDE )
Create a mixin to apply properties to
AWS::EC2::CapacityReservation.- Parameters:
props (
Union[CfnCapacityReservationMixinProps,Dict[str,Any]]) – L1 properties to apply.strategy (
Optional[PropertyMergeStrategy]) – (experimental) Strategy for merging nested properties. Default: - PropertyMergeStrategy.MERGE
Methods
- apply_to(construct)
Apply the mixin properties to the construct.
- Parameters:
construct (
IConstruct)- Return type:
- supports(construct)
Check if this mixin supports the given construct.
- Parameters:
construct (
IConstruct)- Return type:
bool
Attributes
- CFN_PROPERTY_KEYS = ['availabilityZone', 'availabilityZoneId', 'ebsOptimized', 'endDate', 'endDateType', 'ephemeralStorage', 'instanceCount', 'instanceMatchCriteria', 'instancePlatform', 'instanceType', 'outPostArn', 'placementGroupArn', 'tagSpecifications', 'tenancy', 'unusedReservationBillingOwnerId']
Static Methods
- classmethod is_mixin(x)
(experimental) Checks if
xis a Mixin.- Parameters:
x (
Any) – Any object.- Return type:
bool- Returns:
true if
xis an object created from a class which extendsMixin.- Stability:
experimental
CapacityAllocationProperty
- class CfnCapacityReservationPropsMixin.CapacityAllocationProperty(*, allocation_type=None, count=None)
Bases:
objectInformation about instance capacity usage for a Capacity Reservation.
- Parameters:
allocation_type (
Optional[str]) – The usage type.usedindicates that the instance capacity is in use by instances that are running in the Capacity Reservation.count (
Union[int,float,None]) – The amount of instance capacity associated with the usage. For example a value of4indicates that instance capacity for 4 instances is currently in use.
- 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.mixins_preview.aws_ec2 import mixins as ec2_mixins capacity_allocation_property = ec2_mixins.CfnCapacityReservationPropsMixin.CapacityAllocationProperty( allocation_type="allocationType", count=123 )
Attributes
- allocation_type
The usage type.
usedindicates that the instance capacity is in use by instances that are running in the Capacity Reservation.
- count
The amount of instance capacity associated with the usage.
For example a value of
4indicates that instance capacity for 4 instances is currently in use.
CommitmentInfoProperty
- class CfnCapacityReservationPropsMixin.CommitmentInfoProperty(*, commitment_end_date=None, committed_instance_count=None)
Bases:
objectInformation about your commitment for a future-dated Capacity Reservation.
- Parameters:
commitment_end_date (
Optional[str]) – The date and time at which the commitment duration expires, in the ISO8601 format in the UTC time zone (YYYY-MM-DDThh:mm:ss.sssZ). You can’t decrease the instance count or cancel the Capacity Reservation before this date and time.committed_instance_count (
Union[int,float,None]) – The instance capacity that you committed to when you requested the future-dated Capacity Reservation.
- 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.mixins_preview.aws_ec2 import mixins as ec2_mixins commitment_info_property = ec2_mixins.CfnCapacityReservationPropsMixin.CommitmentInfoProperty( commitment_end_date="commitmentEndDate", committed_instance_count=123 )
Attributes
- commitment_end_date
The date and time at which the commitment duration expires, in the ISO8601 format in the UTC time zone (
YYYY-MM-DDThh:mm:ss.sssZ). You can’t decrease the instance count or cancel the Capacity Reservation before this date and time.
- committed_instance_count
The instance capacity that you committed to when you requested the future-dated Capacity Reservation.