GEThttps://api.spotinst.io/aws/ec2/group/{GROUP_ID}/statefulInstance?accountId={ACCOUNT_ID}

List all stateful instances associated with the Elastigroup

URL Parameters

Parameter Type Description
GROUP_ID * String

The Elastigroup id you want to query

Example: sig-12345
ACCOUNT_ID * String

Your account id in spotinst

Example: act-12345
Request

Headers
Copied!
Downloaded!
{
    "Content-Type": "application/json",
    "Authorization": "Bearer ${token}"
}

Response Attributes


Attribute Type Description
items.state String

Possible values:
ACTIVE The sateful instance is running.
PAUSE Initiating a Pause action.
PAUSING Pause in progress.
PAUSED Stateful instance is Paused.
RESUME Initiating a Resume action.
RESUMING Resume in progress.
RECYCLE Initiating a Recycle process.
RECYCLING Recycle in progress.
DEALLOCATE Initiating a Deallocate process.
DEALLOCATING Deallocation in progress.
DEALLOCATED Stateful instance is Deallocated.
ERROR Error state.

Response - 200

Headers
Copied!
Downloaded!
{
    "Content-Type": "application/json"
}
Body
Copied!
Downloaded!
{
  "request": {
    "id": "8b934d94-fadb-48f9-b95e-a0168f0f88ae",
    "url": "/aws/ec2/group/sig-93f9d0b5/statefulInstance?accountId=act-9bab1626",
    "method": "GET",
    "timestamp": "2019-12-15T11:36:07.077Z"
  },
  "response": {
    "status": {
      "code": 200,
      "message": "OK"
    },
    "kind": "spotinst:aws:ec2:statefulInstance",
    "items": [
      {
        "id": "ssi-046b119c",
        "instanceId": "i-08878aad7f35d20f5",
        "privateIp": "172.31.30.122",
        "imageId": "ami-082b5a644766e0e6f",
        "state": "ACTIVE",
        "devices": [
          {
            "deviceName": "/dev/xvda",
            "volumeId": "vol-0bb1c83fb203ad686",
            "snapshotId": "snap-0a2803e5e45d63c3a"
          },
          {
            "deviceName": "/dev/sdh",
            "volumeId": "vol-0876e6e54d22db1c7",
            "snapshotId": "snap-0864f572674e3e8f0"
          }
        ],
        "launchedAt": "2019-12-10T08:01:43.000Z",
        "createdAt": "2019-12-10T08:02:16.000Z"
      },
      {
        "id": "ssi-34549c8e",
        "privateIp": "172.31.24.112",
        "imageId": "ami-0587a85250fadc19c",
        "state": "PAUSED",
        "devices": [
          {
            "deviceName": "/dev/sdh",
            "snapshotId": "snap-05f5c12f3570faa86"
          },
          {
            "deviceName": "/dev/xvda",
            "volumeId": "vol-08fd9fa1808b873b9",
            "snapshotId": "snap-08b3a0d1ec3380828"
          }
        ],
        "createdAt": "2019-12-09T15:37:16.000Z"
      },
      {
        "id": "ssi-55712748",
        "privateIp": "172.31.20.198",
        "imageId": "ami-06d501d54f2a977ef",
        "state": "PAUSED",
        "devices": [
          {
            "deviceName": "/dev/sdh",
            "snapshotId": "snap-0c7578e9d6aac3356"
          },
          {
            "deviceName": "/dev/xvda",
            "volumeId": "vol-040d00f22292cede5",
            "snapshotId": "snap-0a7c0be13344ff917"
          }
        ],
        "createdAt": "2019-12-09T15:37:16.000Z"
      },
      {
        "id": "ssi-9460b1f1",
        "privateIp": "172.31.34.121",
        "imageId": "ami-03c20dd6a27b2c72b",
        "state": "PAUSED",
        "devices": [
          {
            "deviceName": "/dev/sdh",
            "snapshotId": "snap-0734472b845032a33"
          },
          {
            "deviceName": "/dev/xvda",
            "volumeId": "vol-0d03796f0ef3a5442",
            "snapshotId": "snap-087726551aa055226"
          }
        ],
        "createdAt": "2019-12-09T15:37:16.000Z"
      },
      {
        "id": "ssi-c9931a3e",
        "instanceId": "i-042d6615d40051f4e",
        "privateIp": "172.31.9.16",
        "imageId": "ami-082b5a644766e0e6f",
        "state": "ACTIVE",
        "devices": [
          {
            "deviceName": "/dev/sdh",
            "volumeId": "vol-08d2de5d1b69ce2a2",
            "snapshotId": "snap-0cd303c7fb8dc00c4"
          },
          {
            "deviceName": "/dev/xvda",
            "volumeId": "vol-02fcfb3040b39ea5a",
            "snapshotId": "snap-08ee00a5e68fc491f"
          }
        ],
        "launchedAt": "2019-12-10T08:01:43.000Z",
        "createdAt": "2019-12-10T08:02:15.000Z"
      },
      {
        "id": "ssi-eb67e76f",
        "privateIp": "172.31.43.122",
        "imageId": "ami-0a17cd6c7efc8cf05",
        "state": "PAUSED",
        "devices": [
          {
            "deviceName": "/dev/sdh",
            "snapshotId": "snap-0c0417b36c0edb0e6"
          },
          {
            "deviceName": "/dev/xvda",
            "volumeId": "vol-01bc4c26e3c6f0bc4",
            "snapshotId": "snap-03faffffecf1be64e"
          }
        ],
        "createdAt": "2019-12-09T15:37:16.000Z"
      }
    ],
    "count": 6
  }
}