Hiermee verwijdert u een sjabloonspecificatie op naam. Wanneer de bewerking is voltooid, wordt statuscode 200 geretourneerd zonder inhoud.
DELETE https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Resources/templateSpecs/{templateSpecName}?api-version=2021-05-01
URI-parameters
Name |
In |
Vereist |
Type |
Description |
resourceGroupName
|
path |
True
|
string
|
De naam van de resourcegroep. De naam is niet hoofdlettergevoelig.
Regex pattern: ^[-\w\._\(\)]+$
|
subscriptionId
|
path |
True
|
string
|
Abonnements-id die deel uitmaakt van de URI voor elke service-aanroep.
|
templateSpecName
|
path |
True
|
string
|
Naam van de sjabloonspecificatie.
Regex pattern: ^[-\w\._\(\)]+$
|
api-version
|
query |
True
|
string
|
Client-API-versie.
|
Antwoorden
Name |
Type |
Description |
200 OK
|
|
OK - Sjabloonspecificatie verwijderd.
|
204 No Content
|
|
Sjabloonspecificatie bestaat niet.
|
Other Status Codes
|
TemplateSpecsError
|
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
TemplateSpecsDelete
Sample Request
DELETE https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/templateSpecRG/providers/Microsoft.Resources/templateSpecs/simpleTemplateSpec?api-version=2021-05-01
package armtemplatespecs_test
import (
"context"
"log"
"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/resources/armtemplatespecs"
)
// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/resources/resource-manager/Microsoft.Resources/stable/2021-05-01/examples/TemplateSpecsDelete.json
func ExampleClient_Delete() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
return
}
ctx := context.Background()
client, err := armtemplatespecs.NewClient("<subscription-id>", cred, nil)
if err != nil {
log.Fatalf("failed to create client: %v", err)
return
}
_, err = client.Delete(ctx,
"<resource-group-name>",
"<template-spec-name>",
nil)
if err != nil {
log.Fatalf("failed to finish the request: %v", err)
return
}
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
const { TemplateSpecsClient } = require("@azure/arm-templatespecs");
const { DefaultAzureCredential } = require("@azure/identity");
/**
* This sample demonstrates how to Deletes a Template Spec by name. When operation completes, status code 200 returned without content.
*
* @summary Deletes a Template Spec by name. When operation completes, status code 200 returned without content.
* x-ms-original-file: specification/resources/resource-manager/Microsoft.Resources/stable/2021-05-01/examples/TemplateSpecsDelete.json
*/
async function templateSpecsDelete() {
const subscriptionId = "00000000-0000-0000-0000-000000000000";
const resourceGroupName = "templateSpecRG";
const templateSpecName = "simpleTemplateSpec";
const credential = new DefaultAzureCredential();
const client = new TemplateSpecsClient(credential, subscriptionId);
const result = await client.templateSpecs.delete(resourceGroupName, templateSpecName);
console.log(result);
}
templateSpecsDelete().catch(console.error);
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
using System;
using System.Threading.Tasks;
using Azure;
using Azure.Core;
using Azure.Identity;
using Azure.ResourceManager;
using Azure.ResourceManager.Resources;
using Azure.ResourceManager.Resources.Models;
// Generated from example definition: specification/resources/resource-manager/Microsoft.Resources/stable/2021-05-01/examples/TemplateSpecsDelete.json
// this example is just showing the usage of "TemplateSpecs_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 TemplateSpecResource created on azure
// for more information of creating TemplateSpecResource, please refer to the document of TemplateSpecResource
string subscriptionId = "00000000-0000-0000-0000-000000000000";
string resourceGroupName = "templateSpecRG";
string templateSpecName = "simpleTemplateSpec";
ResourceIdentifier templateSpecResourceId = TemplateSpecResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, templateSpecName);
TemplateSpecResource templateSpec = client.GetTemplateSpecResource(templateSpecResourceId);
// invoke the operation
await templateSpec.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
Definities
ErrorAdditionalInfo
Aanvullende informatie over de resourcebeheerfout.
Name |
Type |
Description |
info
|
object
|
De aanvullende informatie.
|
type
|
string
|
Het type aanvullende informatie.
|
ErrorResponse
Foutreactie
Name |
Type |
Description |
additionalInfo
|
ErrorAdditionalInfo[]
|
De fout aanvullende informatie.
|
code
|
string
|
De foutcode.
|
details
|
ErrorResponse[]
|
De foutdetails.
|
message
|
string
|
Het foutbericht.
|
target
|
string
|
Het foutdoel.
|
TemplateSpecsError
Foutreactie sjabloonspecificaties.
Name |
Type |
Description |
error
|
ErrorResponse
|
Foutreactie
Algemene foutreactie voor alle Azure Resource Manager-API's om foutdetails voor mislukte bewerkingen te retourneren. (Dit volgt ook de indeling van de OData-foutreactie.)
|