describe_capacity_block_offerings
¶
describe_capacity_block_offerings(
*,
config_overrides: Optional[EC2ClientConfig] = 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/ec2.py
22178 22179 22180 22181 22182 22183 22184 22185 22186 22187 22188 22189 22190 22191 22192 22193 22194 22195 22196 22197 22198 22199 22200 22201 22202 22203 22204 22205 22206 22207 22208 22209 22210 22211 22212 22213 22214 22215 22216 22217 22218 22219 22220 22221 22222 22223 22224 22225 22226 22227 22228 22229 22230 22231 22232 22233 22234 22235 22236 22237 22238 22239 22240 22241 22242 22243 22244 22245 22246 22247 22248 22249 22250 22251 22252 22253 22254 22255 22256 22257 22258 22259 22260 22261 22262 22263 22264 22265 22266 | |