costs
Creates, updates, deletes, gets or lists a costs resource.
Overview
| Name | costs |
| Type | Resource |
| Id | confluent.billing.costs |
Fields
The following fields are returned by SELECT queries:
- list_billing_v1_costs
Cost.
| Name | Datatype | Description |
|---|---|---|
id | string | ID is the "natural identifier" for an object within its scope/namespace; it is normally unique across time but not space. That is, you can assume that the ID will not be reclaimed and reused after an object is deleted ("time"); however, it may collide with IDs for other object kinds or objects of the same kind within a different scope/namespace ("space"). (example: dlz-f3a90de) |
amount | number (double) | Final amount after deducting discounts. |
api_version | string | APIVersion defines the schema version of this representation of a resource. (billing/v1) |
description | string | Additional details about promotional offers/credits. (example: KAFKA101) |
discount_amount | number (double) | Amount discounted from the original amount in dollars. |
end_date | string (date) | End date of time period (exclusive) to retrieve billing costs. It is represented in RFC3339 format and is in UTC. (example: 2022-10-15) |
granularity | string | Granularity at which each line item is aggregated. (default: DAILY) |
kind | string | Kind defines the object this REST resource represents. (Cost) |
line_type | string | Type of the line item. (example: KAFKA_NUM_CKUS) |
network_access_type | string | Network access type for the cluster. (example: INTERNET) |
original_amount | number (double) | Original amount accrued for this line item. |
price | number (double) | Price for the line item in dollars. |
product | string | Product name. (example: KAFKA) |
quantity | number (double) | Quantity of the line item. |
resource | object | The resource for a given object |
start_date | string (date) | Start date of time period (inclusive) to retrieve billing costs. It is represented in RFC3339 format and is in UTC. (example: 2022-10-12) |
tier_dimensions | object | Tier dimensions which exist for tiered pricing cost items only. (x-go-type: map[string]string) |
unit | string | Unit of the line item. (example: GB) |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
list_billing_v1_costs | select | start_date, end_date | page_size, page_token | Retrieve a sorted, filtered, paginated list of all costs. |
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 |
|---|---|---|
end_date | string | Filter the results by exact match for end_date. (example: 2022-10-15) |
start_date | string | Filter the results by exact match for start_date. (example: 2022-10-12) |
page_size | integer | A pagination size for collection requests. |
page_token | string | An opaque pagination token for collection requests. |
SELECT examples
- list_billing_v1_costs
Retrieve a sorted, filtered, paginated list of all costs.
SELECT
id,
amount,
api_version,
description,
discount_amount,
end_date,
granularity,
kind,
line_type,
network_access_type,
original_amount,
price,
product,
quantity,
resource,
start_date,
tier_dimensions,
unit
FROM confluent.billing.costs
WHERE start_date = '{{ start_date }}' -- required
AND end_date = '{{ end_date }}' -- required
AND page_size = '{{ page_size }}'
AND page_token = '{{ page_token }}'
;