Create a new Stateful Elastigroup – this Elastigroup will have the same configuration and state of the imported instance.

URL Parameters

Parameter Type Description

Your account id in spotinst

Example: act-12345

Available Body Attributes

Attribute Type Description
statefulMigrationGroup * Object

Holding the Group configuration.

statefulMigrationGroup.shouldKeepPrivateIp * Boolean

Setting this value to true will maintain the initial instance private IP. This will also require that the original instance be terminated in the import process incurring maintenance time.
Note: This value must be false if you wish to configure availability zones and subnet ids.

statefulMigrationGroup.originalInstanceId * String

The originating Instance ID. This instance will be imported along with its State.

statefulMigrationGroup.region * String

Specify the AWS Region the instance is running in and the new Elastigroup will be created in.

statefulMigrationGroup.name * String

Specify the new Elastigroup name.

statefulMigrationGroup.product String

Operation system type. Possible values: Linux/UNIX | SUSE | Linux Windows | Linux/UNIX (Amazon VPC) | SUSE Linux (Amazon VPC) | Windows (Amazon VPC).

statefulMigrationGroup.spotInstanceTypes Array<String>

An Array holding the types of instances to be used in the Elastigroup.

Example: [“m3.large”,“m4.large”]
statefulMigrationGroup.availabilityZones Array<Object>

An Array holding an object of availabilityZones, this configures the availability zones the group may launch instances in. If this is not passed, the availability zone configuration is taken from the imported instance.
Note: This field must be null if statefulMigrationGroup.shouldKeepPrivateIp is true, and must have a minimum of one availability zone.

statefulMigrationGroup.availabilityZones.name * String

This is the name of the Availability Zone, must be a valid availability zone name.

statefulMigrationGroup.availabilityZones.subnetIds Array<String>

This is the ids of the subnets, if this is not defined, then the default subnet for the availability zone is used.
Note: This field must be a valid subnet id, this field may be null.


    "Content-Type": "application/json",
    "Authorization": "Bearer ${token}"
 "statefulMigrationGroup": {
     "shouldKeepPrivateIp": false,
     "originalInstanceId": "i-123c53d9f152a1234",
     "name": "MyNewElastigroup",
     "product": "Linux/UNIX (Amazon VPC)",
     "spotInstanceTypes": [
     "region": "us-west-2",
    "availabilityZones": [
          "name" : "us-west-2b"
          "name" : "us-west-2c",
          "subnetIds" : ["subnet-12345678"]

Available Response Parameters

Parameter Type Description
id String

The Stateful Import process id

state String

The stateful Import process status

Response - 200

    "Content-Type": "application/json"
  "request": {
    "id": "d1b6003c-b02b-4088-b146-e7fb73bd6ad3",
    "url": "/aws/ec2/statefulMigrationGroup?spotinstAccountId=act-57761234",
    "method": "POST",
    "timestamp": "2018-01-23T11:38:34.101Z"
  "response": {
    "status": {
      "code": 200,
      "message": "OK"
    "kind": "spotinst:aws:ec2:statefulMigrationGroup",
    "items": [
        "id": "smg-7f041234",
        "groupId": "sig-1ed12345",
        "data": {
          "shouldTerminateInstance": true,
          "originalInstanceId": "i-0a9c53d9f15212345",
          "shouldKeepPrivateIp": true
        "state": "MIGRATE_START"
    "count": 1