Resource Groups - Delete

Tar bort en resursgrupp.
När du tar bort en resursgrupp tas även alla dess resurser bort. Om du tar bort en resursgrupp tas alla dess malldistributioner och för närvarande lagrade åtgärder bort.

DELETE https://management.azure.com/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}?api-version=2021-04-01
DELETE https://management.azure.com/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}?forceDeletionTypes={forceDeletionTypes}&api-version=2021-04-01

URI-parametrar

Name I Obligatorisk Typ Description
resourceGroupName
path True

string

Namnet på den resursgrupp som ska tas bort. Namnet är skiftlägesokänsligt.

Regex pattern: ^[-\w\._\(\)]+$

subscriptionId
path True

string

Prenumerations-ID:t för Microsoft Azure.

api-version
query True

string

Den API-version som ska användas för den här åtgärden.

forceDeletionTypes
query

string

De resurstyper som du vill framtvinga borttagning. För närvarande stöds endast följande: forceDeletionTypes=Microsoft.Compute/virtualMachines,Microsoft.Compute/virtualMachineScaleSets

Svar

Name Typ Description
200 OK

OK

202 Accepted

Har godkänts

Other Status Codes

CloudError

Felsvar som beskriver varför åtgärden misslyckades.

Säkerhet

azure_auth

Azure Active Directory OAuth2 Flow

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

Scopes

Name Description
user_impersonation personifiera ditt användarkonto

Exempel

Force delete all the Virtual Machines and Virtual Machine Scale Sets in a resource group
Force delete all the Virtual Machines in a resource group

Force delete all the Virtual Machines and Virtual Machine Scale Sets in a resource group

Sample Request

DELETE https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/my-resource-group?forceDeletionTypes=Microsoft.Compute/virtualMachines,Microsoft.Compute/virtualMachineScaleSets&api-version=2021-04-01

Sample Response

Force delete all the Virtual Machines in a resource group

Sample Request

DELETE https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/my-resource-group?forceDeletionTypes=Microsoft.Compute/virtualMachines&api-version=2021-04-01

Sample Response

Definitioner

Name Description
CloudError

Ett felsvar för en resurshanteringsbegäran.

ErrorAdditionalInfo

Ytterligare information om resurshanteringsfelet.

ErrorResponse

Felsvar

CloudError

Ett felsvar för en resurshanteringsbegäran.

Name Typ Description
error

ErrorResponse

Felsvar
Vanliga felsvar för alla Azure Resource Manager API:er för att returnera felinformation för misslyckade åtgärder. (Detta följer även OData-felsvarsformatet.)

ErrorAdditionalInfo

Ytterligare information om resurshanteringsfelet.

Name Typ Description
info

object

Ytterligare information.

type

string

Den ytterligare informationstypen.

ErrorResponse

Felsvar

Name Typ Description
additionalInfo

ErrorAdditionalInfo[]

Ytterligare information om felet.

code

string

Felkoden.

details

ErrorResponse[]

Felinformationen.

message

string

Felmeddelandet.

target

string

Felmålet.