usage_statistics
Creates, updates, deletes, gets or lists a usage_statistics resource.
Overview​
| Name | usage_statistics |
| Type | Resource |
| Id | ovh.saas_csp2.usage_statistics |
Fields​
The following fields are returned by SELECT queries:
- list
License usage statistics.
| Name | Datatype | Description |
|---|---|---|
date | string (date) | Date of the statistics. |
lines | array | List of lines associated to this statistics entity. |
Methods​
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
list | select | service_name, time_period | 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) |
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.
| Name | Datatype | Description |
|---|---|---|
api_host | string | The 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_name | string | Service name (wire: serviceName) |
time_period | string | The period to query (wire: timePeriod) |
SELECT examples​
- list
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
;