describe_capacity_block_offerings
async
¶
describe_capacity_block_offerings(
*,
config_overrides: Optional[AsyncEC2ClientConfig] = None,
dry_run: Optional[Boolean] = None,
instance_type: Optional[String] = None,
instance_count: Optional[Integer] = None,
start_date_range: Optional[MillisecondDateTime] = None,
end_date_range: Optional[MillisecondDateTime] = None,
capacity_duration_hours: Optional[Integer] = None,
next_token: Optional[String] = None,
max_results: Optional[DescribeCapacityBlockOfferingsMaxResults] = None,
ultraserver_type: Optional[String] = None,
ultraserver_count: Optional[Integer] = None,
all_availability_zones: Optional[Boolean] = None,
) -> DescribeCapacityBlockOfferingsResult
Describes Capacity Block offerings available for purchase in the Amazon Web Services Region that you're currently using. With Capacity Blocks, you can purchase a specific GPU instance type or EC2 UltraServer for a period of time.
To search for an available Capacity Block offering, you specify a reservation duration and instance count.
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. -
instance_type(Optional[String], default:None) –The type of instance for which the Capacity Block offering reserves capacity.
-
instance_count(Optional[Integer], default:None) –The number of instances for which to reserve capacity. Each Capacity Block can have up to 64 instances, and you can have up to 256 instances across Capacity Blocks.
-
start_date_range(Optional[MillisecondDateTime], default:None) –The earliest start date for the Capacity Block offering.
-
end_date_range(Optional[MillisecondDateTime], default:None) –The latest end date for the Capacity Block offering.
-
capacity_duration_hours(Optional[Integer], default:None) –The reservation duration for the Capacity Block, in hours. You must specify the duration in 1-day increments up 14 days, and in 7-day increments up to 182 days.
-
next_token(Optional[String], default:None) –The token to use to retrieve the next page of results.
-
max_results(Optional[DescribeCapacityBlockOfferingsMaxResults], default:None) –The maximum number of items to return for this request. To get the next page of items, make another request with the token returned in the output. For more information, see Pagination.
-
ultraserver_type(Optional[String], default:None) –The EC2 UltraServer type of the Capacity Block offerings.
-
ultraserver_count(Optional[Integer], default:None) –The number of EC2 UltraServers in the offerings.
-
all_availability_zones(Optional[Boolean], default:None) –Include all Availability Zones and Local Zones, regardless of your opt-in status. If you do not use this parameter, the results include available offerings from all Availability Zones in the Amazon Web Services Region and Local Zones you are opted into.
Raises:
-
UnknownServiceError–The service returned an error code this client does not model.
Source code in docs_src/capo_ec2/_services/async_ec2.py
22493 22494 22495 22496 22497 22498 22499 22500 22501 22502 22503 22504 22505 22506 22507 22508 22509 22510 22511 22512 22513 22514 22515 22516 22517 22518 22519 22520 22521 22522 22523 22524 22525 22526 22527 22528 22529 22530 22531 22532 22533 22534 22535 22536 22537 22538 22539 22540 22541 22542 22543 22544 22545 22546 22547 22548 22549 22550 22551 22552 22553 22554 22555 22556 22557 22558 22559 22560 22561 22562 22563 22564 22565 22566 22567 22568 22569 22570 22571 22572 22573 22574 22575 22576 22577 22578 22579 22580 22581 22582 | |