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=2024-03-01
DELETE https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}?forceDeletion={forceDeletion}&api-version=2024-03-01

URI-parameters

Name In Vereist Type Description
resourceGroupName
path True

string

De naam van de resourcegroep.

subscriptionId
path True

string

Abonnementsreferenties waarmee het Microsoft Azure-abonnement uniek wordt geïdentificeerd. De abonnements-id maakt deel uit van de URI voor elke service-aanroep.

vmName
path True

string

De naam van de virtuele machine.

api-version
query True

string

Client-API-versie.

forceDeletion
query

boolean

Optionele parameter voor het geforceerd verwijderen van virtuele machines.

Antwoorden

Name Type Description
200 OK

OK

202 Accepted

Geaccepteerd

204 No Content

Geen inhoud

Other Status Codes

CloudError

Foutreactie waarin wordt beschreven waarom de bewerking is mislukt.

Beveiliging

azure_auth

Azure Active Directory OAuth2-stroom

Type: oauth2
Flow: implicit
Authorization URL: https://login.microsoftonline.com/common/oauth2/authorize

Scopes

Name Description
user_impersonation Uw gebruikersaccount imiteren

Voorbeelden

Force delete a VM

Sample Request

DELETE https://management.azure.com/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVM?forceDeletion=true&api-version=2024-03-01

Sample Response

Location: https://management.azure.com/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/westus/operations/{operationId}&monitor=true&api-version=2024-03-01

Definities

Name Description
ApiError

API-fout.

ApiErrorBase

API-foutbasis.

CloudError

Een foutreactie van de Compute-service.

InnerError

Details van interne fout.

ApiError

API-fout.

Name Type Description
code

string

De foutcode.

details

ApiErrorBase[]

De API-foutdetails

innererror

InnerError

De interne api-fout

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

ApiError

API-fout.

InnerError

Details van interne fout.

Name Type Description
errordetail

string

Het interne foutbericht of de uitzonderingsdump.

exceptiontype

string

Het uitzonderingstype.