fbpx
GEThttps://api.spotinst.io/aws/ec2/managedInstance/{MI_ID}?accountId={ACCOUNT_ID}

Get specific Managed Instance config.

URL Parameters

ParameterTypeDescription
ACCOUNT_ID * String

Your Spotinst accountId associated with your token

Example: act-123abc
MI_ID * String

Managed Instance id you want to get

Response - 200

Headers
{
    "Content-Type": "application/json"
}
Body
Copied!
Downloaded!
{
  "request": {
    "id": "9ea37b98-32f7-48ea-8ec3-14e3f396e50e",
    "url": "/aws/ec2/managedInstance/smi-111",
    "method": "GET",
    "timestamp": "2019-04-02T11:09:40.652Z"
  },
  "response": {
    "status": {
      "code": 200,
      "message": "OK"
    },
    "kind": "spotinst:aws:ec2:managedInstance",
    "items": [  
      {
        "managedInstance": {
          "id": "smi-111",
          "name": "mi-test",
          "description": "This is my Managed Instance",
          "region": "us-east-1",
          "createdAt": "2015-10-23T09:00:00.000Z",
          "updatedAt": "2018-08-01T14:11:39.000Z",
          "strategy": {
            "lifeCycle": "spot",
            "orientation": "availabilityOriented",
            "drainingTimeout": null,
            "fallbackToOd": true,
            "utilizeReservedInstances": false,
            "optimizationWindows": [
              "Mon:03:00-Wed:02:30"
            ],
            "revertToSpot": {
              "performAt": "timeWindow"
            }
          },
          "persistence": {
            "blockDevicesMode": "reattach",
            "persistRootDevice": true,
            "persistBlockDevices": true,
            "persistPrivateIp": true
          },
          "healthCheck": {
            "type": "EC2",
            "autoHealing": true,
            "gracePeriod": 120,
            "unhealthyDuration": 120
          },
          "compute": {
            "subnetIds": [
              "subnet-79da021e",
              "subnet-1ba25052"
            ],
            "vpcId": "vpc-111",
            "elasticIp": "ip",
            "privateIp": "ip",
            "launchSpecification": {
              "instanceTypes": {
      	    "preferredType": "t2.micro",
      	    "types": [
      	      "t2.micro",
      	      "t3.micro"
      	    ]
              },
              "ebsOptimized": false,
              "monitoring": false,
              "tenancy": "default",
              "iamRole": {
                "arn": "arn",
                "name": "name"
              },
              "securityGroupIds": [
                "sg-0dfc2c8760df6fec7"
              ],
              "imageId": "ami-01e24be29428c15b2",
              "keyPair": "labs-oregon",
              "tags": [
                {
                  "tagKey": "Creator",
                  "tagValue": "test1@spotinst.com"
                }
              ],
              "userData": "dXNlcmJhc2g2NGVuY29kZWQ=",
              "shutdownScript": "dXNlcmJhc2g2NGVuY29kZWQ=",
              "creditSpecification": 
                {
                  "cpuCredits": "unlimited"
                },
              "networkInterfaces": [
                {
                  "deviceIndex": 0,
                  "associatePublicIpAddress": true,
                  "associateIpv6Address": true
                }
                ]
            }
          },
          "integrations": {
            "loadBalancersConfig": {
              "loadBalancers": [
                {
                  "name": "Yarden-Test",
                  "type": "CLASSIC"
                },
                {
                  "targetSetId": "ts-046a2692b1b2",
                  "balancerId": "lb-98db2e76ac5c",
                  "autoWeight": true,
                  "azAwareness": false,
                  "type": "MULTAI_TARGET_SET"
                },
                {
                  "name": "metrics",
                  "type": "TARGET_GROUP",
                  "arn": "arn"
                }
              ]
            },
            "route53": {
              "domains": [
                {
                  "hostedZoneId": "",
                  "spotinstAccountId": "act-111",
                  "recordSets": [
                    {
                      "name": "test.spotinst.com",
                      "usePublicIp": true
                    }
                  ]
                }
              ]
            }
          },
          "scheduling": {
            "tasks": [
              {
                "taskType": "recycle",
                "startTime": "2019-05-23T10:55:09Z",
                "cronExpression": "0 20 * * *",
                "isEnabled": true
              }
            ]
          }
        }
      }
     ],
    "count": 1
  }
}