Skip to main content

modem_lans

Creates, updates, deletes, gets or lists a modem_lans resource.

Overview​

Namemodem_lans
TypeResource
Idovh.xdsl.modem_lans

Fields​

The following fields are returned by SELECT queries:

successful operation

NameDatatypeDescription
task_idintegerID of the ongoing todo (NULL if none) (wire: taskId)
lan_namestringName of the LAN (wire: lanName)
addressing_typestringHow the modem gets its LAN IP Address (DHCP, Static) (wire: addressingType)
ip_addressstring (ipv4)IP address (e.g., 192.0.2.0) (example: 192.0.2.0) (wire: IPAddress)
subnet_maskstring (ipv4)IP address (e.g., 192.0.2.0) (example: 192.0.2.0) (wire: subnetMask)

Methods​

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectlan_name, service_nameReturns the IP address, subnet mask and addressing type of a LAN of the modem.
listselectservice_namex_pagination_modeReturns the names of the LANs configured on the modem of the access.
updateupdatelan_name, service_nameChanges the IP address, subnet mask and addressing type of a LAN of the modem.

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"}})
lan_namestringLan name (wire: lanName)
service_namestringService name (wire: serviceName)
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​

Returns the IP address, subnet mask and addressing type of a LAN of the modem.

SELECT
task_id,
lan_name,
addressing_type,
ip_address,
subnet_mask
FROM ovh.xdsl.modem_lans
WHERE lan_name = '{{ lan_name }}' -- required
AND service_name = '{{ service_name }}' -- required
;

UPDATE examples​

Changes the IP address, subnet mask and addressing type of a LAN of the modem.

UPDATE ovh.xdsl.modem_lans
SET
ip_address = '{{ ip_address }}',
addressing_type = '{{ addressing_type }}',
subnet_mask = '{{ subnet_mask }}'
WHERE
lan_name = '{{ lan_name }}' --required
AND service_name = '{{ service_name }}' --required;