Skip to main content

configurations

Creates, updates, deletes, gets or lists a configurations resource.

Overview​

Nameconfigurations
TypeResource
Idovh.hosting_web.configurations

Fields​

The following fields are returned by SELECT queries:

successful operation

NameDatatypeDescription
idintegerId of the current configuration
app_envstringApplication environment (development, production) (wire: appEnv)
entry_pointstringApplication launch script (wire: entryPoint)
languagestringlanguage chosen for the current hosting (nodejs, python, ruby)
public_dirstringDirectory of the application (wire: publicDir)
statusstringStatus of current configuration (created, creating, deleting, updating)
versionstringversion of the language chosen for the current hosting

Methods​

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectservice_nameGet the configuration. Returns the language, version, environment, launch script and public directory of the application.
updateupdateservice_nameUpdate the configuration. Updates the language, version, environment, launch script or public directory of the application.

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"}})
service_namestringThe internal name of your hosting (wire: serviceName)

SELECT examples​

Get the configuration. Returns the language, version, environment, launch script and public directory of the application.

SELECT
id,
app_env,
entry_point,
language,
public_dir,
status,
version
FROM ovh.hosting_web.configurations
WHERE service_name = '{{ service_name }}' -- required
;

UPDATE examples​

Update the configuration. Updates the language, version, environment, launch script or public directory of the application.

UPDATE ovh.hosting_web.configurations
SET
app_env = '{{ app_env }}',
entry_point = '{{ entry_point }}',
language = '{{ language }}',
public_dir = '{{ public_dir }}',
version = '{{ version }}'
WHERE
service_name = '{{ service_name }}' --required;