Skip to main content

modem_connected_devices

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

Overview​

Namemodem_connected_devices
TypeResource
Idovh.xdsl.modem_connected_devices

Fields​

The following fields are returned by SELECT queries:

successful operation

NameDatatypeDescription
host_namestringHost name given by the device to the modem (wire: hostName)
activebooleanThe state of this device on the modem
address_sourcestringHow did the device got its IP address (DHCP, Static, Unknown) (wire: addressSource)
information_datestring (date-time)The date time of the last update of thoses information (wire: informationDate)
interface_typestringOn which interface is connected the device (wire: interfaceType)
ip_addressstring (ipv4)The IP address of the device (example: 192.0.2.0) (wire: ipAddress)
lease_time_remainingintegerThe remaining time in seconds of the DHCP lease of this device (-1 means infinite) (wire: leaseTimeRemaining)
mac_addressstringMAC address of the device (wire: macAddress)

Methods​

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectmac_address, service_nameReturns the host name, IP address, interface, DHCP lease time and state of a device connected to the modem.
listselectservice_namex_pagination_modeReturns the MAC addresses of the devices connected to the modem of the access.

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"}})
mac_addressstringMac address (wire: macAddress)
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 host name, IP address, interface, DHCP lease time and state of a device connected to the modem.

SELECT
host_name,
active,
address_source,
information_date,
interface_type,
ip_address,
lease_time_remaining,
mac_address
FROM ovh.xdsl.modem_connected_devices
WHERE mac_address = '{{ mac_address }}' -- required
AND service_name = '{{ service_name }}' -- required
;