fbpx
GEThttps://api.spotinst.io/aws/ec2/group?name={name}&includeDeleted={includeDeleted}&minCreatedAt={minCreatedAt}&maxCreatedAt={maxCreatedAt}&activeFrom={activeFrom}&activeTo={activeTo}&accountId={ACCOUNT_ID}

Describe all the Elastigroups in your account and their full JSON’s

Please note: This route accepts a combination of query params, either “minCreatedAt” and “maxCreatedAt” or “activeFrom” and “activeTo”. A combination of the two types together is not supported.

URL Parameters

Parameter Type Description
name String

The Elastigroup Name that you wish to get the information (configuration JSON) for

includeDeleted Boolean

While true, the list will include deleted Elastigroups.

Example: true
Default: false
minCreatedAt String

Data values following either a date format (yyyy-mm-dd ; 2016-11-20) or Unix Timestamp (1494751821472)

Example: 2017-06-20
maxCreatedAt String

Data values following either a date format (yyyy-mm-dd ; 2016-11-20) or Unix Timestamp (1494751821472)

Example: 2017-09-25
activeFrom String

Data values following either a date format (yyyy-mm-dd ; 2016-11-20) or Unix Timestamp (1494751821472)

Example: 18-12-2017
activeTo String

Data values following either a date format (yyyy-mm-dd ; 2016-11-20) or Unix Timestamp (1494751821472)

Example: 18-12-2017
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": "67582d0c-108b-4ef7-9fdc-d39678a30844",
    "url": "/aws/ec2/group",
    "method": "GET",
    "timestamp": "2018-01-07T07:30:58.622Z"
  },
  "response": {
    "status": {
      "code": 200,
      "message": "OK"
    },
    "kind": "spotinst:aws:ec2:group",
    "items": [
      {
        "id": "sig-1234567",
        "name": "EG name",
        "description": "validation",
        "capacity": {
          "minimum": 1,
          "maximum": 1,
          "target": 1,
          "unit": "instance"
        },
        "strategy": {
          "risk": 0,
          "onDemandCount": null,
          "availabilityVsCost": "balanced"
        },
        "compute": {
          "instanceTypes": {
            "ondemand": "m3.large",
            "spot": [
              "c3.large",
              "m3.large"
            ]
          },
          "availabilityZones": [
            {
              "name": "us-west-2a",
              "subnetIds": [
                "subnet-1234567"
              ]
            }
          ],
          "product": "Linux/UNIX",
          "launchSpecification": {
            "securityGroupIds": [
              "sg-1234567"
            ],
            "monitoring": true,
            "imageId": "ami-987654",
            "keyPair": "keyp",
            "userData": null
          }
        },
        "scaling": {
          "up": [
            {
              "policyName": "up Scaling Policy 1",
              "metricName": "CPUUtilization",
              "statistic": "maximum",
              "unit": "percent",
              "threshold": 90,
              "adjustment": 2,
              "namespace": "AWS/EC2",
              "period": 300,
              "evaluationPeriods": 3,
              "cooldown": 60
            }
          ],
          "down": [
            {
              "policyName": "down Scaling Policy 1",
              "metricName": "CPUUtilization",
              "statistic": "maximum",
              "unit": "percent",
              "threshold": 50,
              "adjustment": 2,
              "namespace": "AWS/EC2",
              "period": 300,
              "evaluationPeriods": 3,
              "cooldown": 60,
              "dimensions": [
                {
                  "name": "InstanceId"
                }
              ]
            }
          ]
        },
        "scheduling": {
          "tasks": [
            {
              "frequency": "weekly",
              "taskType": "backup_ami"
            }
          ]
        },
        "thirdPartiesIntegration": {},
        "createdAt": "2016-02-16T09:03:23.000Z",
        "updatedAt": "2018-01-07T00:10:30.000Z"
      },
      {
        "id": "sig-897654",
        "name": "Test EG",
        "description": "Test ",
        "capacity": {
          "minimum": 0,
          "maximum": 0,
          "target": 0
        },
        "strategy": {
          "risk": 100,
          "onDemandCount": null,
          "availabilityVsCost": "balanced"
        },
        "compute": {
          "instanceTypes": {
            "ondemand": "m3.large",
            "spot": [
              "m3.large",
              "c3.large"
            ]
          },
          "availabilityZones": [
            {
              "name": "us-west-2b",
              "subnetIds": [
                "subnet-657493"
              ]
            }
          ],
          "product": "Linux/UNIX",
          "launchSpecification": {
            "securityGroupIds": [
              "sg-987126"
            ],
            "monitoring": true,
            "imageId": "ami-87236464",
            "keyPair": "Pairkey",
            "userData": null
          }
        },
        "scaling": {
          "up": [
            {
              "policyName": "up Scaling Policy 1",
              "metricName": "CPUUtilization",
              "statistic": "maximum",
              "unit": "percent",
              "threshold": 90,
              "adjustment": 2,
              "namespace": "AWS/EC2",
              "period": 300,
              "evaluationPeriods": 3,
              "cooldown": 60
            }
          ],
          "down": [
            {
              "policyName": "down Scaling Policy 1",
              "metricName": "CPUUtilization",
              "statistic": "maximum",
              "unit": "percent",
              "threshold": 50,
              "adjustment": 2,
              "namespace": "AWS/EC2",
              "period": 300,
              "evaluationPeriods": 3,
              "cooldown": 60,
              "dimensions": [
                {
                  "name": "InstanceId"
                }
              ]
            }
          ]
        },
        "scheduling": {
          "tasks": [
            {
              "frequency": "weekly",
              "taskType": "backup_ami"
            }
          ]
        },
        "thirdPartiesIntegration": {},
        "createdAt": "2016-02-16T06:35:03.000Z",
        "updatedAt": "2016-02-16T10:21:01.000Z"
      }
    ],
    "count": 2
  }
}