Skip to content

ModifyCapacityReservationRequest

Source code in docs_src/capo_ec2/types/modify_capacity_reservation_request.py
class ModifyCapacityReservationRequest(TypedDict, closed=True):
    capacity_reservation_id: NotRequired[
        "capo_ec2.types.capacity_reservation_id.CapacityReservationId"
    ]
    """<p>The ID of the Capacity Reservation.</p>"""
    instance_count: NotRequired["capo_ec2.types.integer.Integer"]
    """<p>The number of instances for which to reserve capacity. The number of instances can't be increased or decreased by more than <code>1000</code> in a single request.</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>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>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>"""
    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> value if <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 <code>EndDateType</code> is <code>limited</code>.</p> </li> </ul>"""
    accept: NotRequired["capo_ec2.types.boolean.Boolean"]
    """<p>Reserved. Capacity Reservations you have created are accepted by default.</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>"""
    additional_info: NotRequired["capo_ec2.types.string.String"]
    """<p>Reserved for future use.</p>"""
    instance_match_criteria: NotRequired[
        "capo_ec2.types.instance_match_criteria.InstanceMatchCriteria"
    ]
    """<p> The matching criteria (instance eligibility) that you want to use in the modified Capacity Reservation. If you change the instance eligibility of an existing Capacity Reservation from <code>targeted</code> to <code>open</code>, any running instances that match the attributes of the Capacity Reservation, have the <code>CapacityReservationPreference</code> set to <code>open</code>, and are not yet running in the Capacity Reservation, will automatically use the modified Capacity Reservation. </p> <p>To modify the instance eligibility, the Capacity Reservation must be completely idle (zero usage).</p>"""
    accept_modification_terms: NotRequired["capo_ec2.types.boolean.Boolean"]
    """<p>Indicates that you accept the modification terms of the quote identified by <code>QuoteId</code>. To apply a quoted modification, set this parameter to <code>true</code>.</p>"""
    start_date: NotRequired["capo_ec2.types.millisecond_date_time.MillisecondDateTime"]
    """<p>The new start date for the Capacity Reservation, in the ISO8601 format in the UTC time zone (<code>YYYY-MM-DDThh:mm:ss.sssZ</code>). Applies to future-dated Capacity Reservations only. Requires a quote from <code>CreateCapacityReservationDateChangeQuote</code>; pass the quote ID in <code>QuoteId</code> with <code>AcceptModificationTerms</code> set to <code>true</code>.</p>"""
    quote_id: NotRequired[
        "capo_ec2.types.capacity_reservation_modification_quote_id.CapacityReservationModificationQuoteId"
    ]
    """<p>The ID of the quote that describes the modification you want to apply. Generate a quote by using <code>CreateCapacityReservationDateChangeQuote</code>. The quote must be in the <code>active</code> state, and each quote can be used only once.</p>"""

accept instance-attribute

accept: NotRequired[Boolean]

Reserved. Capacity Reservations you have created are accepted by default.

accept_modification_terms instance-attribute

accept_modification_terms: NotRequired[Boolean]

Indicates that you accept the modification terms of the quote identified by QuoteId. To apply a quoted modification, set this parameter to true.

additional_info instance-attribute

additional_info: NotRequired[String]

Reserved for future use.

capacity_reservation_id instance-attribute

capacity_reservation_id: NotRequired[CapacityReservationId]

The ID of the Capacity Reservation.

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.

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.

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.

You must provide an EndDate value if EndDateType is limited. Omit EndDate if EndDateType is unlimited.

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 value if EndDateType is unlimited.

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

instance_count instance-attribute

instance_count: NotRequired[Integer]

The number of instances for which to reserve capacity. The number of instances can't be increased or decreased by more than 1000 in a single request.

instance_match_criteria instance-attribute

instance_match_criteria: NotRequired[InstanceMatchCriteria]

The matching criteria (instance eligibility) that you want to use in the modified Capacity Reservation. If you change the instance eligibility of an existing Capacity Reservation from targeted to open, any running instances that match the attributes of the Capacity Reservation, have the CapacityReservationPreference set to open, and are not yet running in the Capacity Reservation, will automatically use the modified Capacity Reservation.

To modify the instance eligibility, the Capacity Reservation must be completely idle (zero usage).

quote_id instance-attribute

The ID of the quote that describes the modification you want to apply. Generate a quote by using CreateCapacityReservationDateChangeQuote. The quote must be in the active state, and each quote can be used only once.

start_date instance-attribute

start_date: NotRequired[MillisecondDateTime]

The new start date for the Capacity Reservation, in the ISO8601 format in the UTC time zone (YYYY-MM-DDThh:mm:ss.sssZ). Applies to future-dated Capacity Reservations only. Requires a quote from CreateCapacityReservationDateChangeQuote; pass the quote ID in QuoteId with AcceptModificationTerms set to true.