bills
Creates, updates, deletes, gets or lists a bills resource.
Overview​
| Name | bills |
| Type | Resource |
| Id | ovh.cloud.bills |
Fields​
The following fields are returned by SELECT queries:
- list
Project bill
| Name | Datatype | Description |
|---|---|---|
bill_id | string | Bill id (wire: billId) |
type | string | Bill type (creditPurchased, monthlyConsumption, monthlyInstanceActivation) |
Methods​
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
list | select | from, to, service_name | List project bills. Returns the bills of the project between the from and to dates. |
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"}}) |
from | string (date-time) | Get bills from |
service_name | string | The Public Cloud project ID. Resolved from OVH_CLOUD_PROJECT_SERVICE when set. |
to | string (date-time) | Get bills to |
SELECT examples​
- list
List project bills. Returns the bills of the project between the from and to dates.
SELECT
bill_id,
type
FROM ovh.cloud.bills
WHERE from = '{{ from }}' -- required
AND to = '{{ to }}' -- required
AND service_name = '{{ service_name }}' -- required unless OVH_CLOUD_PROJECT_SERVICE is set
;