Description de La suppression d’un App Service Environment.
DELETE https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}?api-version=2023-12-01
Avec des paramètres facultatifs:
DELETE https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}?forceDelete={forceDelete}&api-version=2023-12-01
Paramètres URI
Nom |
Dans |
Obligatoire |
Type |
Description |
name
|
path |
True
|
string
|
Nom du App Service Environment.
|
resourceGroupName
|
path |
True
|
string
|
Nom du groupe de ressources auquel appartient la ressource.
Modèle d’expression régulière: ^[-\w\._\(\)]+[^\.]$
|
subscriptionId
|
path |
True
|
string
|
Votre ID d’abonnement Azure. Il s’agit d’une chaîne au format GUID (par exemple, 000000-0000-0000-0000-000000000000000).
|
api-version
|
query |
True
|
string
|
Version d'API
|
forceDelete
|
query |
|
boolean
|
Spécifiez true pour forcer la suppression même si le App Service Environment contient des ressources. Par défaut, il s’agit de false .
|
Réponses
Nom |
Type |
Description |
202 Accepted
|
|
L’opération est en cours.
|
204 No Content
|
|
App Service Environment n’existe pas
|
Other Status Codes
|
DefaultErrorResponse
|
App Service réponse d’erreur.
|
Sécurité
azure_auth
Flux OAuth2 Azure Active Directory
Type:
oauth2
Flow:
implicit
Authorization URL:
https://login.microsoftonline.com/common/oauth2/authorize
Scopes
Nom |
Description |
user_impersonation
|
Emprunter l’identité de votre compte d’utilisateur
|
Exemples
Delete an App Service Environment.
Sample request
DELETE https://management.azure.com/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/test-rg/providers/Microsoft.Web/hostingEnvironments/test-ase?api-version=2023-12-01
/**
* Samples for AppServiceEnvironments Delete.
*/
public final class Main {
/*
* x-ms-original-file:
* specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/AppServiceEnvironments_Delete.json
*/
/**
* Sample code: Delete an App Service Environment.
*
* @param azure The entry point for accessing resource management APIs in Azure.
*/
public static void deleteAnAppServiceEnvironment(com.azure.resourcemanager.AzureResourceManager azure) {
azure.webApps().manager().serviceClient().getAppServiceEnvironments().delete("test-rg", "test-ase", null,
com.azure.core.util.Context.NONE);
}
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
from azure.identity import DefaultAzureCredential
from azure.mgmt.web import WebSiteManagementClient
"""
# PREREQUISITES
pip install azure-identity
pip install azure-mgmt-web
# USAGE
python app_service_environments_delete.py
Before run the sample, please set the values of the client ID, tenant ID and client secret
of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID,
AZURE_CLIENT_SECRET. For more info about how to get the value, please see:
https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal
"""
def main():
client = WebSiteManagementClient(
credential=DefaultAzureCredential(),
subscription_id="34adfa4f-cedf-4dc0-ba29-b6d1a69ab345",
)
client.app_service_environments.begin_delete(
resource_group_name="test-rg",
name="test-ase",
).result()
# x-ms-original-file: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/AppServiceEnvironments_Delete.json
if __name__ == "__main__":
main()
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
package armappservice_test
import (
"context"
"log"
"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appservice/armappservice/v3"
)
// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/de1f3772629b6f4d3ac01548a5f6d719bfb97c9e/specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/AppServiceEnvironments_Delete.json
func ExampleEnvironmentsClient_BeginDelete() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armappservice.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
log.Fatalf("failed to create client: %v", err)
}
poller, err := clientFactory.NewEnvironmentsClient().BeginDelete(ctx, "test-rg", "test-ase", &armappservice.EnvironmentsClientBeginDeleteOptions{ForceDelete: nil})
if err != nil {
log.Fatalf("failed to finish the request: %v", err)
}
_, err = poller.PollUntilDone(ctx, nil)
if err != nil {
log.Fatalf("failed to pull the result: %v", err)
}
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
const { WebSiteManagementClient } = require("@azure/arm-appservice");
const { DefaultAzureCredential } = require("@azure/identity");
/**
* This sample demonstrates how to Description for Delete an App Service Environment.
*
* @summary Description for Delete an App Service Environment.
* x-ms-original-file: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/AppServiceEnvironments_Delete.json
*/
async function deleteAnAppServiceEnvironment() {
const subscriptionId =
process.env["APPSERVICE_SUBSCRIPTION_ID"] || "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345";
const resourceGroupName = process.env["APPSERVICE_RESOURCE_GROUP"] || "test-rg";
const name = "test-ase";
const credential = new DefaultAzureCredential();
const client = new WebSiteManagementClient(credential, subscriptionId);
const result = await client.appServiceEnvironments.beginDeleteAndWait(resourceGroupName, name);
console.log(result);
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
Sample response
x-ms-routing-request-id: NORTHCENTRALUS:20220408T212612Z:79bd0bce-5524-4fd1-ada0-1d8c86263d17
Location: https://management.azure.com/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/test-rg/providers/Microsoft.Web/hostingEnvironments/test-ase/operations/f6a27306-3ee3-4e6b-997d-3ba2024b85e6?api-version=2019-08-01
Définitions
DefaultErrorResponse
App Service réponse d’erreur.
Nom |
Type |
Description |
error
|
Error
|
Modèle d’erreur.
|
Details
Nom |
Type |
Description |
code
|
string
|
Chaîne standardisée pour identifier l’erreur par programmation.
|
message
|
string
|
Description détaillée de l’erreur et informations de débogage.
|
target
|
string
|
Description détaillée de l’erreur et informations de débogage.
|
Error
Modèle d’erreur.
Nom |
Type |
Description |
code
|
string
|
Chaîne standardisée pour identifier l’erreur par programmation.
|
details
|
Details[]
|
Erreurs détaillées.
|
innererror
|
string
|
Plus d’informations sur l’erreur de débogage.
|
message
|
string
|
Description détaillée de l’erreur et informations de débogage.
|
target
|
string
|
Description détaillée de l’erreur et informations de débogage.
|