generateVpnConfig method

Future<void> generateVpnConfig(
  1. VpnConfig vpnConfig, {
  2. String? uuidToken,
})

Generate VPN configuration

Generates a new VPN configuration. If it already exists, it will be replaced by the new one. If the IP for the VPN connection has not been provided, then the next one with respect to the LAN address will be applied. The provided IP must match the LAN network configuration.

Parameters:

  • VpnConfig vpnConfig (required):

  • String uuidToken: Used for remote connections to device

Implementation

Future<void> generateVpnConfig(
  VpnConfig vpnConfig, {
  String? uuidToken,
}) async {
  final response = await generateVpnConfigWithHttpInfo(
    vpnConfig,
    uuidToken: uuidToken,
  );
  if (response.statusCode >= HttpStatus.badRequest) {
    throw ApiException(response.statusCode, await _decodeBodyBytes(response));
  }
}