Suppressions et paramètre de mise à l’échelle automatique
DELETE https://management.azure.com/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Insights/autoscalesettings/{autoscaleSettingName}?api-version=2022-10-01
Paramètres URI
Nom |
Dans |
Obligatoire |
Type |
Description |
autoscaleSettingName
|
path |
True
|
string
|
Nom du paramètre de mise à l’échelle automatique.
|
resourceGroupName
|
path |
True
|
string
|
Nom du groupe de ressources. Le nom ne respecte pas la casse.
|
subscriptionId
|
path |
True
|
string
|
ID de l’abonnement cible.
|
api-version
|
query |
True
|
string
|
Version de l’API à utiliser pour cette opération.
|
Réponses
Nom |
Type |
Description |
200 OK
|
|
Demande réussie de suppression d’un paramètre de mise à l’échelle automatique
|
204 No Content
|
|
Aucun contenu : demande réussie de suppression d’un paramètre de mise à l’échelle automatique, mais la réponse est intentionnellement vide
|
Other Status Codes
|
AutoscaleErrorResponse
|
Réponse d’erreur décrivant la raison de l’échec de l’opération.
|
Sécurité
azure_auth
Flux OAuth2 Azure Active Directory
Type:
oauth2
Flux:
implicit
URL d’autorisation:
https://login.microsoftonline.com/common/oauth2/authorize
Étendues
Nom |
Description |
user_impersonation
|
Emprunter l’identité de votre compte d’utilisateur
|
Exemples
Delete an autoscale setting
Exemple de requête
DELETE https://management.azure.com/subscriptions/b67f7fec-69fc-4974-9099-a26bd6ffeda3/resourcegroups/TestingMetricsScaleSet/providers/Microsoft.Insights/autoscalesettings/MySetting?api-version=2022-10-01
/**
* Samples for AutoscaleSettings Delete.
*/
public final class Main {
/*
* x-ms-original-file:
* specification/monitor/resource-manager/Microsoft.Insights/stable/2022-10-01/examples/deleteAutoscaleSetting.json
*/
/**
* Sample code: Delete an autoscale setting.
*
* @param azure The entry point for accessing resource management APIs in Azure.
*/
public static void deleteAnAutoscaleSetting(com.azure.resourcemanager.AzureResourceManager azure) {
azure.diagnosticSettings().manager().serviceClient().getAutoscaleSettings()
.deleteWithResponse("TestingMetricsScaleSet", "MySetting", 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
package armmonitor_test
import (
"context"
"log"
"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/monitor/armmonitor"
)
// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/969fd0c2634fbcc1975d7abe3749330a5145a97c/specification/monitor/resource-manager/Microsoft.Insights/stable/2022-10-01/examples/deleteAutoscaleSetting.json
func ExampleAutoscaleSettingsClient_Delete() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armmonitor.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
log.Fatalf("failed to create client: %v", err)
}
_, err = clientFactory.NewAutoscaleSettingsClient().Delete(ctx, "TestingMetricsScaleSet", "MySetting", nil)
if err != nil {
log.Fatalf("failed to finish the request: %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 { MonitorClient } = require("@azure/arm-monitor");
const { DefaultAzureCredential } = require("@azure/identity");
/**
* This sample demonstrates how to Deletes and autoscale setting
*
* @summary Deletes and autoscale setting
* x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/stable/2022-10-01/examples/deleteAutoscaleSetting.json
*/
async function deleteAnAutoscaleSetting() {
const subscriptionId =
process.env["MONITOR_SUBSCRIPTION_ID"] || "b67f7fec-69fc-4974-9099-a26bd6ffeda3";
const resourceGroupName = process.env["MONITOR_RESOURCE_GROUP"] || "TestingMetricsScaleSet";
const autoscaleSettingName = "MySetting";
const credential = new DefaultAzureCredential();
const client = new MonitorClient(credential, subscriptionId);
const result = await client.autoscaleSettings.delete(resourceGroupName, autoscaleSettingName);
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
using Azure;
using Azure.ResourceManager;
using System;
using System.Threading.Tasks;
using System.Xml;
using Azure.Core;
using Azure.Identity;
using Azure.ResourceManager.Monitor.Models;
using Azure.ResourceManager.Resources;
using Azure.ResourceManager.Monitor;
// Generated from example definition: specification/monitor/resource-manager/Microsoft.Insights/stable/2022-10-01/examples/deleteAutoscaleSetting.json
// this example is just showing the usage of "AutoscaleSettings_Delete" operation, for the dependent resources, they will have to be created separately.
// get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line
TokenCredential cred = new DefaultAzureCredential();
// authenticate your client
ArmClient client = new ArmClient(cred);
// this example assumes you already have this AutoscaleSettingResource created on azure
// for more information of creating AutoscaleSettingResource, please refer to the document of AutoscaleSettingResource
string subscriptionId = "b67f7fec-69fc-4974-9099-a26bd6ffeda3";
string resourceGroupName = "TestingMetricsScaleSet";
string autoscaleSettingName = "MySetting";
ResourceIdentifier autoscaleSettingResourceId = AutoscaleSettingResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, autoscaleSettingName);
AutoscaleSettingResource autoscaleSetting = client.GetAutoscaleSettingResource(autoscaleSettingResourceId);
// invoke the operation
await autoscaleSetting.DeleteAsync(WaitUntil.Completed);
Console.WriteLine($"Succeeded");
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
Définitions
AutoscaleErrorResponse
Décrit le format de réponse d’erreur.
Nom |
Type |
Description |
error
|
Error
|
Objet d’erreur.
|
systemData
|
systemData
|
Métadonnées système liées à la réponse.
|
createdByType
Type d’identité qui a créé la ressource.
Nom |
Type |
Description |
Application
|
string
|
|
Key
|
string
|
|
ManagedIdentity
|
string
|
|
User
|
string
|
|
Error
Objet d’erreur.
Nom |
Type |
Description |
code
|
string
|
Un des codes d’erreur définis par le serveur.
|
details
|
string
|
Représentation lisible par l’homme des détails de l’erreur.
|
message
|
string
|
Représentation lisible par l’homme de l’erreur.
|
target
|
string
|
Cible de l’erreur particulière.
|
systemData
Métadonnées relatives à la création et à la dernière modification de la ressource.
Nom |
Type |
Description |
createdAt
|
string
|
Horodatage de la création de ressources (UTC).
|
createdBy
|
string
|
Identité qui a créé la ressource.
|
createdByType
|
createdByType
|
Type d’identité qui a créé la ressource.
|
lastModifiedAt
|
string
|
Horodatage de la dernière modification de la ressource (UTC)
|
lastModifiedBy
|
string
|
Identité qui a modifié la dernière ressource.
|
lastModifiedByType
|
createdByType
|
Type d’identité qui a modifié la dernière ressource.
|