modem_lan_dhcps
Creates, updates, deletes, gets or lists a modem_lan_dhcps resource.
Overview​
| Name | modem_lan_dhcps |
| Type | Resource |
| Id | ovh.xdsl.modem_lan_dhcps |
Fields​
The following fields are returned by SELECT queries:
- get
- list
successful operation
| Name | Datatype | Description |
|---|---|---|
task_id | integer | ID of the ongoing todo (NULL if none) (wire: taskId) |
dhcp_name | string | Name of the DHCP (wire: dhcpName) |
domain_name | string | Domain name provided to the clients (wire: domainName) |
default_gateway | string (ipv4) | IP address (e.g., 192.0.2.0) (example: 192.0.2.0) (wire: defaultGateway) |
end_address | string (ipv4) | IP address (e.g., 192.0.2.0) (example: 192.0.2.0) (wire: endAddress) |
lease_time | integer | Lease time in seconds of client assigned address (-1 means infinite) (wire: leaseTime) |
primary_dns | string (ipv4) | IP address (e.g., 192.0.2.0) (example: 192.0.2.0) (wire: primaryDNS) |
secondary_dns | string (ipv4) | Secondary DNS servers to be given to the clients (example: 192.0.2.0) (wire: secondaryDNS) |
server_enabled | boolean | State of the DHCP server of the modem (wire: serverEnabled) |
start_address | string (ipv4) | IP address (e.g., 192.0.2.0) (example: 192.0.2.0) (wire: startAddress) |
subnet_mask | string (ipv4) | IP address (e.g., 192.0.2.0) (example: 192.0.2.0) (wire: subnetMask) |
DHCP Configuration of the Modem
| Name | Datatype | Description |
|---|---|---|
task_id | integer | ID of the ongoing todo (NULL if none) (wire: taskId) |
dhcp_name | string | Name of the DHCP (wire: dhcpName) |
domain_name | string | Domain name provided to the clients (wire: domainName) |
default_gateway | string (ipv4) | IP address (e.g., 192.0.2.0) (example: 192.0.2.0) (wire: defaultGateway) |
end_address | string (ipv4) | IP address (e.g., 192.0.2.0) (example: 192.0.2.0) (wire: endAddress) |
lease_time | integer | Lease time in seconds of client assigned address (-1 means infinite) (wire: leaseTime) |
primary_dns | string (ipv4) | IP address (e.g., 192.0.2.0) (example: 192.0.2.0) (wire: primaryDNS) |
secondary_dns | string (ipv4) | Secondary DNS servers to be given to the clients (example: 192.0.2.0) (wire: secondaryDNS) |
server_enabled | boolean | State of the DHCP server of the modem (wire: serverEnabled) |
start_address | string (ipv4) | IP address (e.g., 192.0.2.0) (example: 192.0.2.0) (wire: startAddress) |
subnet_mask | string (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:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get | select | dhcp_name, lan_name, service_name | Returns the state, address range, subnet mask, gateway, DNS servers, domain name and lease time of a DHCP server of the modem. | |
list | select | lan_name, service_name | x_pagination_mode | Returns the names of the DHCP servers configured on a LAN of the modem. |
update | update | dhcp_name, lan_name, service_name | Changes 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.
| 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"}}) |
dhcp_name | string | Dhcp name (wire: dhcpName) |
lan_name | string | Lan name (wire: lanName) |
service_name | string | Service name (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
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
;
Returns the names of the DHCP servers configured on a LAN 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 lan_name = '{{ lan_name }}' -- required
AND service_name = '{{ service_name }}' -- required
AND x_pagination_mode = '{{ x_pagination_mode }}'
;
UPDATE examples​
- update
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;