Skip to main content

capacity_reservation_cancellation_quotes

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

Overview

Namecapacity_reservation_cancellation_quotes
TypeResource
Idaws.ec2.capacity_reservation_cancellation_quotes

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
cancellation_termsstringThe cancellation terms associated with the quote, including the fee type and charge details.
capacity_reservation_cancellation_quote_idstringThe ID of the cancellation quote.
capacity_reservation_idstringThe ID of the Capacity Reservation associated with the cancellation quote.
create_timestringThe date and time at which the cancellation quote was created.
current_configurationstringThe current configuration of the Capacity Reservation.
expiration_timestringThe date and time at which the cancellation quote expires.
quote_statestringThe state of the cancellation quote. Possible values include pending, active, and expired.
tagsstringThe tags assigned to the cancellation quote.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
describe_capacity_reservation_cancellation_quotesselectregionCapacityReservationCancellationQuoteId, MaxResults, NextToken, DryRun, FilterDescribes one or more Capacity Reservation cancellation quotes. The results describe only the quotes that you have previously generated by using the CreateCapacityReservationCancellationQuote action.
create_capacity_reservation_cancellation_quoteinsertCapacityReservationId, regionClientToken, TagSpecification, DryRunGenerates a cancellation quote for a future-dated Capacity Reservation that is within its commitment duration. The quote includes the cancellation terms and a quote ID that you can pass to the CancelCapacityReservation action. Cancellation quotes are valid for 24 hours.

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
CapacityReservationIdstringThe ID of the Capacity Reservation.
regionstringAWS region (default: us-east-1)
CapacityReservationCancellationQuoteIdarrayThe IDs of the cancellation quotes to describe.
ClientTokenstringUnique, case-sensitive identifier that you provide to ensure the idempotency of the request. For more information, see Ensure Idempotency.
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.
FilterarrayOne or more filters. Filter names and values are case-sensitive.
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.
TagSpecificationarrayThe tags to apply to the cancellation quote.

SELECT examples

Describes one or more Capacity Reservation cancellation quotes. The results describe only the quotes that you have previously generated by using the CreateCapacityReservationCancellationQuote action.

SELECT
cancellation_terms,
capacity_reservation_cancellation_quote_id,
capacity_reservation_id,
create_time,
current_configuration,
expiration_time,
quote_state,
tags
FROM aws.ec2.capacity_reservation_cancellation_quotes
WHERE region = '{{ region }}' -- required
AND CapacityReservationCancellationQuoteId = '{{ CapacityReservationCancellationQuoteId }}'
AND MaxResults = '{{ MaxResults }}'
AND NextToken = '{{ NextToken }}'
AND DryRun = '{{ DryRun }}'
AND Filter = '{{ Filter }}'
;

INSERT examples

Generates a cancellation quote for a future-dated Capacity Reservation that is within its commitment duration. The quote includes the cancellation terms and a quote ID that you can pass to the CancelCapacityReservation action. Cancellation quotes are valid for 24 hours.

INSERT INTO aws.ec2.capacity_reservation_cancellation_quotes (
CapacityReservationId,
region,
ClientToken,
TagSpecification,
DryRun
)
SELECT
'{{ CapacityReservationId }}',
'{{ region }}',
'{{ ClientToken }}',
'{{ TagSpecification }}',
'{{ DryRun }}'
RETURNING
cancellation_terms,
capacity_reservation_cancellation_quote_id,
capacity_reservation_id,
create_time,
current_configuration,
expiration_time,
quote_state,
tags
;