Skip to main content

env_vars

Creates, updates, deletes, gets or lists an env_vars resource.

Overview​

Nameenv_vars
TypeResource
Idovh.hosting_web.env_vars

Fields​

The following fields are returned by SELECT queries:

successful operation

NameDatatypeDescription
task_idintegerThe task ID working on this variable (wire: taskId)
keystringName of the variable
statusstringThe environnement variable status (created, creating, deleting, updating)
typestringType of variable set (integer, password, string)
valuestring (password)Value of the variable

Methods​

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectkey, service_name
listselectservice_nametype, x_pagination_mode
createinsertservice_name, key, type, value
updateupdatekey, service_name
deletedeletekey, 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.

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"}})
keystringKey
service_namestringService name (wire: serviceName)
typestringFilter the value of type property (=)
x_pagination_modestringSent as CachedObjectList-Pages by default so the list returns the full objects rather than their identifiers. (wire: X-Pagination-Mode)

SELECT examples​

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
;

INSERT examples​

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
;

UPDATE examples​

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​

No description available.

DELETE FROM ovh.hosting_web.env_vars
WHERE key = '{{ key }}' --required
AND service_name = '{{ service_name }}' --required
;