---
title: "Cancels a currently running template deployment."
method: POST
path: "/providers/Microsoft.Resources/deployments/{deploymentName}/cancel"
tags: ["Deployments"]
---

# Cancels a currently running template deployment.

`POST /providers/Microsoft.Resources/deployments/{deploymentName}/cancel`

You can cancel a deployment only if the provisioningState is Accepted or Running. After the deployment is canceled, the provisioningState is set to Canceled. Canceling a template deployment stops the currently running template deployment and leaves the resources partially deployed.

## Path parameters

- `deploymentName` string, required

## Query parameters

- `api-version` string, required

## Response `204`

No Content

## Other responses

- `default` — Error response describing why the operation failed.

---

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