Skip to main content

modem_lan_dhcps

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

Overview​

Namemodem_lan_dhcps
TypeResource
Idovh.xdsl.modem_lan_dhcps

Fields​

The following fields are returned by SELECT queries:

successful operation

NameDatatypeDescription
task_idintegerID of the ongoing todo (NULL if none) (wire: taskId)
dhcp_namestringName of the DHCP (wire: dhcpName)
domain_namestringDomain name provided to the clients (wire: domainName)
default_gatewaystring (ipv4)IP address (e.g., 192.0.2.0) (example: 192.0.2.0) (wire: defaultGateway)
end_addressstring (ipv4)IP address (e.g., 192.0.2.0) (example: 192.0.2.0) (wire: endAddress)
lease_timeintegerLease time in seconds of client assigned address (-1 means infinite) (wire: leaseTime)
primary_dnsstring (ipv4)IP address (e.g., 192.0.2.0) (example: 192.0.2.0) (wire: primaryDNS)
secondary_dnsstring (ipv4)Secondary DNS servers to be given to the clients (example: 192.0.2.0) (wire: secondaryDNS)
server_enabledbooleanState of the DHCP server of the modem (wire: serverEnabled)
start_addressstring (ipv4)IP address (e.g., 192.0.2.0) (example: 192.0.2.0) (wire: startAddress)
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
getselectdhcp_name, lan_name, service_nameReturns the state, address range, subnet mask, gateway, DNS servers, domain name and lease time of a DHCP server of the modem.
listselectlan_name, service_namex_pagination_modeReturns the names of the DHCP servers configured on a LAN of the modem.
updateupdatedhcp_name, lan_name, service_nameChanges the state, address range, subnet mask, gateway, DNS servers, domain name or lease time of a DHCP server 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"}})
dhcp_namestringDhcp name (wire: dhcpName)
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 state, address range, subnet mask, gateway, DNS servers, domain name and lease time of a DHCP server of the modem.

SELECT
task_id,
dhcp_name,
domain_name,
default_gateway,
end_address,
lease_time,
primary_dns,
secondary_dns,
server_enabled,
start_address,
subnet_mask
FROM ovh.xdsl.modem_lan_dhcps
WHERE dhcp_name = '{{ dhcp_name }}' -- required
AND lan_name = '{{ lan_name }}' -- required
AND service_name = '{{ service_name }}' -- required
;

UPDATE examples​

Changes the state, address range, subnet mask, gateway, DNS servers, domain name or lease time of a DHCP server of the modem.

UPDATE ovh.xdsl.modem_lan_dhcps
SET
default_gateway = '{{ default_gateway }}',
domain_name = '{{ domain_name }}',
end_address = '{{ end_address }}',
lease_time = {{ lease_time }},
primary_dns = '{{ primary_dns }}',
secondary_dns = '{{ secondary_dns }}',
server_enabled = {{ server_enabled }},
start_address = '{{ start_address }}',
subnet_mask = '{{ subnet_mask }}'
WHERE
dhcp_name = '{{ dhcp_name }}' --required
AND lan_name = '{{ lan_name }}' --required
AND service_name = '{{ service_name }}' --required;