Skip to content
Docs

Usage

Get Usage Record
client.usage.get(stringresourceID, RequestOptionsoptions?): Usage { dimensions, ended_at, project_id, 4 more }
GET/v1/usage/{resource_id}
List Usage Records
client.usage.list(UsageListParams { cursor, limit } query?, RequestOptionsoptions?): Cursor<Usage { dimensions, ended_at, project_id, 4 more } >
GET/v1/usage
ModelsExpand Collapse
Usage { dimensions, ended_at, project_id, 4 more }

Usage record for a single metered resource.

dimensions: Array<UsageDimension { id, dimension, ended_at, 3 more } >
id: string
dimension: string
ended_at: string | null
quantity: number
started_at: string
children?: Array<UsageDimensionLeaf { id, dimension, ended_at, 2 more } >
id: string
dimension: string
ended_at: string | null
quantity: number
started_at: string
ended_at: string | null
project_id: string
region: RegionName { }

Region the resource is in.

resource_id: string
resource_type: UsageResourceType

Kind of metered resource a ledger row belongs to.

One of the following:
"vm"
"volume"
"vpc"
"connect_connection"
"nks_cluster"
"nks_node_pool"
"nks_load_balancer"
started_at: string
UsageDimension { id, dimension, ended_at, 3 more }

Top-level dimension entry; bundle heads expand via children.

id: string
dimension: string
ended_at: string | null
quantity: number
started_at: string
children?: Array<UsageDimensionLeaf { id, dimension, ended_at, 2 more } >
id: string
dimension: string
ended_at: string | null
quantity: number
started_at: string
UsageDimensionLeaf { id, dimension, ended_at, 2 more }

One ledger segment for a (resource, dimension) pair.

id: string
dimension: string
ended_at: string | null
quantity: number
started_at: string
UsageList { items, pagination }
items: Array<Usage { dimensions, ended_at, project_id, 4 more } >
dimensions: Array<UsageDimension { id, dimension, ended_at, 3 more } >
id: string
dimension: string
ended_at: string | null
quantity: number
started_at: string
children?: Array<UsageDimensionLeaf { id, dimension, ended_at, 2 more } >
id: string
dimension: string
ended_at: string | null
quantity: number
started_at: string
ended_at: string | null
project_id: string
region: RegionName { }

Region the resource is in.

resource_id: string
resource_type: UsageResourceType

Kind of metered resource a ledger row belongs to.

One of the following:
"vm"
"volume"
"vpc"
"connect_connection"
"nks_cluster"
"nks_node_pool"
"nks_load_balancer"
started_at: string
UsageResourceType = "vm" | "volume" | "vpc" | 4 more

Kind of metered resource a ledger row belongs to.

One of the following:
"vm"
"volume"
"vpc"
"connect_connection"
"nks_cluster"
"nks_node_pool"
"nks_load_balancer"