Billing / Paginator / ListBillingViewSegments

ListBillingViewSegments

class Billing.Paginator.ListBillingViewSegments
paginator = client.get_paginator('list_billing_view_segments')
paginate(**kwargs)

Creates an iterator that will paginate through responses from Billing.Client.list_billing_view_segments().

See also: AWS API Documentation

Request Syntax

response_iterator = paginator.paginate(
    timeRange={
        'beginDateInclusive': datetime(2015, 1, 1),
        'endDateExclusive': datetime(2015, 1, 1)
    },
    arn='string',
    PaginationConfig={
        'MaxItems': 123,
        'PageSize': 123,
        'StartingToken': 'string'
    }
)
Parameters:
  • timeRange (dict) –

    The billing period to query. If you don’t provide a time range, the current billing period, which is the calendar month in UTC, is used.

    • beginDateInclusive (datetime) –

      The inclusive start of the time range. This value can’t be in the future.

    • endDateExclusive (datetime) –

      The exclusive end of the time range. This value must be after beginDateInclusive.

  • arn (string) – The Amazon Resource Name (ARN) that uniquely identifies the billing view to query. If you don’t provide an ARN, the caller’s PRIMARY billing view is used. The ARN must reference a primary billing view. Custom billing views aren’t supported.

  • PaginationConfig (dict) –

    A dictionary that provides parameters to control pagination.

    • MaxItems (integer) –

      The total number of items to return. If the total number of items available is more than the value specified in max-items then a NextToken will be provided in the output that you can use to resume pagination.

    • PageSize (integer) –

      The size of each page.

    • StartingToken (string) –

      A token to specify where to start paginating. This is the NextToken from a previous response.

Return type:

dict

Returns:

Response Syntax

{
    'items': [
        {
            'domain': 'BILLABLE'|'PRO_FORMA',
            'timeRange': {
                'beginDateInclusive': datetime(2015, 1, 1),
                'endDateExclusive': datetime(2015, 1, 1)
            },
            'billingTransferAccountId': 'string',
            'managementAccountId': 'string',
            'billingGroupPrimaryAccountId': 'string'
        },
    ],
    'NextToken': 'string'
}

Response Structure

  • (dict) –

    • items (list) –

      A list of billing view segments. Each segment covers a portion of the requested time period. The response omits hidden segments, so the segments it returns might not cover the entire requested time period.

      • (dict) –

        A billing view segment. A segment represents a time range during which the billing domain and account relationships for a billing view remained unchanged.

        • domain (string) –

          The billing domain for this segment. The following values are valid:

          • PRO_FORMA - Data shaped by Billing Conductor that doesn’t reflect the final charges owed to Amazon Web Services.

          • BILLABLE - Data that represents the final charges owed to Amazon Web Services.

        • timeRange (dict) –

          The time range during which this segment is effective.

          • beginDateInclusive (datetime) –

            The inclusive start of the time range. This value can’t be in the future.

          • endDateExclusive (datetime) –

            The exclusive end of the time range. This value must be after beginDateInclusive.

        • billingTransferAccountId (string) –

          The billing transfer account ID. The response includes this field only when the caller is a billing transfer source account. The response omits this field for billing group billing views.

        • managementAccountId (string) –

          The management account ID of the organization. The response includes this field for organization member accounts.

        • billingGroupPrimaryAccountId (string) –

          The billing group primary account ID. The response includes this field for billing group members. Compare this value to your own account ID to determine whether you are the primary account.

    • NextToken (string) –

      A token to resume pagination.