Any method for collect instance state changes in OCI with GO SDK

256 Views Asked by At

I want to aware if any instances changes state for example "up"->"down" How to get this information with sdk ? Any method for collecting that ?

1

There are 1 best solutions below

1
On

Yes, you can use GetInstance for that. It returns this model, which has a "lifecycleState" field.

The first link also shows an example of how to call GetInstance from the Go SDK.