Resources / Usage

Usage

Metered usage of one SKU by one project in one month. Written only by the platform.

Overview

APIbilling.etorm.com/v1alpha1
Resourceusages (cluster-scoped inside its cluster)
Short namesusg
Available inthe platform only
Statuswritten by a controller through /status

Minimal example

apiVersion: billing.etorm.com/v1alpha1
kind: Usage
metadata:
  name: example
spec:
  billingAccountRef:
    name: "<name>"
  projectRef:
    name: "<name>"
  skuRef:
    name: "<name>"
  period: "<period>"

Spec

FieldTypeRequiredDefaultAllowedDescription
billingAccountRefreference to BillingAccountyesThe billing account charged.
projectRefreference to ProjectyesThe project that used the resource.
skuRefreference to SKUyesThe price list entry.
periodstringyeslength 7 to 7The month, as YYYY-MM.

Status

FieldTypeRequiredDefaultAllowedDescription
secondsintegerResource-seconds, for count meters.
quantityMicrosintegerMillionths of the SKU's unit used this month, for gauge, counter and owner-cpu meters.
fuelBaselinesobjectFor owner-cpu: the fuel already counted for each platform process, so only the increase is added.
counterBaselinesobjectFor counter: the number already counted for each resource, so only the increase is added.
amountMicrosintegerWhat it costs, in millionths of the currency.
lastMeteredAtstringWhen it was last sampled (RFC 3339).

Columns in listings

ColumnFrom
Billing-Account.spec.billingAccountRef.name
Project.spec.projectRef.name
SKU.spec.skuRef.name
Period.spec.period
Seconds.status.seconds
Amount-Micros.status.amountMicros

Related guides

All resources