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

Update one or more attributes in your Managed Instance.

This API supports partial updates, so only specific fields can be updated separately.

In order to remove a setting from the instance config, set the object value to null.

For a Full List of the Elastigroup JSON object reference please see Managed Instance Create.

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 update

Request - Request - Update instance types

Headers
{
    "Content-Type": "application/json",
    "Authorization": "Bearer ${token}"
}
Body
Copied!
Downloaded!
{
  "managedInstance": {
    "compute": {
      "launchSpecification": {
        "instanceTypes": {
    	    "preferredType": "t2.micro",
    	    "types": [
    	      "t2.micro",
    	      "t3.micro",
              "t4.micro"
    	    ]
        }
      }
    }
  }
}
Request - Request - Update Utilize RI

Headers
{
    "Content-Type": "application/json",
    "Authorization": "Bearer ${token}"
}
Body
Copied!
Downloaded!
{
  "managedInstance": {
    "strategy": {
        "utilizeReservedInstances": false
    }
  }
}