billing_report_consumptions
Creates, updates, deletes, gets or lists a billing_report_consumptions resource.
Overview​
| Name | billing_report_consumptions |
| Type | Resource |
| Id | ovh.me.billing_report_consumptions |
Fields​
The following fields are returned by SELECT queries:
- get
- list
successful operation
| Name | Datatype | Description |
|---|---|---|
task_id | string | Task id of the report (wire: taskId) |
period_end | string (date) | End date of the report period (wire: periodEnd) |
period_start | string (date) | Start date of the report period (wire: periodStart) |
report | string | Url of the report |
status | string | Status of the report (CREATING, ERROR, READY) |
Consumption billing report
| Name | Datatype | Description |
|---|---|---|
task_id | string | Task id of the report (wire: taskId) |
period_end | string (date) | End date of the report period (wire: periodEnd) |
period_start | string (date) | Start date of the report period (wire: periodStart) |
report | string | Url of the report |
status | string | Status of the report (CREATING, ERROR, READY) |
Methods​
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get | select | task_id | Retrieve a consumption billing report with task id | |
list | select | x_pagination_mode | Retrieve all billing reports of consumption | |
create | insert | period_end, period_start | Generate consumption billing report for a period |
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"}}) |
task_id | string | Task ID (wire: taskId) |
x_pagination_mode | string | Sent as CachedObjectList-Pages by default so the list returns the full objects rather than their identifiers. (wire: X-Pagination-Mode) |
SELECT examples​
- get
- list
Retrieve a consumption billing report with task id
SELECT
task_id,
period_end,
period_start,
report,
status
FROM ovh.me.billing_report_consumptions
WHERE task_id = '{{ task_id }}' -- required
;
Retrieve all billing reports of consumption
SELECT
task_id,
period_end,
period_start,
report,
status
FROM ovh.me.billing_report_consumptions
WHERE x_pagination_mode = '{{ x_pagination_mode }}'
;
INSERT examples​
- create
- Manifest
Generate consumption billing report for a period
INSERT INTO ovh.me.billing_report_consumptions (
period_end,
period_start
)
SELECT
'{{ period_end }}' /* required */,
'{{ period_start }}' /* required */
RETURNING
task_id
;
# Description fields are for documentation purposes
- name: billing_report_consumptions
props:
- name: period_end
value: "{{ period_end }}"
description: |
End date of the report period
- name: period_start
value: "{{ period_start }}"
description: |
Start date of the report period