Billing / Client / list_billing_view_segments
list_billing_view_segments¶
- Billing.Client.list_billing_view_segments(**kwargs)¶
Lists the segments of a billing view over a given time period. Each segment identifies the billing domain (
PRO_FORMAorBILLABLE) and the account relationships that apply during its time range.If you don’t provide an
arn, the response includes segments for the caller’sPRIMARYbilling view.If a mid-period change occurs, the response includes multiple segments, each with its own time range. The response omits hidden segments, so the segments it returns might not cover the entire requested time period.
See also: AWS API Documentation
Request Syntax
response = client.list_billing_view_segments( timeRange={ 'beginDateInclusive': datetime(2015, 1, 1), 'endDateExclusive': datetime(2015, 1, 1) }, arn='string', maxResults=123, nextToken='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
PRIMARYbilling view is used. The ARN must reference a primary billing view. Custom billing views aren’t supported.maxResults (integer) – The number of entries a paginated response contains. Valid values range from 1 to 100. The default is 100.
nextToken (string) – The pagination token that is used on subsequent calls to list billing view segments.
- 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) –
The pagination token that is used on subsequent calls to list billing view segments.
Exceptions
Billing.Client.exceptions.BillingViewHealthStatusExceptionBilling.Client.exceptions.ThrottlingExceptionBilling.Client.exceptions.ResourceNotFoundExceptionBilling.Client.exceptions.AccessDeniedExceptionBilling.Client.exceptions.ValidationExceptionBilling.Client.exceptions.InternalServerException