---
title: "POST /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/schedules/{name}/retarget"
method: POST
path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/schedules/{name}/retarget"
tags: ["GlobalSchedules"]
---

# POST /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/schedules/{name}/retarget

`POST /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/schedules/{name}/retarget`

Updates a schedule's target resource Id. This operation can take a while to complete.

## Path parameters

- `subscriptionId` string, required
- `resourceGroupName` string, required
- `name` string, required

## Query parameters

- `api-version` string, required

## Request body

- RetargetScheduleProperties — Properties for retargeting a virtual machine schedule.
  - `currentResourceId` string — The resource Id of the virtual machine on which the schedule operates
  - `targetResourceId` string — The resource Id of the virtual machine that the schedule should be retargeted to

## Response `200`

OK

## Other responses

- `202` — Accepted
- `default` — BadRequest

---

[API](https://skmtc.net/azure/apis/devtestlabsclient.md) · [All operations](https://skmtc.net/azure/apis/devtestlabsclient/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/azure/devtestlabsclient/versions/a1f17c27e170/schema)
