get_credit_allocation_history
¶
get_credit_allocation_history(
account_id: AccountId,
start_date: datetime,
end_date: datetime,
*,
config_overrides: Optional[BillingClientConfig] = None,
credit_id: Optional[int] = None,
next_token: Optional[PageToken] = None,
max_results: Optional[int] = None,
) -> GetCreditAllocationHistoryResponse
Returns the per-billing-month allocation history for credits applied to an Amazon Web Services account's bills. Traverses the consolidated billing family to capture cross-account credit applications. Supports pagination and optional filtering to a single credit.
Parameters:
-
account_id(AccountId) –The Amazon Web Services account ID whose allocation history to retrieve. Must be a 12-digit numeric string.
-
credit_id(Optional[int], default:None) –Filters the result to a single credit. When omitted, returns allocation entries for all credits.
-
start_date(datetime) –The inclusive start date of the range, in Unix epoch seconds. This value must be earlier than
endDate. You get credit allocations for bills whose billing period starts on or afterstartDateand beforeendDate. IfstartDateis in the middle of a billing period, that period isn't included. The range can't exceed 24 calendar months. -
end_date(datetime) –The exclusive end date of the range, in Unix epoch seconds. To get one billing month, set
startDateto the first day of that month. Then setendDateto the first day of the next month. Use 00:00 UTC for both. -
next_token(Optional[PageToken], default:None) –Pagination token from a previous response. Pass the value returned in
nextTokento retrieve the next page of results. -
max_results(Optional[int], default:None) –The maximum number of records to return per page. Range: 1 to 1000. Default: 100.
Raises:
-
AccessDeniedException–You don't have sufficient access to perform this action.
-
InternalServerException–The request processing failed because of an unknown error, exception, or failure.
-
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.
Source code in docs_src/capo_billing/_services/billing.py
1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 | |