Metering
Metering API
|
|
|
Metering Data Classes
- class cognite.client.data_classes.metering.MeteringData(
- meter_id: str,
- datapoints: list[MeteringDataPoint] | None = None,
Bases:
CogniteResourceA singular representation of the current consumption.
Metering is identified by an id containing the service name and a service-scoped metering name. For instance
atlas.monthly_ai_tokensis the id of theatlasservice meteringmonthly_ai_tokens. Service and metering names are always inlower_snake_case.- Parameters:
meter_id (str) – The metering ID, e.g.
atlas.monthly_ai_tokens.datapoints (list[MeteringDataPoint] | None) – Timestamped data points with average values. Empty unless both
startandnumber_of_datapointsare provided in the request.
- as_id() str
Returns the meter ID.
- dump(camel_case: bool = True) dict[str, Any]
Dump the instance into a json serializable Python data type.
- Parameters:
camel_case (bool) – Use camelCase for attribute names. Defaults to True.
- Returns:
A dictionary representation of the instance.
- Return type:
dict[str, Any]
- class cognite.client.data_classes.metering.MeteringDataList(
- resources: Sequence[T_CogniteResource],
Bases:
CogniteResourceList[MeteringData]- as_ids() list[str]
Returns a list of meter IDs.
- class cognite.client.data_classes.metering.MeteringDataPoint(timestamp: int, average: float)
Bases:
CogniteResourceA single timestamped data point with average value.
- Parameters:
timestamp (int) – The timestamp for this data point, in milliseconds since epoch.
average (float) – The average metric value for this time bucket.