template_modems
Creates, updates, deletes, gets or lists a template_modems resource.
Overview​
| Name | template_modems |
| Type | Resource |
| Id | ovh.xdsl.template_modems |
Fields​
The following fields are returned by SELECT queries:
- get
- list
successful operation
| Name | Datatype | Description |
|---|---|---|
name | string | Name of the Modem Template |
capabilities | string | Parameters capabilities. Lists what can be applied from this template |
creation_date | string (date-time) | Template creation date (wire: creationDate) |
dhcp | array | List of DHCP for this template (wire: DHCP) |
dmz_ip | string (ipv4) | IP Address of the DMZ (example: 192.0.2.0) (wire: dmzIP) |
lan | array | List of LAN for this template (wire: LAN) |
mtu_size | integer | Size of the Maximum Transmission Unit on the modem's interfaces (1432, 1456, 1492) (wire: mtuSize) |
parameters_to_ignore | object | Do not apply these parameters from template. You can use parametersCapabilities to know availability (wire: parametersToIgnore) |
port_mapping | array | List of PortMapping for this template (wire: portMapping) |
wlan | array | List of WLAN for this template (wire: WLAN) |
Modem Template
| Name | Datatype | Description |
|---|---|---|
name | string | Name of the Modem Template |
capabilities | string | Parameters capabilities. Lists what can be applied from this template |
creation_date | string (date-time) | Template creation date (wire: creationDate) |
dhcp | array | List of DHCP for this template (wire: DHCP) |
dmz_ip | string (ipv4) | IP Address of the DMZ (example: 192.0.2.0) (wire: dmzIP) |
lan | array | List of LAN for this template (wire: LAN) |
mtu_size | integer | Size of the Maximum Transmission Unit on the modem's interfaces (1432, 1456, 1492) (wire: mtuSize) |
parameters_to_ignore | object | Do not apply these parameters from template. You can use parametersCapabilities to know availability (wire: parametersToIgnore) |
port_mapping | array | List of PortMapping for this template (wire: portMapping) |
wlan | array | List of WLAN for this template (wire: WLAN) |
Methods​
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get | select | name | Returns the LAN, DHCP, WLAN, port mapping, DMZ and MTU settings of a modem template, and the parameters to ignore when it is applied. | |
list | select | x_pagination_mode | Returns the names of the modem templates of the account. | |
create | insert | name, service_name | Creates a template from the modem configuration of an access. Returns the created template. | |
update | update | name | Changes the parameters to ignore when the template is applied to a modem. | |
delete | delete | name | Deletes the modem template and all its settings. |
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"}}) |
name | string | Name |
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
Returns the LAN, DHCP, WLAN, port mapping, DMZ and MTU settings of a modem template, and the parameters to ignore when it is applied.
SELECT
name,
capabilities,
creation_date,
dhcp,
dmz_ip,
lan,
mtu_size,
parameters_to_ignore,
port_mapping,
wlan
FROM ovh.xdsl.template_modems
WHERE name = '{{ name }}' -- required
;
Returns the names of the modem templates of the account.
SELECT
name,
capabilities,
creation_date,
dhcp,
dmz_ip,
lan,
mtu_size,
parameters_to_ignore,
port_mapping,
wlan
FROM ovh.xdsl.template_modems
WHERE x_pagination_mode = '{{ x_pagination_mode }}'
;
INSERT examples​
- create
- Manifest
Creates a template from the modem configuration of an access. Returns the created template.
INSERT INTO ovh.xdsl.template_modems (
name,
service_name
)
SELECT
'{{ name }}' /* required */,
'{{ service_name }}' /* required */
RETURNING
name,
capabilities,
creation_date,
dhcp,
dmz_ip,
lan,
mtu_size,
parameters_to_ignore,
port_mapping,
wlan
;
# Description fields are for documentation purposes
- name: template_modems
props:
- name: name
value: "{{ name }}"
description: |
Modem Template name (only alphanumeric characters)
- name: service_name
value: "{{ service_name }}"
description: |
The access name with the config you want to duplicate
UPDATE examples​
- update
Changes the parameters to ignore when the template is applied to a modem.
UPDATE ovh.xdsl.template_modems
SET
parameters_to_ignore = '{{ parameters_to_ignore }}'
WHERE
name = '{{ name }}' --required;
DELETE examples​
- delete
Deletes the modem template and all its settings.
DELETE FROM ovh.xdsl.template_modems
WHERE name = '{{ name }}' --required
;