credit_allocation_histories
Creates, updates, deletes, gets or lists a credit_allocation_histories resource.
Overview
| Name | credit_allocation_histories |
| Type | Resource |
| Id | aws.billing.credit_allocation_histories |
Fields
The following fields are returned by SELECT queries:
- get_credit_allocation_history
| Name | Datatype | Description |
|---|---|---|
account_id | string | The Amazon Web Services account the credit was applied to. (pattern: <code>[0-9]{12}</code>) |
applied_service_name | string | The Amazon Web Services service the credit was applied to. |
billing_month | string | The billing month of the application in YYYY-MM format. |
credit_amount | object | The amount of credit applied. Negative values represent credits that reduced the bill. |
credit_id | string | The identifier of the credit that was applied. (pattern: <code>[0-9]+</code>) |
description | string | A human-readable description of the credit allocation. |
is_estimated_bill | boolean | true when the entry was applied to an in-flight bill that has not yet been finalized. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get_credit_allocation_history | select | region | 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
Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.
| Name | Datatype | Description |
|---|---|---|
region | string | AWS region (default: us-east-1) |
SELECT examples
- get_credit_allocation_history
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.
SELECT
account_id,
applied_service_name,
billing_month,
credit_amount,
credit_id,
description,
is_estimated_bill
FROM aws.billing.credit_allocation_histories
WHERE region = '{{ region }}' -- required
;