Virtual Machines - Delete
De bewerking voor het verwijderen van een virtuele machine.
DELETE https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}?api-version=2025-04-01
DELETE https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}?api-version=2025-04-01&forceDeletion={forceDeletion}
URI-parameters
| Name | In | Vereist | Type | Description |
|---|---|---|---|---|
|
resource
|
path | True |
string minLength: 1maxLength: 90 |
De naam van de resourcegroep. De naam is hoofdletterongevoelig. |
|
subscription
|
path | True |
string minLength: 1 |
De id van het doelabonnement. |
|
vm
|
path | True |
string |
De naam van de virtuele machine. |
|
api-version
|
query | True |
string minLength: 1 |
De API-versie die voor deze bewerking moet worden gebruikt. |
|
force
|
query |
boolean |
Optionele parameter om virtuele machines geforceerd te verwijderen. |
Antwoorden
| Name | Type | Description |
|---|---|---|
| 200 OK |
Resource is verwijderd. |
|
| 202 Accepted |
Verwijdering van bronnen geaccepteerd. Kopteksten
|
|
| 204 No Content |
Resource bestaat niet. |
|
| Other Status Codes |
Een onverwachte foutreactie. |
Beveiliging
azure_auth
OAuth2-stroom voor Azure Active Directory.
Type:
oauth2
Stroom:
implicit
Autorisatie-URL:
https://login.microsoftonline.com/common/oauth2/authorize
Bereiken
| Name | Description |
|---|---|
| user_impersonation | Uw gebruikersaccount imiteren |
Voorbeelden
Force delete a VM
Voorbeeldaanvraag
DELETE https://management.azure.com/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVM?api-version=2025-04-01&forceDeletion=true
Voorbeeldrespons
Location: https://management.azure.com/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/westus/operations/{operationId}&monitor=true&api-version=2025-04-01
Definities
| Name | Description |
|---|---|
|
Api |
Api-fout. |
|
Api |
Api-foutbasis. |
|
Cloud |
Een foutreactie van de Compute-service. |
|
Inner |
Interne foutdetails. |
ApiError
Api-fout.
| Name | Type | Description |
|---|---|---|
| code |
string |
De foutcode. |
| details |
Details van de Api-fout |
|
| innererror |
De innerlijke fout van de Api |
|
| message |
string |
Het foutbericht. |
| target |
string |
Het doel van de specifieke fout. |
ApiErrorBase
Api-foutbasis.
| Name | Type | Description |
|---|---|---|
| code |
string |
De foutcode. |
| message |
string |
Het foutbericht. |
| target |
string |
Het doel van de specifieke fout. |
CloudError
Een foutreactie van de Compute-service.
| Name | Type | Description |
|---|---|---|
| error |
Api-fout. |
InnerError
Interne foutdetails.
| Name | Type | Description |
|---|---|---|
| errordetail |
string |
De interne foutmelding of uitzonderingsdump. |
| exceptiontype |
string |
Het uitzonderingstype. |