getDynamicDns method

Future<DynamicDnsInformation> getDynamicDns()

This operation gets the dynamic DNS settings from a device. If the device supports dynamic DNS as specified in [RFC 2136] and [RFC 4702], it shall be possible to get the type, name and TTL through the GetDynamicDNS command.

ACCESS CLASS: READ_SYSTEM

Implementation

Future<DynamicDnsInformation> getDynamicDns() async {
  loggy.debug('getDynamicDNS');

  final responseEnvelope = await transport.securedRequest(
    uri,
    soap.Body(request: DeviceManagementRequest.getDynamicDns()),
  );

  if (responseEnvelope.body.hasFault) {
    throw Exception(responseEnvelope.body.fault.toString());
  }

  return GetDynamicDnsResponse.fromJson(
    responseEnvelope.body.response!,
  ).dynamicDnsInformation;
}