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, ZeroSizePreference='retain'|'default' )
- Parameters:
CapacityReservationId (string) –
[REQUIRED]
The ID of the source Capacity Reservation containing the interruptible allocation to modify.
TargetInstanceCount (integer) – 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.
ZeroSizePreference (string) – Specifies the updated behavior for the interruptible Capacity Reservation when you reduce its allocation to zero instances. Specify
retainto keep the interruptible Capacity Reservation active at zero capacity so that you can allocate instances to it again later. Specifydefaultto cancel the interruptible Capacity Reservation and return the capacity to your source Capacity Reservation.
- 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.