---
title: "Swap OS Disk to Stateful Node"
method: PUT
path: "/azure/compute/statefulNode/{nodeId}/osDisk/swap"
tags: ["Elastigroup Azure Stateful"]
---

# Swap OS Disk to Stateful Node

`PUT /azure/compute/statefulNode/{nodeId}/osDisk/swap`

Configure a new managed OS disk for an OS persisted paused/stopped Stateful Node.

## Parameters

- `#/paths/~1azure~1costs/get/parameters/0` — unresolved $ref
- `#/paths/~1azure~1compute~1statefulNode~1%7BnodeId%7D/get/parameters/1` — unresolved $ref

## Request body

- object
  - `osDiskName` string, required — Specify the name of the new OS disk.
  - `osDiskResourceGroupName` string, required — The resource group name in which the new OS disk exists.
  - `shouldTerminate` boolean — Indicates whether to delete the original OS disk.
  - `retentionTime` integer — Time to keep the original OS disk before deletion (hours).

## Response `200`

Ok

## 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)
