Skip to main content

consumption_usage_forecasts

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

Overview​

Nameconsumption_usage_forecasts
TypeResource
Idovh.me.consumption_usage_forecasts

Fields​

The following fields are returned by SELECT queries:

List of consumptions recorded in a range

NameDatatypeDescription
idintegerTransaction ID
service_idintegerService ID (wire: serviceId)
begin_datestring (date-time)Begin date (wire: beginDate)
creation_datestring (date-time)Creation date (wire: creationDate)
elementsarrayList of product plan code consumption
end_datestring (date-time)End date (wire: endDate)
last_updatestring (date-time)Last update (wire: lastUpdate)
priceobjectConsumption amount price

Methods​

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
listselectGet forecasted consumptions for all services

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"}})

SELECT examples​

Get forecasted consumptions for all services

SELECT
id,
service_id,
begin_date,
creation_date,
elements,
end_date,
last_update,
price
FROM ovh.me.consumption_usage_forecasts
;