EC2 / Client / describe_capacity_reservation_billing_requests

describe_capacity_reservation_billing_requests#

EC2.Client.describe_capacity_reservation_billing_requests(**kwargs)#

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.

See also: AWS API Documentation

Request Syntax

response = client.describe_capacity_reservation_billing_requests(
    CapacityReservationIds=[
        'string',
    ],
    Role='odcr-owner'|'unused-reservation-billing-owner',
    NextToken='string',
    MaxResults=123,
    Filters=[
        {
            'Name': 'string',
            'Values': [
                'string',
            ]
        },
    ],
    DryRun=True|False
)
Parameters:
  • CapacityReservationIds (list) –

    The ID of the Capacity Reservation.

    • (string) –

  • Role (string) –

    [REQUIRED]

    Specify 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.

  • NextToken (string) – The token to use to retrieve the next page of results.

  • 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.

  • Filters (list) –

    One 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.

    • (dict) –

      A filter name and value pair that is used to return a more specific list of results from a describe operation. Filters can be used to match a set of resources by specific criteria, such as tags, attributes, or IDs.

      If you specify multiple filters, the filters are joined with an AND, and the request returns only results that match all of the specified filters.

      • Name (string) –

        The name of the filter. Filter names are case-sensitive.

      • Values (list) –

        The filter values. Filter values are case-sensitive. If you specify multiple values for a filter, the values are joined with an OR, and the request returns all results that match any of the specified values.

        • (string) –

  • 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.

Return type:

dict

Returns:

Response Syntax

{
    'NextToken': 'string',
    'CapacityReservationBillingRequests': [
        {
            'CapacityReservationId': 'string',
            'RequestedBy': 'string',
            'UnusedReservationBillingOwnerId': 'string',
            'LastUpdateTime': datetime(2015, 1, 1),
            'Status': 'pending'|'accepted'|'rejected'|'cancelled'|'revoked'|'expired',
            'StatusMessage': 'string',
            'CapacityReservationInfo': {
                'InstanceType': 'string',
                'AvailabilityZone': 'string',
                'Tenancy': 'default'|'dedicated'
            }
        },
    ]
}

Response Structure

  • (dict) –

    • NextToken (string) –

      The token to use to retrieve the next page of results. This value is null when there are no more results to return.

    • CapacityReservationBillingRequests (list) –

      Information about the request.

      • (dict) –

        Information about a request to assign billing of the unused capacity of a Capacity Reservation.

        • CapacityReservationId (string) –

          The ID of the Capacity Reservation.

        • RequestedBy (string) –

          The ID of the Amazon Web Services account that initiated the request.

        • UnusedReservationBillingOwnerId (string) –

          The ID of the Amazon Web Services account to which the request was sent.

        • LastUpdateTime (datetime) –

          The date and time, in UTC time format, at which the request was initiated.

        • Status (string) –

          The status of the request. For more information, see View billing assignment requests for a shared Amazon EC2 Capacity Reservation.

        • StatusMessage (string) –

          Information about the status.

        • CapacityReservationInfo (dict) –

          Information about the Capacity Reservation.

          • InstanceType (string) –

            The instance type for the Capacity Reservation.

          • AvailabilityZone (string) –

            The Availability Zone for the Capacity Reservation.

          • Tenancy (string) –

            The tenancy of the Capacity Reservation.