删除资源的操作。
DELETE https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SignalRService/signalR/{resourceName}?api-version=2023-02-01
URI 参数
名称 |
在 |
必需 |
类型 |
说明 |
resourceGroupName
|
path |
True
|
string
|
包含该资源的资源组名称。 可以从 Azure 资源管理器 API 或门户获取此值。
|
resourceName
|
path |
True
|
string
|
资源的名称。
|
subscriptionId
|
path |
True
|
string
|
获取唯一标识 Microsoft Azure 订阅的订阅 ID。 此订阅 ID 是每个服务调用的 URI 的一部分。
|
api-version
|
query |
True
|
string
|
客户端 API 版本。
|
响应
名称 |
类型 |
说明 |
200 OK
|
|
成功。 响应指示资源已被删除。
|
202 Accepted
|
|
已接受。 响应指示删除操作是在后台执行的。
|
204 No Content
|
|
成功。 响应指示资源已被删除。
|
Other Status Codes
|
ErrorResponse
|
描述操作失败原因的错误响应。
|
安全性
azure_auth
Azure Active Directory OAuth2 流
Type:
oauth2
Flow:
implicit
Authorization URL:
https://login.microsoftonline.com/common/oauth2/authorize
Scopes
名称 |
说明 |
user_impersonation
|
模拟用户帐户
|
示例
SignalR_Delete
Sample Request
DELETE https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.SignalRService/signalR/mySignalRService?api-version=2023-02-01
/** Samples for SignalR Delete. */
public final class Main {
/*
* x-ms-original-file: specification/signalr/resource-manager/Microsoft.SignalRService/stable/2023-02-01/examples/SignalR_Delete.json
*/
/**
* Sample code: SignalR_Delete.
*
* @param manager Entry point to SignalRManager.
*/
public static void signalRDelete(com.azure.resourcemanager.signalr.SignalRManager manager) {
manager.signalRs().delete("myResourceGroup", "mySignalRService", 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.signalr import SignalRManagementClient
"""
# PREREQUISITES
pip install azure-identity
pip install azure-mgmt-signalr
# USAGE
python signal_r_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 = SignalRManagementClient(
credential=DefaultAzureCredential(),
subscription_id="00000000-0000-0000-0000-000000000000",
)
response = client.signal_r.begin_delete(
resource_group_name="myResourceGroup",
resource_name="mySignalRService",
).result()
print(response)
# x-ms-original-file: specification/signalr/resource-manager/Microsoft.SignalRService/stable/2023-02-01/examples/SignalR_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 armsignalr_test
import (
"context"
"log"
"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/signalr/armsignalr"
)
// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1e7b408f3323e7f5424745718fe62c7a043a2337/specification/signalr/resource-manager/Microsoft.SignalRService/stable/2023-02-01/examples/SignalR_Delete.json
func ExampleClient_BeginDelete() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armsignalr.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
log.Fatalf("failed to create client: %v", err)
}
poller, err := clientFactory.NewClient().BeginDelete(ctx, "myResourceGroup", "mySignalRService", 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 { SignalRManagementClient } = require("@azure/arm-signalr");
const { DefaultAzureCredential } = require("@azure/identity");
/**
* This sample demonstrates how to Operation to delete a resource.
*
* @summary Operation to delete a resource.
* x-ms-original-file: specification/signalr/resource-manager/Microsoft.SignalRService/stable/2023-02-01/examples/SignalR_Delete.json
*/
async function signalRDelete() {
const subscriptionId =
process.env["SIGNALR_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000";
const resourceGroupName = process.env["SIGNALR_RESOURCE_GROUP"] || "myResourceGroup";
const resourceName = "mySignalRService";
const credential = new DefaultAzureCredential();
const client = new SignalRManagementClient(credential, subscriptionId);
const result = await client.signalR.beginDeleteAndWait(resourceGroupName, resourceName);
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
Location: https://management.azure.com/subscriptions/subid/providers/Microsoft.SignalRService/...pathToOperationResult...
Azure-AsyncOperation: https://management.azure.com/subscriptions/subid/providers/Microsoft.SignalRService/...pathToOperationStatus...
定义
ErrorAdditionalInfo
资源管理错误附加信息。
名称 |
类型 |
说明 |
info
|
object
|
其他信息。
|
type
|
string
|
其他信息类型。
|
ErrorDetail
错误详细信息。
ErrorResponse
错误响应