runtimes
Creates, updates, deletes, gets or lists a runtimes resource.
Overview​
| Name | runtimes |
| Type | Resource |
| Id | ovh.hosting_web.runtimes |
Fields​
The following fields are returned by SELECT queries:
- get
- list
successful operation
| Name | Datatype | Description |
|---|---|---|
id | integer | The runtime configuration ID |
name | string | The custom display name of the runtime configuration |
task_id | integer | The link current task for the runtime configuration (wire: taskId) |
app_bootstrap | string | The client application bootstrap script (wire: appBootstrap) |
app_env | string | The client application environment (development, production) (wire: appEnv) |
creation_date | string (date-time) | The creation date of the runtime configuration (wire: creationDate) |
is_default | boolean | Is the runtime configuration is the one by default for the hosting (wire: isDefault) |
is_deletable | boolean | Return if the runtime configuration can be deleted (wire: isDeletable) |
last_update | string (date-time) | The last update date of the runtime configuration (wire: lastUpdate) |
public_dir | string | The client application public directory (wire: publicDir) |
status | string | The status of the runtime (created, creating, deleting, updating) |
type | string | The backend type of the runtime (nodejs-10, nodejs-11, nodejs-12, nodejs-14, nodejs-8, nodejs-9, phpfpm-5.6, phpfpm-7.0, phpfpm-7.1, phpfpm-7.2, phpfpm-7.3, phpfpm-7.4, phpfpm-8.0, python-2, python-3, ruby-2.6) |
The runtime configuration of an attached domain for cloud web offer
| Name | Datatype | Description |
|---|---|---|
id | integer | The runtime configuration ID |
name | string | The custom display name of the runtime configuration |
task_id | integer | The link current task for the runtime configuration (wire: taskId) |
app_bootstrap | string | The client application bootstrap script (wire: appBootstrap) |
app_env | string | The client application environment (development, production) (wire: appEnv) |
creation_date | string (date-time) | The creation date of the runtime configuration (wire: creationDate) |
is_default | boolean | Is the runtime configuration is the one by default for the hosting (wire: isDefault) |
is_deletable | boolean | Return if the runtime configuration can be deleted (wire: isDeletable) |
last_update | string (date-time) | The last update date of the runtime configuration (wire: lastUpdate) |
public_dir | string | The client application public directory (wire: publicDir) |
status | string | The status of the runtime (created, creating, deleting, updating) |
type | string | The backend type of the runtime (nodejs-10, nodejs-11, nodejs-12, nodejs-14, nodejs-8, nodejs-9, phpfpm-5.6, phpfpm-7.0, phpfpm-7.1, phpfpm-7.2, phpfpm-7.3, phpfpm-7.4, phpfpm-8.0, python-2, python-3, ruby-2.6) |
Methods​
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get | select | id, service_name | Get a runtime configuration. Returns the backend type, environment, bootstrap script, public directory and status of the runtime configuration. | |
list | select | service_name | name, type, x_pagination_mode | List runtime configurations. Returns the IDs of the runtime configurations of the hosting. Filter them by name or type. |
create | insert | service_name | Create a runtime configuration. Creates a runtime configuration with a backend type, an environment, a bootstrap script and a public directory, linked to attached domains, and returns the task. | |
update | update | id, service_name | Update a runtime configuration. Updates the name, backend type, environment, bootstrap script, public directory or default status of the runtime configuration. | |
delete | delete | id, service_name | Delete a runtime configuration. Deletes the runtime configuration and returns the task. Only a configuration with isDeletable set to true can be deleted. |
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 | The runtime configuration ID |
service_name | string | The internal name of your hosting (wire: serviceName) |
name | string | Filter the value of name property (like) |
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
Get a runtime configuration. Returns the backend type, environment, bootstrap script, public directory and status of the runtime configuration.
SELECT
id,
name,
task_id,
app_bootstrap,
app_env,
creation_date,
is_default,
is_deletable,
last_update,
public_dir,
status,
type
FROM ovh.hosting_web.runtimes
WHERE id = '{{ id }}' -- required
AND service_name = '{{ service_name }}' -- required
;
List runtime configurations. Returns the IDs of the runtime configurations of the hosting. Filter them by name or type.
SELECT
id,
name,
task_id,
app_bootstrap,
app_env,
creation_date,
is_default,
is_deletable,
last_update,
public_dir,
status,
type
FROM ovh.hosting_web.runtimes
WHERE service_name = '{{ service_name }}' -- required
AND name = '{{ name }}'
AND type = '{{ type }}'
AND x_pagination_mode = '{{ x_pagination_mode }}'
;
INSERT examples​
- create
- Manifest
Create a runtime configuration. Creates a runtime configuration with a backend type, an environment, a bootstrap script and a public directory, linked to attached domains, and returns the task.
INSERT INTO ovh.hosting_web.runtimes (
app_bootstrap,
app_env,
attached_domains,
is_default,
name,
public_dir,
type,
service_name
)
SELECT
'{{ app_bootstrap }}',
'{{ app_env }}',
'{{ attached_domains }}',
{{ is_default }},
'{{ name }}',
'{{ public_dir }}',
'{{ type }}',
'{{ service_name }}'
RETURNING
id,
object_id,
done_date,
function,
last_update,
object_type,
start_date,
status
;
# Description fields are for documentation purposes
- name: runtimes
props:
- name: service_name
value: "{{ service_name }}"
description: Required parameter for the runtimes resource.
- name: app_bootstrap
value: "{{ app_bootstrap }}"
description: |
The client application bootstrap script
- name: app_env
value: "{{ app_env }}"
description: |
The client application environment
valid_values: ['development', 'production']
- name: attached_domains
value:
- "{{ attached_domains }}"
description: |
The attached domains fqdn to link to this runtime configuration
- name: is_default
value: {{ is_default }}
description: |
Set if the runtime configuration is the one by default for the hosting
- name: name
value: "{{ name }}"
description: |
The custom display name of the runtime configuration
- name: public_dir
value: "{{ public_dir }}"
description: |
The client application public directory
- name: type
value: "{{ type }}"
description: |
Runtime backend type enum
valid_values: ['nodejs-10', 'nodejs-11', 'nodejs-12', 'nodejs-14', 'nodejs-8', 'nodejs-9', 'phpfpm-5.6', 'phpfpm-7.0', 'phpfpm-7.1', 'phpfpm-7.2', 'phpfpm-7.3', 'phpfpm-7.4', 'phpfpm-8.0', 'python-2', 'python-3', 'ruby-2.6']
UPDATE examples​
- update
Update a runtime configuration. Updates the name, backend type, environment, bootstrap script, public directory or default status of the runtime configuration.
UPDATE ovh.hosting_web.runtimes
SET
app_bootstrap = '{{ app_bootstrap }}',
app_env = '{{ app_env }}',
is_default = {{ is_default }},
name = '{{ name }}',
public_dir = '{{ public_dir }}',
type = '{{ type }}'
WHERE
id = '{{ id }}' --required
AND service_name = '{{ service_name }}' --required;
DELETE examples​
- delete
Delete a runtime configuration. Deletes the runtime configuration and returns the task. Only a configuration with isDeletable set to true can be deleted.
DELETE FROM ovh.hosting_web.runtimes
WHERE id = '{{ id }}' --required
AND service_name = '{{ service_name }}' --required
;