purchase_capacity_block
async
¶
purchase_capacity_block(
*,
config_overrides: Optional[AsyncEC2ClientConfig] = None,
dry_run: Optional[Boolean] = None,
tag_specifications: Optional[TagSpecificationList] = None,
capacity_block_offering_id: Optional[OfferingId] = None,
instance_platform: Optional[CapacityReservationInstancePlatform] = None,
) -> PurchaseCapacityBlockResult
Purchase the Capacity Block for use with your account. With Capacity Blocks you ensure GPU capacity is available for machine learning (ML) workloads. You must specify the ID of the Capacity Block offering you are purchasing.
Parameters:
-
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. If you have the required permissions, the error response is
DryRunOperation. Otherwise, it isUnauthorizedOperation. -
tag_specifications(Optional[TagSpecificationList], default:None) –The tags to apply to the Capacity Block during launch.
-
capacity_block_offering_id(Optional[OfferingId], default:None) –The ID of the Capacity Block offering.
-
instance_platform(Optional[CapacityReservationInstancePlatform], default:None) –The type of operating system for which to reserve capacity.
Raises:
-
UnknownServiceError–The service returned an error code this client does not model.
Source code in docs_src/capo_ec2/_services/async_ec2.py
56392 56393 56394 56395 56396 56397 56398 56399 56400 56401 56402 56403 56404 56405 56406 56407 56408 56409 56410 56411 56412 56413 56414 56415 56416 56417 56418 56419 56420 56421 56422 56423 56424 56425 56426 56427 56428 56429 56430 56431 56432 56433 56434 56435 56436 56437 56438 56439 56440 56441 56442 56443 56444 56445 56446 56447 56448 56449 56450 56451 56452 56453 | |