Skip to main content

ovh_configs

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

Overview​

Nameovh_configs
TypeResource
Idovh.hosting_web.ovh_configs

Fields​

The following fields are returned by SELECT queries:

successful operation

NameDatatypeDescription
idintegerConfiguration's id
task_idintegerThe task ID working on this configuration (wire: taskId)
engine_namestringVersion of engine you want (php, phpcgi) (wire: engineName)
containerstringContainer to run this website
creation_datestring (date-time)When ovhconfig was created, or found for the first time, on the hosting servers (wire: creationDate)
engine_versionstringName of engine you want (4.4, 5.0, 5.1, 5.2, 5.3, 5.4, 5.5, 5.6, 7.0, 7.1, 7.2, 7.3, 7.4, 8.0, 8.1, 8.2, 8.3, 8.4, 8.5, AUTO) (wire: engineVersion)
environmentstringEnvironment configuration you want (development, production)
file_existbooleanIf .ovhConfig exists (wire: fileExist)
historicalbooleanIf this configuration is an old configuration
http_firewallstringConfiguration you want for http firewall (none, security) (wire: httpFirewall)
pathstringConfig path, relative to your home directory
statusstringThe configuration status (created, rollbacking, updating)

Methods​

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectid, service_nameGet a .ovhconfig file. Returns the engine, version, container, environment, HTTP firewall and status of the configuration of a folder.
listselectservice_namehistorical, path, x_pagination_modeList .ovhconfig files. Returns the IDs of the .ovhconfig configurations of the hosting. Filter them by path, or by historical to include old ones.
change_configurationexecid, serviceNameChange a .ovhconfig file. Applies a new engine, version, container, environment or HTTP firewall setting to the folder, and returns the task.
rollbackexecid, serviceName, rollbackIdRoll back a .ovhconfig file. Restores the old configuration given by rollbackId and returns the 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.

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"}})
idintegerConfiguration's id
serviceNamestringThe internal name of your hosting
service_namestringThe internal name of your hosting (wire: serviceName)
historicalbooleanFilter the value of historical property (=)
pathstringFilter the value of path property (like)
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​

Get a .ovhconfig file. Returns the engine, version, container, environment, HTTP firewall and status of the configuration of a folder.

SELECT
id,
task_id,
engine_name,
container,
creation_date,
engine_version,
environment,
file_exist,
historical,
http_firewall,
path,
status
FROM ovh.hosting_web.ovh_configs
WHERE id = '{{ id }}' -- required
AND service_name = '{{ service_name }}' -- required
;

Lifecycle Methods​

EXEC variables use wire (API) names.

Change a .ovhconfig file. Applies a new engine, version, container, environment or HTTP firewall setting to the folder, and returns the task.

EXEC ovh.hosting_web.ovh_configs.change_configuration
@id='{{ id }}' --required,
@serviceName='{{ serviceName }}' --required
@@json=
'{
"container": "{{ container }}",
"engineName": "{{ engineName }}",
"engineVersion": "{{ engineVersion }}",
"environment": "{{ environment }}",
"httpFirewall": "{{ httpFirewall }}"
}'
;