carbon_calculator_tasks
Creates, updates, deletes, gets or lists a carbon_calculator_tasks resource.
Overview​
| Name | carbon_calculator_tasks |
| Type | Resource |
| Id | ovh.me.carbon_calculator_tasks |
Fields​
The following fields are returned by SELECT queries:
- get
- list
successful operation
| Name | Datatype | Description |
|---|---|---|
task_id | string | ID of the task (wire: taskID) |
link | string | Link to the document |
status | string | Status of the task (ERROR, IN_PROGRESS, SUCCESS) |
Task to generate a carbon impact document
| Name | Datatype | Description |
|---|---|---|
task_id | string | ID of the task (wire: taskID) |
link | string | Link to the document |
status | string | Status of the task (ERROR, IN_PROGRESS, SUCCESS) |
Methods​
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get | select | task_id | Fetch a task by its ID | |
list | select | List all tasks | ||
create | insert | date | Create a carbon footprint generation task |
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 | TaskID (wire: taskID) |
SELECT examples​
- get
- list
Fetch a task by its ID
SELECT
task_id,
link,
status
FROM ovh.me.carbon_calculator_tasks
WHERE task_id = '{{ task_id }}' -- required
;
List all tasks
SELECT
task_id,
link,
status
FROM ovh.me.carbon_calculator_tasks
;
INSERT examples​
- create
- Manifest
Create a carbon footprint generation task
INSERT INTO ovh.me.carbon_calculator_tasks (
date
)
SELECT
'{{ date }}' /* required */
RETURNING
task_id
;
# Description fields are for documentation purposes
- name: carbon_calculator_tasks
props:
- name: date
value: "{{ date }}"
description: |
Month of the requested document (day is ignored)