---
title: "Import Stateful Instance"
method: POST
path: "/aws/ec2/statefulMigrationGroup"
tags: ["Elastigroup AWS"]
---

# Import Stateful Instance

`POST /aws/ec2/statefulMigrationGroup`

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

## Parameters

- `#/paths/~1azure~1costs/get/parameters/0` — unresolved $ref

## Request body

- object
  - `statefulMigrationGroup` object, required
    - `originalInstanceId` string, required — The originating Instance ID. This instance will be imported along with its State.
    - `shouldKeepPrivateIp` boolean, required — 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 would like to configure availability zones and subnet ids.
    - `shouldTerminateInstance` boolean — Decide if the instance termination should be automatic or manual. True = automatic termination. False = manual termination.
    - `name` string, required — Specify the new Elastigroup name.
    - `product` string — Operation system type. Possible values: Linux/UNIX | SUSE | Linux Windows | Linux/UNIX (Amazon VPC) | SUSE Linux (Amazon VPC) | Windows (Amazon VPC).
    - `spotInstanceTypes` string[] — An Array holding the types of instances to be used in the Elastigroup.
    - `region` string — Specify the AWS Region the instance is running in and the new Elastigroup will be created in.
    - `availabilityZones` 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.
      - `name` string — This is the name of the Availability Zone, must be a valid availability zone name.
      - `subnetIds` 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.

## Other responses

- `400` — Bad Request

---

[API](https://skmtc.net/spot/apis/spot-by-flexera-api.md) · [All operations](https://skmtc.net/spot/apis/spot-by-flexera-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/spot/spot-by-flexera-api/revisions/72813baf8d47/schema)
