get_credit_allocation_history
async
¶
get_credit_allocation_history(
account_id: AccountId,
start_date: datetime,
end_date: datetime,
*,
config_overrides: Optional[AsyncBillingClientConfig] = 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) –Inclusive start date as Unix epoch seconds. Must be on or before
endDate. The range fromstartDatetoendDatecannot exceed 24 billing months. -
end_date(datetime) –Inclusive end date as Unix epoch seconds.
-
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.