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

- `name` string, required

## Parameters

- `../../../../../../common-types/resource-management/v3/types.json#/components/parameters/ApiVersionParameter` — unresolved $ref
- `../../../../../../common-types/resource-management/v3/types.json#/components/parameters/SubscriptionIdParameter` — unresolved $ref
- `../../../../../../common-types/resource-management/v3/types.json#/components/parameters/ResourceGroupNameParameter` — unresolved $ref

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

Azure operation completed successfully.

## Other responses

- `202` — Resource operation accepted.
- `default` — An unexpected error response.

## Changes

- **2026-07-13** (2015-05-21-preview) `a25ee04d4396` — 3 warning, 1 info
  - deleted the `path` request parameter `resourceGroupName`
  - deleted the `path` request parameter `subscriptionId`
  - deleted the `query` request parameter `api-version`
  - the endpoint scheme security `azure_auth` was removed from the API
- **2026-07-13** (2015-05-21-preview) `228c0007a018` — 1 info
  - endpoint added

[Change history](https://skmtc.dev/azure/apis/devtestlabs-microsoft-devtestlab-devtestlabs/changes/subscriptions/:subscriptionId/resourceGroups/:resourceGroupName/providers/Microsoft.DevTestLab/schedules/:name/retarget/post.md)

---

[API](https://skmtc.dev/azure/apis/devtestlabs-microsoft-devtestlab-devtestlabs.md) · [All operations](https://skmtc.dev/azure/apis/devtestlabs-microsoft-devtestlab-devtestlabs/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/azure/devtestlabs-microsoft-devtestlab-devtestlabs/revisions/a25ee04d4396/schema)
