---
title: "Virtual Machine Protection"
method: POST
path: "/azure/compute/group/{groupId}/vm/{vmName}/protection"
tags: ["Elastigroup Azure Spot VMs"]
---

# Virtual Machine Protection

`POST /azure/compute/group/{groupId}/vm/{vmName}/protection`

## Request

- Base URL: `https://api.spotinst.io`
- URL: `https://api.spotinst.io/azure/compute/group/{groupId}/vm/{vmName}/protection`
- Auth: HTTP bearer

Protect virtual machines in Elastigroup cluster.

## Path parameters

- `vmName` string, required

## Query parameters

- `ttlInMinutes` integer

## Parameters

- `#/paths/~1azure~1costs/get/parameters/0` (unresolved $ref)
- `#/paths/~1aws~1ec2~1group~1%7BgroupId%7D/put/parameters/0` (unresolved $ref)

## Response `200`

Set protection

- object
  - `response` object
    - `status` object
      - `code` integer
      - `message` string

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