Skip to main content

reservations

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

Overview

Namereservations
TypeResource
Idaws.mediaconnect.reservations

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
currency_codestringThe type of currency that is used for billing. The currencyCode used for your reservation is US dollars.
durationintegerThe length of time that this reservation is active. MediaConnect defines this value in the offering.
duration_unitsstringThe unit of measurement for the duration of the reservation. MediaConnect defines this value in the offering. (MONTHS)
endstringThe day and time that this reservation expires. This value is calculated based on the start date and time that you set and the offering's duration.
offering_arnstringThe Amazon Resource Name (ARN) that MediaConnect assigns to the offering.
offering_descriptionstringA description of the offering. MediaConnect defines this value in the offering.
price_per_unitstringThe cost of a single unit. This value, in combination with priceUnits, makes up the rate. MediaConnect defines this value in the offering.
price_unitsstringThe unit of measurement that is used for billing. This value, in combination with pricePerUnit, makes up the rate. MediaConnect defines this value in the offering. (HOURLY)
reservation_arnstringThe Amazon Resource Name (ARN) that MediaConnect assigns to the reservation when you purchase an offering.
reservation_namestringThe name that you assigned to the reservation when you purchased the offering.
reservation_statestringThe status of your reservation. (ACTIVE, EXPIRED, PROCESSING, CANCELED)
resource_specificationobjectA definition of the amount of outbound bandwidth that you would be reserving if you purchase the offering. MediaConnect defines the values that make up the resourceSpecification in the offering.
startstringThe day and time that the reservation becomes active. You set this value when you purchase the offering.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
describe_reservationselectreservation_arn, regionDisplays the details of a reservation. The response includes the reservation name, state, start date and time, and the details of the offering that make up the rest of the reservation (such as price, duration, and outbound bandwidth).
list_reservationsselectregionmaxResults, nextTokenDisplays a list of all reservations that have been purchased by this account in the current Amazon Web Services Region. This list includes all reservations in all states (such as active and expired).
purchase_offeringexecoffering_arn, region, ReservationNameSubmits a request to purchase an offering. If you already have an active reservation, you can't purchase another offering.

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
offering_arnstringThe Amazon Resource Name (ARN) of the offering.
regionstringAWS region (default: us-east-1)
reservation_arnstringThe Amazon Resource Name (ARN) of the offering.
maxResultsintegerThe maximum number of results to return per API request. For example, you submit a ListReservations request with MaxResults set at 5. Although 20 items match your request, the service returns no more than the first 5 items. (The service also returns a NextToken value that you can use to fetch the next batch of results.) The service might return fewer results than the MaxResults value. If MaxResults is not included in the request, the service defaults to pagination with a maximum of 10 results per page.
nextTokenstringThe token that identifies the batch of results that you want to see. For example, you submit a ListReservations request with MaxResults set at 5. The service returns the first batch of results (up to 5) and a NextToken value. To see the next batch of results, you can submit the ListOfferings request a second time and specify the NextToken value.

SELECT examples

Displays the details of a reservation. The response includes the reservation name, state, start date and time, and the details of the offering that make up the rest of the reservation (such as price, duration, and outbound bandwidth).

SELECT
currency_code,
duration,
duration_units,
end,
offering_arn,
offering_description,
price_per_unit,
price_units,
reservation_arn,
reservation_name,
reservation_state,
resource_specification,
start
FROM aws.mediaconnect.reservations
WHERE reservation_arn = '{{ reservation_arn }}' -- required
AND region = '{{ region }}' -- required
;

Lifecycle Methods

Submits a request to purchase an offering. If you already have an active reservation, you can't purchase another offering.

EXEC aws.mediaconnect.reservations.purchase_offering
@offering_arn='{{ offering_arn }}' --required,
@region='{{ region }}' --required
@@json=
'{
"ReservationName": "{{ ReservationName }}",
"Start": "{{ Start }}"
}'
;