Skip to content

CreateCapacityReservationRequest

Source code in docs_src/capo_ec2/types/create_capacity_reservation_request.py
class CreateCapacityReservationRequest(TypedDict, closed=True):
    client_token: NotRequired["capo_ec2.types.string.String"]
    """<p>Unique, case-sensitive identifier that you provide to ensure the idempotency of the request. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/Run_Instance_Idempotency.html">Ensure Idempotency</a>.</p>"""
    instance_type: NotRequired["capo_ec2.types.string.String"]
    """<p>The instance type for which to reserve capacity.</p> <note> <p>You can request future-dated Capacity Reservations for instance types in the C, M, R, I, T, and G instance families only.</p> </note> <p>For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instance-types.html">Instance types</a> in the <i>Amazon EC2 User Guide</i>.</p>"""
    instance_platform: NotRequired[
        "capo_ec2.types.capacity_reservation_instance_platform.CapacityReservationInstancePlatform"
    ]
    """<p>The type of operating system for which to reserve capacity.</p>"""
    availability_zone: NotRequired[
        "capo_ec2.types.availability_zone_name.AvailabilityZoneName"
    ]
    """<p>The Availability Zone in which to create the Capacity Reservation.</p>"""
    availability_zone_id: NotRequired[
        "capo_ec2.types.availability_zone_id.AvailabilityZoneId"
    ]
    """<p>The ID of the Availability Zone in which to create the Capacity Reservation.</p>"""
    tenancy: NotRequired[
        "capo_ec2.types.capacity_reservation_tenancy.CapacityReservationTenancy"
    ]
    """<p>Indicates the tenancy of the Capacity Reservation. A Capacity Reservation can have one of the following tenancy settings:</p> <ul> <li> <p> <code>default</code> - The Capacity Reservation is created on hardware that is shared with other Amazon Web Services accounts.</p> </li> <li> <p> <code>dedicated</code> - The Capacity Reservation is created on single-tenant hardware that is dedicated to a single Amazon Web Services account.</p> </li> </ul>"""
    instance_count: NotRequired["capo_ec2.types.integer.Integer"]
    """<p>The number of instances for which to reserve capacity.</p> <note> <p>You can request future-dated Capacity Reservations for an instance count with a minimum of 32 vCPUs. For example, if you request a future-dated Capacity Reservation for <code>m5.xlarge</code> instances, you must request at least 8 instances (<i>8 * m5.xlarge = 32 vCPUs</i>).</p> </note> <p>Valid range: 1 - 1000</p>"""
    ebs_optimized: NotRequired["capo_ec2.types.boolean.Boolean"]
    """<p>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.</p>"""
    ephemeral_storage: NotRequired["capo_ec2.types.boolean.Boolean"]
    """<p> <i>Deprecated.</i> </p>"""
    end_date: NotRequired["capo_ec2.types.date_time.DateTime"]
    """<p>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 <code>expired</code> when it reaches its end date and time.</p> <p>You must provide an <code>EndDate</code> value if <code>EndDateType</code> is <code>limited</code>. Omit <code>EndDate</code> if <code>EndDateType</code> is <code>unlimited</code>.</p> <p>If the <code>EndDateType</code> is <code>limited</code>, 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.</p> <p>If you are requesting a future-dated Capacity Reservation, you can't specify an end date and time that is within the commitment duration.</p>"""
    end_date_type: NotRequired["capo_ec2.types.end_date_type.EndDateType"]
    """<p>Indicates the way in which the Capacity Reservation ends. A Capacity Reservation can have one of the following end types:</p> <ul> <li> <p> <code>unlimited</code> - The Capacity Reservation remains active until you explicitly cancel it. Do not provide an <code>EndDate</code> if the <code>EndDateType</code> is <code>unlimited</code>.</p> </li> <li> <p> <code>limited</code> - The Capacity Reservation expires automatically at a specified date and time. You must provide an <code>EndDate</code> value if the <code>EndDateType</code> value is <code>limited</code>.</p> </li> </ul>"""
    instance_match_criteria: NotRequired[
        "capo_ec2.types.instance_match_criteria.InstanceMatchCriteria"
    ]
    """<p>Indicates the type of instance launches that the Capacity Reservation accepts. The options include:</p> <ul> <li> <p> <code>open</code> - 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.</p> </li> <li> <p> <code>targeted</code> - 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. </p> </li> </ul> <note> <p>If you are requesting a future-dated Capacity Reservation, you must specify <code>targeted</code>.</p> </note> <p>Default: <code>open</code> </p>"""
    tag_specifications: NotRequired[
        "capo_ec2.types.tag_specification_list.TagSpecificationList"
    ]
    """<p>The tags to apply to the Capacity Reservation during launch.</p>"""
    dry_run: NotRequired["capo_ec2.types.boolean.Boolean"]
    """<p>Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is <code>DryRunOperation</code>. Otherwise, it is <code>UnauthorizedOperation</code>.</p>"""
    outpost_arn: NotRequired["capo_ec2.types.outpost_arn.OutpostArn"]
    """<note> <p>Not supported for future-dated Capacity Reservations.</p> </note> <p>The Amazon Resource Name (ARN) of the Outpost on which to create the Capacity Reservation.</p>"""
    placement_group_arn: NotRequired[
        "capo_ec2.types.placement_group_arn.PlacementGroupArn"
    ]
    """<note> <p>Not supported for future-dated Capacity Reservations.</p> </note> <p>The Amazon Resource Name (ARN) of the cluster placement group in which to create the Capacity Reservation. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/cr-cpg.html"> Capacity Reservations for cluster placement groups</a> in the <i>Amazon EC2 User Guide</i>.</p>"""
    start_date: NotRequired["capo_ec2.types.millisecond_date_time.MillisecondDateTime"]
    """<note> <p>Required for future-dated Capacity Reservations only. To create a Capacity Reservation for immediate use, omit this parameter. </p> </note> <p>The date and time at which the future-dated Capacity Reservation should become available for use, in the ISO8601 format in the UTC time zone (<code>YYYY-MM-DDThh:mm:ss.sssZ</code>).</p> <p>You can request a future-dated Capacity Reservation between 5 and 120 days in advance.</p>"""
    commitment_duration: NotRequired[
        "capo_ec2.types.capacity_reservation_commitment_duration.CapacityReservationCommitmentDuration"
    ]
    """<note> <p>Required for future-dated Capacity Reservations only. To create a Capacity Reservation for immediate use, omit this parameter. </p> </note> <p>Specify a commitment duration, in seconds, for the future-dated Capacity Reservation.</p> <p>The commitment duration is a minimum duration for which you commit to having the future-dated Capacity Reservation in the <code>active</code> state in your account after it has been delivered.</p> <p>For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/cr-concepts.html#cr-commitment-duration"> Commitment duration</a>.</p>"""
    delivery_preference: NotRequired[
        "capo_ec2.types.capacity_reservation_delivery_preference.CapacityReservationDeliveryPreference"
    ]
    """<note> <p>Required for future-dated Capacity Reservations only. To create a Capacity Reservation for immediate use, omit this parameter. </p> </note> <p>Indicates that the requested capacity will be delivered in addition to any running instances or reserved capacity that you have in your account at the requested date and time.</p> <p>The only supported value is <code>incremental</code>.</p>"""

