create_interruptible_capacity_reservation_allocation
¶
create_interruptible_capacity_reservation_allocation(
*,
config_overrides: Optional[EC2ClientConfig] = 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/ec2.py
8992 8993 8994 8995 8996 8997 8998 8999 9000 9001 9002 9003 9004 9005 9006 9007 9008 9009 9010 9011 9012 9013 9014 9015 9016 9017 9018 9019 9020 9021 9022 9023 9024 9025 9026 9027 9028 9029 9030 9031 9032 9033 9034 9035 9036 9037 9038 9039 9040 9041 9042 9043 9044 9045 9046 9047 9048 9049 9050 9051 9052 9053 9054 9055 9056 9057 9058 9059 9060 9061 9062 | |