テンプレート スペックを名前で削除します。 操作が完了すると、状態コード 200 がコンテンツなしで返されます。
DELETE https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Resources/templateSpecs/{templateSpecName}?api-version=2021-05-01
URI パラメーター
名前 |
/ |
必須 |
型 |
説明 |
resourceGroupName
|
path |
True
|
string
|
リソース グループの名前。 名前の大文字と小文字は区別されます。
Regex pattern: ^[-\w\._\(\)]+$
|
subscriptionId
|
path |
True
|
string
|
すべてのサービス呼び出しの URI の一部を形成するサブスクリプション ID。
|
templateSpecName
|
path |
True
|
string
|
テンプレート スペックの名前。
Regex pattern: ^[-\w\._\(\)]+$
|
api-version
|
query |
True
|
string
|
クライアント API のバージョン。
|
応答
名前 |
型 |
説明 |
200 OK
|
|
OK - テンプレート スペックが削除されました。
|
204 No Content
|
|
テンプレート スペックが存在しません。
|
Other Status Codes
|
TemplateSpecsError
|
操作に失敗した理由を説明するエラー応答。
|
セキュリティ
azure_auth
Azure Active Directory OAuth2 フロー
Type:
oauth2
Flow:
implicit
Authorization URL:
https://login.microsoftonline.com/common/oauth2/authorize
Scopes
名前 |
説明 |
user_impersonation
|
ユーザー アカウントの借用
|
例
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
定義
ErrorAdditionalInfo
リソース管理エラーの追加情報。
名前 |
型 |
説明 |
info
|
object
|
追加情報。
|
type
|
string
|
追加情報の種類。
|
ErrorResponse
エラー応答
名前 |
型 |
説明 |
additionalInfo
|
ErrorAdditionalInfo[]
|
エラーの追加情報。
|
code
|
string
|
エラー コード。
|
details
|
ErrorResponse[]
|
エラーの詳細です。
|
message
|
string
|
エラー メッセージ。
|
target
|
string
|
エラーのターゲット。
|
TemplateSpecsError
テンプレート スペックのエラー応答。
名前 |
型 |
説明 |
error
|
ErrorResponse
|
エラー応答
失敗した操作のエラーの詳細を返す、すべての Azure Resource Manager API に対する一般的なエラー応答 (これは、OData エラー応答形式にも従います)。
|