Como Reiniciar Conexion de Servidor OPC-UA

my OPC-UA server is placed in a failed state, to restore the connection when we have released the fault, I have to go to gateway configuration and press on edit trust and then give clip in save changes and the connection is restored without problems.
is there any way to do this with code?