Skip to main content

usage_statistics

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

Overview​

Nameusage_statistics
TypeResource
Idovh.saas_csp2.usage_statistics

Fields​

The following fields are returned by SELECT queries:

License usage statistics.

NameDatatypeDescription
datestring (date)Date of the statistics.
linesarrayList of lines associated to this statistics entity.

Methods​

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
listselectservice_name, time_periodReturns, for each day of the timePeriod (last week, month, quarter or year), the peak and end-of-day counts of activated licenses, by license. (Alpha version)

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
api_hoststringThe OVHcloud API host. Selected by OVH_ENDPOINT (ovh-eu, ovh-ca or ovh-us; default ovh-eu). (default: api.eu.ovhcloud.com, x-stackQL-envVarSelector: {"envVar":"OVH_ENDPOINT","default":"ovh-eu","values":{"ovh-eu":"api.eu.ovhcloud.com","ovh-ca":"api.ca.ovhcloud.com","ovh-us":"api.us.ovhcloud.com"}})
service_namestringService name (wire: serviceName)
time_periodstringThe period to query (wire: timePeriod)

SELECT examples​

Returns, for each day of the timePeriod (last week, month, quarter or year), the peak and end-of-day counts of activated licenses, by license. (Alpha version)

SELECT
date,
lines
FROM ovh.saas_csp2.usage_statistics
WHERE service_name = '{{ service_name }}' -- required
AND time_period = '{{ time_period }}' -- required
;