Skip to main content

capacity_block_extension_offerings

Creates, updates, deletes, gets or lists a capacity_block_extension_offerings resource.

Overview

Namecapacity_block_extension_offerings
TypeResource
Idaws.ec2.capacity_block_extension_offerings

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
availability_zonestringThe Availability Zone of the Capacity Block that will be extended.
availability_zone_idstringThe Availability Zone ID of the Capacity Block that will be extended.
capacity_block_extension_duration_hoursintegerThe amount of time of the Capacity Block extension offering in hours.
capacity_block_extension_end_datestringThe date and time at which the Capacity Block extension expires. When a Capacity Block expires, the reserved capacity is released and you can no longer launch instances into it. The Capacity Block's state changes to expired when it reaches its end date
capacity_block_extension_offering_idstringThe ID of the Capacity Block extension offering.
capacity_block_extension_start_datestringThe date and time at which the Capacity Block extension will start. This date is also the same as the end date of the Capacity Block that will be extended.
currency_codestringThe currency of the payment for the Capacity Block extension offering.
instance_countintegerThe number of instances in the Capacity Block extension offering.
instance_typestringThe instance type of the Capacity Block that will be extended.
start_datestringThe start date of the Capacity Block that will be extended.
tenancystringIndicates the tenancy of the Capacity Block extension offering. A Capacity Block can have one of the following tenancy settings: default - The Capacity Block is created on hardware that is shared with other Amazon Web Services accounts. dedicated - The Capacity Block is created on single-tenant hardware that is dedicated to a single Amazon Web Services account.
upfront_feestringThe total price of the Capacity Block extension offering, to be paid up front.
zone_typestringThe type of zone where the Capacity Block extension offering is available.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
describe_capacity_block_extension_offeringsselectCapacityBlockExtensionDurationHours, CapacityReservationId, regionDryRun, NextToken, MaxResultsDescribes Capacity Block extension offerings available for purchase in the Amazon Web Services Region that you're currently using.
purchase_capacity_block_extensionexecCapacityBlockExtensionOfferingId, CapacityReservationId, regionDryRunPurchase the Capacity Block extension for use with your account. You must specify the ID of the Capacity Block extension offering you are purchasing.

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
CapacityBlockExtensionDurationHoursintegerThe duration of the Capacity Block extension offering in hours.
CapacityBlockExtensionOfferingIdstringThe ID of the Capacity Block extension offering to purchase.
CapacityReservationIdstringThe ID of the Capacity reservation to be extended.
regionstringAWS region (default: us-east-1)
DryRunbooleanChecks 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 is UnauthorizedOperation.
MaxResultsintegerThe 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.
NextTokenstringThe token to use to retrieve the next page of results.

SELECT examples

Describes Capacity Block extension offerings available for purchase in the Amazon Web Services Region that you're currently using.

SELECT
availability_zone,
availability_zone_id,
capacity_block_extension_duration_hours,
capacity_block_extension_end_date,
capacity_block_extension_offering_id,
capacity_block_extension_start_date,
currency_code,
instance_count,
instance_type,
start_date,
tenancy,
upfront_fee,
zone_type
FROM aws.ec2.capacity_block_extension_offerings
WHERE CapacityBlockExtensionDurationHours = '{{ CapacityBlockExtensionDurationHours }}' -- required
AND CapacityReservationId = '{{ CapacityReservationId }}' -- required
AND region = '{{ region }}' -- required
AND DryRun = '{{ DryRun }}'
AND NextToken = '{{ NextToken }}'
AND MaxResults = '{{ MaxResults }}'
;

Lifecycle Methods

Purchase the Capacity Block extension for use with your account. You must specify the ID of the Capacity Block extension offering you are purchasing.

EXEC aws.ec2.capacity_block_extension_offerings.purchase_capacity_block_extension
@CapacityBlockExtensionOfferingId='{{ CapacityBlockExtensionOfferingId }}' --required,
@CapacityReservationId='{{ CapacityReservationId }}' --required,
@region='{{ region }}' --required,
@DryRun={{ DryRun }}
;