create_interruptible_capacity_reservation_allocation
async
¶
create_interruptible_capacity_reservation_allocation(
*,
config_overrides: Optional[AsyncEC2ClientConfig] = None,
capacity_reservation_id: Optional[CapacityReservationId] = None,
instance_count: Optional[Integer] = None,
client_token: Optional[String] = None,
dry_run: Optional[Boolean] = None,
tag_specifications: Optional[TagSpecificationList] = None,
zero_size_preference: Optional[ZeroSizePreference] = None,
) -> CreateInterruptibleCapacityReservationAllocationResult
Creates an interruptible Capacity Reservation by specifying the number of unused instances you want to allocate from your source reservation. This helps you make unused capacity available for other workloads within your account while maintaining control to reclaim it.
Parameters:
-
capacity_reservation_id(Optional[CapacityReservationId], default:None) –The ID of the source Capacity Reservation from which to create the interruptible Capacity Reservation. Your Capacity Reservation must be in active state with no end date set and have available capacity for allocation.
-
instance_count(Optional[Integer], default:None) –The number of instances to allocate from your source reservation. You can only allocate available instances (also called unused capacity).
-
client_token(Optional[String], default:None) –Unique, case-sensitive identifier that you provide to ensure the idempotency of the request.
-
dry_run(Optional[Boolean], default:None) –Checks whether you have the required permissions for the action, without actually making the request, and provides an error response.
-
tag_specifications(Optional[TagSpecificationList], default:None) –The tags to apply to the interruptible Capacity Reservation during creation.
-
zero_size_preference(Optional[ZeroSizePreference], default:None) –Specifies the 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. The default value isdefault.
Raises:
-
UnknownServiceError–The service returned an error code this client does not model.
Source code in docs_src/capo_ec2/_services/async_ec2.py
9093 9094 9095 9096 9097 9098 9099 9100 9101 9102 9103 9104 9105 9106 9107 9108 9109 9110 9111 9112 9113 9114 9115 9116 9117 9118 9119 9120 9121 9122 9123 9124 9125 9126 9127 9128 9129 9130 9131 9132 9133 9134 9135 9136 9137 9138 9139 9140 9141 9142 9143 9144 9145 9146 9147 9148 9149 9150 9151 9152 9153 9154 9155 9156 9157 9158 9159 9160 9161 9162 9163 9164 | |