list_billing_view_segments
¶
list_billing_view_segments(
*,
config_overrides: Optional[BillingClientConfig] = None,
time_range: Optional[BillingViewSegmentTimeRange] = None,
arn: Optional[BillingViewArn] = None,
max_results: Optional[BillingViewsMaxResults] = None,
next_token: Optional[PageToken] = None,
) -> ListBillingViewSegmentsResponse
Lists the segments of a billing view over a given time period. Each segment identifies the billing domain (PRO_FORMA or BILLABLE) and the account relationships that apply during its time range.
If you don't provide an arn, the response includes segments for the caller's PRIMARY billing 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.
Parameters:
-
time_range(Optional[BillingViewSegmentTimeRange], default:None) –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.
-
arn(Optional[BillingViewArn], default:None) –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. -
max_results(Optional[BillingViewsMaxResults], default:None) –The number of entries a paginated response contains. Valid values range from 1 to 100. The default is 100.
-
next_token(Optional[PageToken], default:None) –The pagination token that is used on subsequent calls to list billing view segments.
Raises:
-
AccessDeniedException–You don't have sufficient access to perform this action.
-
BillingViewHealthStatusException–Exception thrown when a billing view's health status prevents an operation from being performed. This may occur if the billing view is in a state other than
HEALTHY. -
InternalServerException–The request processing failed because of an unknown error, exception, or failure.
-
ResourceNotFoundException–The specified ARN in the request doesn't exist.
-
ThrottlingException–The request was denied due to request throttling.
-
ValidationException–The input fails to satisfy the constraints specified by an Amazon Web Services service.
-
UnknownServiceError–The service returned an error code this client does not model.
Examples:
Invoke ListBillingViewSegments
>>> client.list_billing_view_segments(time_range={'beginDateInclusive': 1719792000, 'endDateExclusive': 1722470400})
Error example for ListBillingViewSegments
>>> client.list_billing_view_segments(time_range={'beginDateInclusive': 1722470400, 'endDateExclusive': 1719792000})
Source code in docs_src/capo_billing/_services/billing.py
1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 | |