EC2 / Client / purchase_capacity_block_extension
purchase_capacity_block_extension#
- EC2.Client.purchase_capacity_block_extension(**kwargs)#
Purchase the Capacity Block extension for use with your account. You must specify the ID of the Capacity Block extension offering you are purchasing.
See also: AWS API Documentation
Request Syntax
response = client.purchase_capacity_block_extension( CapacityBlockExtensionOfferingId='string', CapacityReservationId='string', DryRun=True|False )
- Parameters:
CapacityBlockExtensionOfferingId (string) –
[REQUIRED]
The ID of the Capacity Block extension offering to purchase.
CapacityReservationId (string) –
[REQUIRED]
The ID of the Capacity reservation to be extended.
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
.
- Return type:
dict
- Returns:
Response Syntax
{ 'CapacityBlockExtensions': [ { 'CapacityReservationId': 'string', 'InstanceType': 'string', 'InstanceCount': 123, 'AvailabilityZone': 'string', 'AvailabilityZoneId': 'string', 'CapacityBlockExtensionOfferingId': 'string', 'CapacityBlockExtensionDurationHours': 123, 'CapacityBlockExtensionStatus': 'payment-pending'|'payment-failed'|'payment-succeeded', 'CapacityBlockExtensionPurchaseDate': datetime(2015, 1, 1), 'CapacityBlockExtensionStartDate': datetime(2015, 1, 1), 'CapacityBlockExtensionEndDate': datetime(2015, 1, 1), 'UpfrontFee': 'string', 'CurrencyCode': 'string' }, ] }
Response Structure
(dict) –
CapacityBlockExtensions (list) –
The purchased Capacity Block extensions.
(dict) –
Describes a Capacity Block extension. With an extension, you can extend the duration of time for an existing Capacity Block.
CapacityReservationId (string) –
The reservation ID of the Capacity Block extension.
InstanceType (string) –
The instance type of the Capacity Block extension.
InstanceCount (integer) –
The number of instances in the Capacity Block extension.
AvailabilityZone (string) –
The Availability Zone of the Capacity Block extension.
AvailabilityZoneId (string) –
The Availability Zone ID of the Capacity Block extension.
CapacityBlockExtensionOfferingId (string) –
The ID of the Capacity Block extension offering.
CapacityBlockExtensionDurationHours (integer) –
The duration of the Capacity Block extension in hours.
CapacityBlockExtensionStatus (string) –
The status of the Capacity Block extension. A Capacity Block extension can have one of the following statuses:
payment-pending
- The Capacity Block extension payment is processing. If your payment can’t be processed within 12 hours, the Capacity Block extension is failed.payment-failed
- Payment for the Capacity Block extension request was not successful.payment-succeeded
- Payment for the Capacity Block extension request was successful. You receive an invoice that reflects the one-time upfront payment. In the invoice, you can associate the paid amount with the Capacity Block reservation ID.
CapacityBlockExtensionPurchaseDate (datetime) –
The date when the Capacity Block extension was purchased.
CapacityBlockExtensionStartDate (datetime) –
The start date of the Capacity Block extension.
CapacityBlockExtensionEndDate (datetime) –
The end date of the Capacity Block extension.
UpfrontFee (string) –
The total price to be paid up front.
CurrencyCode (string) –
The currency of the payment for the Capacity Block extension.