Skip to main content

capacity_reservation_billing_requests

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

Overview

Namecapacity_reservation_billing_requests
TypeResource
Idaws.ec2.capacity_reservation_billing_requests

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
capacity_reservation_idstringThe ID of the Capacity Reservation.
capacity_reservation_infostringInformation about the Capacity Reservation.
last_update_timestringThe date and time, in UTC time format, at which the request was initiated.
requested_bystringThe ID of the Amazon Web Services account that initiated the request.
statusstringThe status of the request. For more information, see View billing assignment requests for a shared Amazon EC2 Capacity Reservation.
status_messagestringInformation about the status.
unused_reservation_billing_owner_idstringThe ID of the Amazon Web Services account to which the request was sent.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
describe_capacity_reservation_billing_requestsselectRole, regionCapacityReservationId, NextToken, MaxResults, Filter, DryRunDescribes a request to assign the billing of the unused capacity of a Capacity Reservation. For more information, see Billing assignment for shared Amazon EC2 Capacity Reservations.

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
RolestringSpecify one of the following: odcr-owner - If you are the Capacity Reservation owner, specify this value to view requests that you have initiated. Not supported with the requested-by filter. unused-reservation-billing-owner - If you are the consumer account, specify this value to view requests that have been sent to you. Not supported with the unused-reservation-billing-owner filter.
regionstringAWS region (default: us-east-1)
CapacityReservationIdarrayThe ID of the Capacity Reservation.
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. status - The state of the request (pending | accepted | rejected | cancelled | revoked | expired). requested-by - The account ID of the Capacity Reservation owner that initiated the request. Not supported if you specify requested-by for Role. unused-reservation-billing-owner - The ID of the consumer account to which the request was sent. Not supported if you specify unused-reservation-billing-owner for Role.
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 a request to assign the billing of the unused capacity of a Capacity Reservation. For more information, see Billing assignment for shared Amazon EC2 Capacity Reservations.

SELECT
capacity_reservation_id,
capacity_reservation_info,
last_update_time,
requested_by,
status,
status_message,
unused_reservation_billing_owner_id
FROM aws.ec2.capacity_reservation_billing_requests
WHERE Role = '{{ Role }}' -- required
AND region = '{{ region }}' -- required
AND CapacityReservationId = '{{ CapacityReservationId }}'
AND NextToken = '{{ NextToken }}'
AND MaxResults = '{{ MaxResults }}'
AND Filter = '{{ Filter }}'
AND DryRun = '{{ DryRun }}'
;