capacity_block_extension_offerings
Creates, updates, deletes, gets or lists a capacity_block_extension_offerings resource.
Overview
| Name | capacity_block_extension_offerings |
| Type | Resource |
| Id | aws.ec2.capacity_block_extension_offerings |
Fields
The following fields are returned by SELECT queries:
- describe_capacity_block_extension_offerings
| Name | Datatype | Description |
|---|---|---|
availability_zone | string | The Availability Zone of the Capacity Block that will be extended. |
availability_zone_id | string | The Availability Zone ID of the Capacity Block that will be extended. |
capacity_block_extension_duration_hours | integer | The amount of time of the Capacity Block extension offering in hours. |
capacity_block_extension_end_date | string | The 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_id | string | The ID of the Capacity Block extension offering. |
capacity_block_extension_start_date | string | The 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_code | string | The currency of the payment for the Capacity Block extension offering. |
instance_count | integer | The number of instances in the Capacity Block extension offering. |
instance_type | string | The instance type of the Capacity Block that will be extended. |
start_date | string | The start date of the Capacity Block that will be extended. |
tenancy | string | Indicates 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_fee | string | The total price of the Capacity Block extension offering, to be paid up front. |
zone_type | string | The type of zone where the Capacity Block extension offering is available. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
describe_capacity_block_extension_offerings | select | CapacityBlockExtensionDurationHours, CapacityReservationId, region | DryRun, NextToken, MaxResults | Describes Capacity Block extension offerings available for purchase in the Amazon Web Services Region that you're currently using. |
purchase_capacity_block_extension | exec | CapacityBlockExtensionOfferingId, CapacityReservationId, region | DryRun | Purchase 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.
| Name | Datatype | Description |
|---|---|---|
CapacityBlockExtensionDurationHours | integer | The duration of the Capacity Block extension offering in hours. |
CapacityBlockExtensionOfferingId | string | The ID of the Capacity Block extension offering to purchase. |
CapacityReservationId | string | The ID of the Capacity reservation to be extended. |
region | string | AWS region (default: us-east-1) |
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 is UnauthorizedOperation. |
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. |
NextToken | string | The token to use to retrieve the next page of results. |
SELECT examples
- describe_capacity_block_extension_offerings
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_capacity_block_extension
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 }}
;