how can I show optical (LED)success when it is "Connected to Arduino IoT Cloud"

Hey guys, this is my first experience with arduino and GSM MKR 1400 board.

I get connection to GPRS Network and also to Arduino IoT Cloud and see my values in dashboard and so on. All is working and fine until here.

Now I want to have an optical success - LED goes on - when I am connected to Arduino IoT Cloud. The reason for that is that the board will get an alu box and should work alone. There I have no monitor and I want to see optical if I am connected.

I see the success in my monitor with

setDebugMessageLevel(4);
ArduinoCloud.printDebugInfo();


// Monitor in arduino webeditor shows:
SIM card ok
GPRS.attachGPRS(): 4
Sending PING to outer space...
GPRS.ping(): 183
Connected to GPRS Network
Connected to Arduino IoT Cloud

How can I fetch the last status (Connected to Arduino IoT Cloud) to switch an external LED ON (PIN high) ?

I hope someone from your experts could help me

thanks in advance Dirk

I found it

with

if (ArduinoCloud.connected() == 1) {
    Serial.println("all is connected");
//here comes the code for turning on LED
  }

I can turn on then my LED for optical success of Cloud connection