fbpx
GEThttps://api.spotinst.io/gcp/gce/instance/{INSTANCE_ID}?accountId={ACCOUNT_ID}

Get the current instance status.

Possible status values: Active or Terminating

URL Parameters

ParameterTypeDescription
INSTANCE_ID * String

The instance ID you want to query

Example: i-123456
ACCOUNT_ID String

Your Spotinst accountId associated with your token

Example: act-123abc
Request

Headers
{
    "Content-Type": "application/json",
    "Authorization": "Bearer ${token}"
}
Response - 200

Headers
{
    "Content-Type": "application/json"
}
Body
Copied!
Downloaded!
{
    "request": {
        "id": "3213e42e-455e-4901-a185-cc3eb65fac5f",
        "url": "/gcp/gce/instance/sin-123",
        "method": "GET",
        "timestamp": "2018-12-18T14:06:04.866Z"
    },
    "response": {
        "status": {
            "code": 200,
            "message": "OK"
        },
        "kind": "spotinst:gcp:gce:instance",
        "items": [
           {
                "instanceName": "sin-123",
                "lifeCycleState": "ACTIVE",
                "privateIp":"10.0.0.1",
                "groupId":"sig-123"
            }
        ],
        "count": 1
    }
}