EC2 / Client / describe_capacity_block_offerings
describe_capacity_block_offerings#
- EC2.Client.describe_capacity_block_offerings(**kwargs)#
Describes Capacity Block offerings available for purchase in the Amazon Web Services Region that you’re currently using. With Capacity Blocks, you purchase a specific instance type for a period of time.
See also: AWS API Documentation
Request Syntax
response = client.describe_capacity_block_offerings( DryRun=True|False, InstanceType='string', InstanceCount=123, StartDateRange=datetime(2015, 1, 1), EndDateRange=datetime(2015, 1, 1), CapacityDurationHours=123, NextToken='string', MaxResults=123 )
- Parameters:
DryRun (boolean) – 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
.InstanceType (string) –
[REQUIRED]
The type of instance for which the Capacity Block offering reserves capacity.
InstanceCount (integer) –
[REQUIRED]
The number of instances for which to reserve capacity.
StartDateRange (datetime) – The earliest start date for the Capacity Block offering.
EndDateRange (datetime) – The latest end date for the Capacity Block offering.
CapacityDurationHours (integer) –
[REQUIRED]
The number of hours for which to reserve Capacity Block.
NextToken (string) – The token to use to retrieve the next page of results.
MaxResults (integer) – 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.
- Return type:
dict
- Returns:
Response Syntax
{ 'CapacityBlockOfferings': [ { 'CapacityBlockOfferingId': 'string', 'InstanceType': 'string', 'AvailabilityZone': 'string', 'InstanceCount': 123, 'StartDate': datetime(2015, 1, 1), 'EndDate': datetime(2015, 1, 1), 'CapacityBlockDurationHours': 123, 'UpfrontFee': 'string', 'CurrencyCode': 'string', 'Tenancy': 'default'|'dedicated' }, ], 'NextToken': 'string' }
Response Structure
(dict) –
CapacityBlockOfferings (list) –
The recommended Capacity Block offering for the dates specified.
(dict) –
The recommended Capacity Block that fits your search requirements.
CapacityBlockOfferingId (string) –
The ID of the Capacity Block offering.
InstanceType (string) –
The instance type of the Capacity Block offering.
AvailabilityZone (string) –
The Availability Zone of the Capacity Block offering.
InstanceCount (integer) –
The number of instances in the Capacity Block offering.
StartDate (datetime) –
The start date of the Capacity Block offering.
EndDate (datetime) –
The end date of the Capacity Block offering.
CapacityBlockDurationHours (integer) –
The amount of time of the Capacity Block reservation in hours.
UpfrontFee (string) –
The total price to be paid up front.
CurrencyCode (string) –
The currency of the payment for the Capacity Block.
Tenancy (string) –
The tenancy of the Capacity Block.
NextToken (string) –
The token to use to retrieve the next page of results. This value is
null
when there are no more results to return.