EC2 / Client / update_interruptible_capacity_reservation_allocation

update_interruptible_capacity_reservation_allocation

EC2.Client.update_interruptible_capacity_reservation_allocation(**kwargs)

Modifies the number of instances allocated to an interruptible reservation, allowing you to add more capacity or reclaim capacity to your source Capacity Reservation.

See also: AWS API Documentation

Request Syntax

response = client.update_interruptible_capacity_reservation_allocation(
    CapacityReservationId='string',
    TargetInstanceCount=123,
    DryRun=True|False
)
Parameters:
  • CapacityReservationId (string) –

    [REQUIRED]

    The ID of the source Capacity Reservation containing the interruptible allocation to modify.

  • TargetInstanceCount (integer) –

    [REQUIRED]

    The new number of instances to allocate. Enter a higher number to add more capacity to share, or a lower number to reclaim capacity to your source Capacity Reservation.

  • DryRun (boolean) – Checks whether you have the required permissions for the action, without actually making the request, and provides an error response.

Return type:

dict

Returns:

Response Syntax

{
    'InterruptibleCapacityReservationId': 'string',
    'SourceCapacityReservationId': 'string',
    'InstanceCount': 123,
    'TargetInstanceCount': 123,
    'Status': 'pending'|'active'|'updating'|'canceling'|'canceled'|'failed',
    'InterruptionType': 'adhoc'
}

Response Structure

  • (dict) –

    • InterruptibleCapacityReservationId (string) –

      The ID of the interruptible Capacity Reservation that was modified.

    • SourceCapacityReservationId (string) –

      The ID of the source Capacity Reservation to which capacity was reclaimed or from which capacity was allocated.

    • InstanceCount (integer) –

      The current number of instances allocated to the interruptible reservation.

    • TargetInstanceCount (integer) –

      The requested number of instances for the interruptible Capacity Reservation.

    • Status (string) –

      The current status of the allocation (updating during reclamation, active when complete).

    • InterruptionType (string) –

      The interruption type for the interruptible reservation.