reservations
Creates, updates, deletes, gets or lists a reservations resource.
Overview
| Name | reservations |
| Type | Resource |
| Id | aws.mediaconnect.reservations |
Fields
The following fields are returned by SELECT queries:
- describe_reservation
- list_reservations
| Name | Datatype | Description |
|---|---|---|
currency_code | string | The type of currency that is used for billing. The currencyCode used for your reservation is US dollars. |
duration | integer | The length of time that this reservation is active. MediaConnect defines this value in the offering. |
duration_units | string | The unit of measurement for the duration of the reservation. MediaConnect defines this value in the offering. (MONTHS) |
end | string | The 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_arn | string | The Amazon Resource Name (ARN) that MediaConnect assigns to the offering. |
offering_description | string | A description of the offering. MediaConnect defines this value in the offering. |
price_per_unit | string | The cost of a single unit. This value, in combination with priceUnits, makes up the rate. MediaConnect defines this value in the offering. |
price_units | string | The 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_arn | string | The Amazon Resource Name (ARN) that MediaConnect assigns to the reservation when you purchase an offering. |
reservation_name | string | The name that you assigned to the reservation when you purchased the offering. |
reservation_state | string | The status of your reservation. (ACTIVE, EXPIRED, PROCESSING, CANCELED) |
resource_specification | object | A 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. |
start | string | The day and time that the reservation becomes active. You set this value when you purchase the offering. |
| Name | Datatype | Description |
|---|---|---|
currency_code | string | The type of currency that is used for billing. The currencyCode used for your reservation is US dollars. |
duration | integer | The length of time that this reservation is active. MediaConnect defines this value in the offering. |
duration_units | string | The unit of measurement for the duration of the reservation. MediaConnect defines this value in the offering. (MONTHS) |
end | string | The 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_arn | string | The Amazon Resource Name (ARN) that MediaConnect assigns to the offering. |
offering_description | string | A description of the offering. MediaConnect defines this value in the offering. |
price_per_unit | string | The cost of a single unit. This value, in combination with priceUnits, makes up the rate. MediaConnect defines this value in the offering. |
price_units | string | The 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_arn | string | The Amazon Resource Name (ARN) that MediaConnect assigns to the reservation when you purchase an offering. |
reservation_name | string | The name that you assigned to the reservation when you purchased the offering. |
reservation_state | string | The status of your reservation. (ACTIVE, EXPIRED, PROCESSING, CANCELED) |
resource_specification | object | A 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. |
start | string | The 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:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
describe_reservation | select | reservation_arn, region | 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). | |
list_reservations | select | region | maxResults, nextToken | Displays 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_offering | exec | offering_arn, region, ReservationName | Submits 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.
| Name | Datatype | Description |
|---|---|---|
offering_arn | string | The Amazon Resource Name (ARN) of the offering. |
region | string | AWS region (default: us-east-1) |
reservation_arn | string | The Amazon Resource Name (ARN) of the offering. |
maxResults | integer | The 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. |
nextToken | string | The 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
- describe_reservation
- list_reservations
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
;
Displays 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).
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 region = '{{ region }}' -- required
AND maxResults = '{{ maxResults }}'
AND nextToken = '{{ nextToken }}'
;
Lifecycle Methods
- purchase_offering
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 }}"
}'
;