ovh_configs
Creates, updates, deletes, gets or lists an ovh_configs resource.
Overview​
| Name | ovh_configs |
| Type | Resource |
| Id | ovh.hosting_web.ovh_configs |
Fields​
The following fields are returned by SELECT queries:
- get
- list
successful operation
| Name | Datatype | Description |
|---|---|---|
id | integer | Configuration's id |
task_id | integer | The task ID working on this configuration (wire: taskId) |
engine_name | string | Version of engine you want (php, phpcgi) (wire: engineName) |
container | string | Container to run this website |
creation_date | string (date-time) | When ovhconfig was created, or found for the first time, on the hosting servers (wire: creationDate) |
engine_version | string | Name 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) |
environment | string | Environment configuration you want (development, production) |
file_exist | boolean | If .ovhConfig exists (wire: fileExist) |
historical | boolean | If this configuration is an old configuration |
http_firewall | string | Configuration you want for http firewall (none, security) (wire: httpFirewall) |
path | string | Config path, relative to your home directory |
status | string | The configuration status (created, rollbacking, updating) |
Virtual service
| Name | Datatype | Description |
|---|---|---|
id | integer | Configuration's id |
task_id | integer | The task ID working on this configuration (wire: taskId) |
engine_name | string | Version of engine you want (php, phpcgi) (wire: engineName) |
container | string | Container to run this website |
creation_date | string (date-time) | When ovhconfig was created, or found for the first time, on the hosting servers (wire: creationDate) |
engine_version | string | Name 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) |
environment | string | Environment configuration you want (development, production) |
file_exist | boolean | If .ovhConfig exists (wire: fileExist) |
historical | boolean | If this configuration is an old configuration |
http_firewall | string | Configuration you want for http firewall (none, security) (wire: httpFirewall) |
path | string | Config path, relative to your home directory |
status | string | The configuration status (created, rollbacking, updating) |
Methods​
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get | select | id, service_name | Get a .ovhconfig file. Returns the engine, version, container, environment, HTTP firewall and status of the configuration of a folder. | |
list | select | service_name | historical, path, x_pagination_mode | List .ovhconfig files. Returns the IDs of the .ovhconfig configurations of the hosting. Filter them by path, or by historical to include old ones. |
change_configuration | exec | id, serviceName | Change a .ovhconfig file. Applies a new engine, version, container, environment or HTTP firewall setting to the folder, and returns the task. | |
rollback | exec | id, serviceName, rollbackId | Roll 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.
| 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"}}) |
id | integer | Configuration's id |
serviceName | string | The internal name of your hosting |
service_name | string | The internal name of your hosting (wire: serviceName) |
historical | boolean | Filter the value of historical property (=) |
path | string | Filter the value of path property (like) |
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
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
;
List .ovhconfig files. Returns the IDs of the .ovhconfig configurations of the hosting. Filter them by path, or by historical to include old ones.
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 service_name = '{{ service_name }}' -- required
AND historical = '{{ historical }}'
AND path = '{{ path }}'
AND x_pagination_mode = '{{ x_pagination_mode }}'
;
Lifecycle Methods​
EXEC variables use wire (API) names.
- change_configuration
- rollback
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 }}"
}'
;
Roll back a .ovhconfig file. Restores the old configuration given by rollbackId and returns the task.
EXEC ovh.hosting_web.ovh_configs.rollback
@id='{{ id }}' --required,
@serviceName='{{ serviceName }}' --required
@@json=
'{
"rollbackId": {{ rollbackId }}
}'
;