Skip to main content

costs

Creates, updates, deletes, gets or lists a costs resource.

Overview

Namecosts
TypeResource
Idconfluent.billing.costs

Fields

The following fields are returned by SELECT queries:

Cost.

NameDatatypeDescription
idstringID 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)
amountnumber (double)Final amount after deducting discounts.
api_versionstringAPIVersion defines the schema version of this representation of a resource. (billing/v1)
descriptionstringAdditional details about promotional offers/credits. (example: KAFKA101)
discount_amountnumber (double)Amount discounted from the original amount in dollars.
end_datestring (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)
granularitystringGranularity at which each line item is aggregated. (default: DAILY)
kindstringKind defines the object this REST resource represents. (Cost)
line_typestringType of the line item. (example: KAFKA_NUM_CKUS)
network_access_typestringNetwork access type for the cluster. (example: INTERNET)
original_amountnumber (double)Original amount accrued for this line item.
pricenumber (double)Price for the line item in dollars.
productstringProduct name. (example: KAFKA)
quantitynumber (double)Quantity of the line item.
resourceobjectThe resource for a given object
start_datestring (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_dimensionsobjectTier dimensions which exist for tiered pricing cost items only. (x-go-type: map[string]string)
unitstringUnit of the line item. (example: GB)

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
list_billing_v1_costsselectstart_date, end_datepage_size, page_tokenRetrieve 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.

NameDatatypeDescription
end_datestringFilter the results by exact match for end_date. (example: 2022-10-15)
start_datestringFilter the results by exact match for start_date. (example: 2022-10-12)
page_sizeintegerA pagination size for collection requests.
page_tokenstringAn opaque pagination token for collection requests.

SELECT examples

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 }}'
;