---
title: "Stop Migration"
method: PUT
path: "/ocean/aws/k8s/cluster/{oceanClusterId}/migration/{migrationId}"
tags: ["Ocean AWS"]
---

# Stop Migration

`PUT /ocean/aws/k8s/cluster/{oceanClusterId}/migration/{migrationId}`

## Request

- Base URL: `https://api.spotinst.io`
- URL: `https://api.spotinst.io/ocean/aws/k8s/cluster/{oceanClusterId}/migration/{migrationId}`
- Auth: HTTP bearer

Stop an ongoing Workload Migration.

## Parameters

- `#/paths/~1azure~1costs/get/parameters/0` (unresolved $ref)
- `#/paths/~1ocean~1aws~1ecs~1cluster~1%7BoceanClusterId%7D/get/parameters/1` (unresolved $ref)
- `#/paths/~1ocean~1aws~1k8s~1cluster~1%7BoceanClusterId%7D~1migration~1%7BmigrationId%7D/get/parameters/2` (unresolved $ref)

## Request body

- object
  - `migration` object, required: Migration update configuration.
    - `shouldTerminateDrainedNodes` boolean: Ocean will terminate the old instances once the pods that reside on them are migrated, and the old instances are fully drained.
    - `state` string, required: The only allowed state to update is to "STOPPED". This state will stop a running migration.

## Other responses

- `400`: Bad Request

---

[API](https://skmtc.dev/spot/apis/spot-by-flexera-api.md) - [All operations](https://skmtc.dev/spot/apis/spot-by-flexera-api/llms.txt) - [OpenAPI document](https://skmtc.dev/spot/apis/spot-by-flexera-api/revisions/f7e206fa6474?raw)
