CfnCapacityReservationPropsMixin

class aws_cdk.mixins_preview.aws_ec2.mixins.CfnCapacityReservationPropsMixin(props, *, strategy=None)

Bases: Mixin

Creates a new Capacity Reservation with the specified attributes.

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

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:

Methods

apply_to(construct)

Apply the mixin properties to the construct.

Parameters:

construct (IConstruct)

Return type:

IConstruct

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 x is a Mixin.

Parameters:

x (Any) – Any object.

Return type:

bool

Returns:

true if x is an object created from a class which extends Mixin.

Stability:

experimental

CapacityAllocationProperty

class CfnCapacityReservationPropsMixin.CapacityAllocationProperty(*, allocation_type=None, count=None)

Bases: object

Information about instance capacity usage for a Capacity Reservation.

Parameters:
  • allocation_type (Optional[str]) – The usage type. used indicates 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 of 4 indicates that instance capacity for 4 instances is currently in use.

See:

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

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.

used indicates that the instance capacity is in use by instances that are running in the Capacity Reservation.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-capacityreservation-capacityallocation.html#cfn-ec2-capacityreservation-capacityallocation-allocationtype

count

The amount of instance capacity associated with the usage.

For example a value of 4 indicates that instance capacity for 4 instances is currently in use.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-capacityreservation-capacityallocation.html#cfn-ec2-capacityreservation-capacityallocation-count

CommitmentInfoProperty

class CfnCapacityReservationPropsMixin.CommitmentInfoProperty(*, commitment_end_date=None, committed_instance_count=None)

Bases: object

Information 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:

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

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.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-capacityreservation-commitmentinfo.html#cfn-ec2-capacityreservation-commitmentinfo-commitmentenddate

committed_instance_count

The instance capacity that you committed to when you requested the future-dated Capacity Reservation.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-capacityreservation-commitmentinfo.html#cfn-ec2-capacityreservation-commitmentinfo-committedinstancecount

TagSpecificationProperty

class CfnCapacityReservationPropsMixin.TagSpecificationProperty(*, resource_type=None, tags=None)

Bases: object

An array of key-value pairs to apply to this resource.

For more information, see Tag .

Parameters:
  • resource_type (Optional[str]) – The type of resource to tag. Specify capacity-reservation .

  • tags (Optional[Sequence[Union[CfnTag, Dict[str, Any]]]]) – The tags to apply to the resource.

See:

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

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

tag_specification_property = ec2_mixins.CfnCapacityReservationPropsMixin.TagSpecificationProperty(
    resource_type="resourceType",
    tags=[CfnTag(
        key="key",
        value="value"
    )]
)

Attributes

resource_type

The type of resource to tag.

Specify capacity-reservation .

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-capacityreservation-tagspecification.html#cfn-ec2-capacityreservation-tagspecification-resourcetype

tags

The tags to apply to the resource.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-capacityreservation-tagspecification.html#cfn-ec2-capacityreservation-tagspecification-tags