env_vars
Creates, updates, deletes, gets or lists an env_vars resource.
Overview​
| Name | env_vars |
| Type | Resource |
| Id | ovh.hosting_web.env_vars |
Fields​
The following fields are returned by SELECT queries:
- get
- list
successful operation
| Name | Datatype | Description |
|---|---|---|
task_id | integer | The task ID working on this variable (wire: taskId) |
key | string | Name of the variable |
status | string | The environnement variable status (created, creating, deleting, updating) |
type | string | Type of variable set (integer, password, string) |
value | string (password) | Value of the variable |
Environment variables set into your webhosting account
| Name | Datatype | Description |
|---|---|---|
task_id | integer | The task ID working on this variable (wire: taskId) |
key | string | Name of the variable |
status | string | The environnement variable status (created, creating, deleting, updating) |
type | string | Type of variable set (integer, password, string) |
value | string (password) | Value of the variable |
Methods​
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get | select | key, service_name | ||
list | select | service_name | type, x_pagination_mode | |
create | insert | service_name, key, type, value | ||
update | update | key, service_name | ||
delete | delete | key, service_name |
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"}}) |
key | string | Key |
service_name | string | Service name (wire: serviceName) |
type | string | Filter the value of type property (=) |
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
successful operation
SELECT
task_id,
key,
status,
type,
value
FROM ovh.hosting_web.env_vars
WHERE key = '{{ key }}' -- required
AND service_name = '{{ service_name }}' -- required
;
Environment variables set into your webhosting account
SELECT
task_id,
key,
status,
type,
value
FROM ovh.hosting_web.env_vars
WHERE service_name = '{{ service_name }}' -- required
AND type = '{{ type }}'
AND x_pagination_mode = '{{ x_pagination_mode }}'
;
INSERT examples​
- create
- Manifest
No description available.
INSERT INTO ovh.hosting_web.env_vars (
key,
type,
value,
service_name
)
SELECT
'{{ key }}' /* required */,
'{{ type }}' /* required */,
'{{ value }}' /* required */,
'{{ service_name }}'
RETURNING
id,
object_id,
done_date,
function,
last_update,
object_type,
start_date,
status
;
# Description fields are for documentation purposes
- name: env_vars
props:
- name: service_name
value: "{{ service_name }}"
description: Required parameter for the env_vars resource.
- name: key
value: "{{ key }}"
description: |
Name of the variable
- name: type
value: "{{ type }}"
description: |
Type of variable set
valid_values: ['integer', 'password', 'string']
- name: value
value: "{{ value }}"
description: |
Value of the variable
UPDATE examples​
- update
No description available.
UPDATE ovh.hosting_web.env_vars
SET
value = '{{ value }}'
WHERE
key = '{{ key }}' --required
AND service_name = '{{ service_name }}' --required
RETURNING
id,
object_id,
done_date,
function,
last_update,
object_type,
start_date,
status;
DELETE examples​
- delete
No description available.
DELETE FROM ovh.hosting_web.env_vars
WHERE key = '{{ key }}' --required
AND service_name = '{{ service_name }}' --required
;