modules
Creates, updates, deletes, gets or lists a modules resource.
Overview​
| Name | modules |
| Type | Resource |
| Id | ovh.hosting_web.modules |
Fields​
The following fields are returned by SELECT queries:
- get
- list
successful operation
| Name | Datatype | Description |
|---|---|---|
id | integer | Installation ID |
module_id | integer | ID of the module associated with this installation (wire: moduleId) |
task_id | integer | The task ID working on this module (wire: taskId) |
admin_name | string | Login for the admin account (wire: adminName) |
admin_folder | string | The admin folder, relative to the module's installation path (wire: adminFolder) |
creation_date | string (date-time) | Date of the installation of the module (wire: creationDate) |
dependencies | array | The dependencies to which the module has access. A dependency can be a standard database (like MySQL or PostgreSQL) or a key-value store (like Redis or Memcached) for example |
language | string | The language of the module (cz, de, en, es, fi, fr, it, lt, nl, pl, pt) |
last_update | string (date-time) | Date of the last module's upgrade (wire: lastUpdate) |
path | string | Where the module is installed, relative to your home directory |
status | string | The module status (created, creating, deleting, updating) |
target_url | string | The URL from where your module can be reached (wire: targetUrl) |
Hosting modules installed
| Name | Datatype | Description |
|---|---|---|
id | integer | Installation ID |
module_id | integer | ID of the module associated with this installation (wire: moduleId) |
task_id | integer | The task ID working on this module (wire: taskId) |
admin_name | string | Login for the admin account (wire: adminName) |
admin_folder | string | The admin folder, relative to the module's installation path (wire: adminFolder) |
creation_date | string (date-time) | Date of the installation of the module (wire: creationDate) |
dependencies | array | The dependencies to which the module has access. A dependency can be a standard database (like MySQL or PostgreSQL) or a key-value store (like Redis or Memcached) for example |
language | string | The language of the module (cz, de, en, es, fi, fr, it, lt, nl, pl, pt) |
last_update | string (date-time) | Date of the last module's upgrade (wire: lastUpdate) |
path | string | Where the module is installed, relative to your home directory |
status | string | The module status (created, creating, deleting, updating) |
target_url | string | The URL from where your module can be reached (wire: targetUrl) |
Methods​
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get | select | id, service_name | Get an installed module. Returns the path, URL, admin login, language, dependencies and status of the installed module. | |
list | select | service_name | x_pagination_mode | List installed modules. Returns the installation IDs of the modules installed on the hosting. Get the details of one with its installation ID. |
create | insert | service_name, module_id | Install a module. Installs a module from the available modules in a folder of the hosting, with its admin account and dependencies, and returns the task. The admin password needs at least 8 characters. | |
delete | delete | id, service_name | Delete an installed module. Deletes the module installation and returns the task. Use the installation ID, not the module ID. |
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 | Installation ID |
service_name | string | The internal name of your hosting (wire: serviceName) |
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 an installed module. Returns the path, URL, admin login, language, dependencies and status of the installed module.
SELECT
id,
module_id,
task_id,
admin_name,
admin_folder,
creation_date,
dependencies,
language,
last_update,
path,
status,
target_url
FROM ovh.hosting_web.modules
WHERE id = '{{ id }}' -- required
AND service_name = '{{ service_name }}' -- required
;
List installed modules. Returns the installation IDs of the modules installed on the hosting. Get the details of one with its installation ID.
SELECT
id,
module_id,
task_id,
admin_name,
admin_folder,
creation_date,
dependencies,
language,
last_update,
path,
status,
target_url
FROM ovh.hosting_web.modules
WHERE service_name = '{{ service_name }}' -- required
AND x_pagination_mode = '{{ x_pagination_mode }}'
;
INSERT examples​
- create
- Manifest
Install a module. Installs a module from the available modules in a folder of the hosting, with its admin account and dependencies, and returns the task. The admin password needs at least 8 characters.
INSERT INTO ovh.hosting_web.modules (
admin_name,
admin_password,
dependencies,
domain,
language,
module_id,
path,
service_name
)
SELECT
'{{ admin_name }}',
'{{ admin_password }}',
'{{ dependencies }}',
'{{ domain }}',
'{{ language }}',
{{ module_id }} /* required */,
'{{ path }}',
'{{ service_name }}'
RETURNING
id,
object_id,
done_date,
function,
last_update,
object_type,
start_date,
status
;
# Description fields are for documentation purposes
- name: modules
props:
- name: service_name
value: "{{ service_name }}"
description: Required parameter for the modules resource.
- name: admin_name
value: "{{ admin_name }}"
description: |
The login for the admin account (may be a standard string or your email)
- name: admin_password
value: "{{ admin_password }}"
description: |
The password for the admin account (at least 8 characters)
- name: dependencies
description: |
The dependencies that we have to configure on your module. A dependency can be a standard database (like MySQL or PostgreSQL) or a key-value store (like Redis or Memcached) for example
value:
- name: "{{ name }}"
password: "{{ password }}"
port: {{ port }}
prefix: "{{ prefix }}"
server: "{{ server }}"
type: "{{ type }}"
user: "{{ user }}"
- name: domain
value: "{{ domain }}"
description: |
On which domain the module has to be available (it can be a multidomain or a subdomain) - if not set, the module will be available on your serviceName domain
- name: language
value: "{{ language }}"
description: |
Install language
valid_values: ['cz', 'de', 'en', 'es', 'fi', 'fr', 'it', 'lt', 'nl', 'pl', 'pt']
- name: module_id
value: {{ module_id }}
description: |
ID of the module you want to install
- name: path
value: "{{ path }}"
description: |
Where to install the module, relative to your home directory
DELETE examples​
- delete
Delete an installed module. Deletes the module installation and returns the task. Use the installation ID, not the module ID.
DELETE FROM ovh.hosting_web.modules
WHERE id = '{{ id }}' --required
AND service_name = '{{ service_name }}' --required
;