purchase_capacity_block
¶
purchase_capacity_block(
*,
config_overrides: Optional[EC2ClientConfig] = 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/ec2.py
55618 55619 55620 55621 55622 55623 55624 55625 55626 55627 55628 55629 55630 55631 55632 55633 55634 55635 55636 55637 55638 55639 55640 55641 55642 55643 55644 55645 55646 55647 55648 55649 55650 55651 55652 55653 55654 55655 55656 55657 55658 55659 55660 55661 55662 55663 55664 55665 55666 55667 55668 55669 55670 55671 55672 55673 55674 55675 55676 55677 55678 | |