availability_zone instance-attribute

availability_zone: NotRequired[AvailabilityZoneName]

The Availability Zone in which to create the Capacity Reservation.

availability_zone_id instance-attribute

availability_zone_id: NotRequired[AvailabilityZoneId]

The ID of the Availability Zone in which to create the Capacity Reservation.

client_token instance-attribute

client_token: NotRequired[String]

Unique, case-sensitive identifier that you provide to ensure the idempotency of the request. For more information, see Ensure Idempotency.

commitment_duration instance-attribute

commitment_duration: NotRequired[CapacityReservationCommitmentDuration]

Required for future-dated Capacity Reservations only. To create a Capacity Reservation for immediate use, omit this parameter.

Specify a commitment duration, in seconds, for the future-dated Capacity Reservation.

The commitment duration is a minimum duration for which you commit to having the future-dated Capacity Reservation in the active state in your account after it has been delivered.

For more information, see Commitment duration.

delivery_preference instance-attribute

delivery_preference: NotRequired[CapacityReservationDeliveryPreference]

Required for future-dated Capacity Reservations only. To create a Capacity Reservation for immediate use, omit this parameter.

Indicates that the requested capacity will be delivered in addition to any running instances or reserved capacity that you have in your account at the requested date and time.

The only supported value is incremental.

dry_run instance-attribute

dry_run: NotRequired[Boolean]

Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation. Otherwise, it is UnauthorizedOperation.

ebs_optimized instance-attribute

ebs_optimized: NotRequired[Boolean]

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 instance-attribute

end_date: NotRequired[DateTime]

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.

If you are requesting a future-dated Capacity Reservation, you can't specify an end date and time that is within the commitment duration.

end_date_type instance-attribute

end_date_type: NotRequired[EndDateType]

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 instance-attribute

ephemeral_storage: NotRequired[Boolean]

Deprecated.

instance_count instance-attribute

instance_count: NotRequired[Integer]

The number of instances for which to reserve capacity.

You can request future-dated Capacity Reservations for an instance count with a minimum of 32 vCPUs. For example, if you request a future-dated Capacity Reservation for m5.xlarge instances, you must request at least 8 instances (8 * m5.xlarge = 32 vCPUs).

Valid range: 1 - 1000

instance_match_criteria instance-attribute

instance_match_criteria: NotRequired[InstanceMatchCriteria]

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.

If you are requesting a future-dated Capacity Reservation, you must specify targeted.

Default: open

instance_platform instance-attribute

instance_platform: NotRequired[CapacityReservationInstancePlatform]

The type of operating system for which to reserve capacity.

instance_type instance-attribute

instance_type: NotRequired[String]

The instance type for which to reserve capacity.

You can request future-dated Capacity Reservations for instance types in the C, M, R, I, T, and G instance families only.

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

outpost_arn instance-attribute

outpost_arn: NotRequired[OutpostArn]

Not supported for future-dated Capacity Reservations.

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

placement_group_arn instance-attribute

placement_group_arn: NotRequired[PlacementGroupArn]

Not supported for future-dated Capacity Reservations.

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.

start_date instance-attribute

start_date: NotRequired[MillisecondDateTime]

Required for future-dated Capacity Reservations only. To create a Capacity Reservation for immediate use, omit this parameter.

The date and time at which the future-dated Capacity Reservation should become available for use, in the ISO8601 format in the UTC time zone (YYYY-MM-DDThh🇲🇲ss.sssZ).

You can request a future-dated Capacity Reservation between 5 and 120 days in advance.

tag_specifications instance-attribute

tag_specifications: NotRequired[TagSpecificationList]

The tags to apply to the Capacity Reservation during launch.

tenancy instance-attribute

tenancy: NotRequired[CapacityReservationTenancy]

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 Amazon Web Services accounts.

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