What exactly does this balena-sdk function do?
balena.models.device.remove('7cf02a6');
Does it disable the VPN on the device?
What exactly does this balena-sdk function do?
balena.models.device.remove('7cf02a6');
Does it disable the VPN on the device?
Hi
You can find more information about what this does here in its source code https://github.com/balena-io/balena-sdk/blob/master/lib/models/device.ts
Thanks for the link.
It looks like it deletes the device from Balena cloud. Is that the same as deleting a device from the dashboard?
Does the device also turn off the VPN when removed?
Hi Patrick,
Indeed deleting the device with the SDK is the same as deleting it from the dashboard. The dashboard uses the SDK itself.
The VPN is not disabled when a device is deleted. Are you looking for a way to programmatically disable the VPN in the same way it is disabled from the dashboard?
Thanks,
Zahari
Thanks for the clarification!
Yes.
Hi Patrick, VPN control is handled via a configuration variable so you can programmatically toggle it via https://www.balena.io/docs/reference/sdk/node-sdk/#balena.models.application.configVar.set , the config variable name is RESIN_SUPERVISOR_VPN_CONTROL