Operação para eliminar um recurso.
DELETE https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SignalRService/webPubSub/{resourceName}?api-version=2024-03-01
Expandir tabela
Name
Em
Necessário
Tipo
Description
resourceGroupName
path
True
string
O nome do grupo de recursos. O nome não é sensível a maiúsculas e minúsculas.
resourceName
path
True
string
O nome do recurso.
Padrão Regex: ^[a-zA-Z][a-zA-Z0-9-]{1,61}[a-zA-Z0-9]$
subscriptionId
path
True
string
uuid
O ID da subscrição de destino. O valor tem de ser um UUID.
api-version
query
True
string
A versão da API a utilizar para esta operação.
Expandir tabela
Name
Tipo
Description
200 OK
Com êxito. A resposta indica que o recurso já foi eliminado.
202 Accepted
Aceite. A resposta indica que a operação de eliminação é executada em segundo plano.
204 No Content
Com êxito. A resposta indica que o recurso já foi eliminado.
Other Status Codes
ErrorResponse
Resposta de erro que descreve a razão pela qual a operação falhou.
Fluxo OAuth2 do Azure Active Directory
Tipo:
oauth2
Fluxo:
implicit
URL de Autorização:
https://login.microsoftonline.com/common/oauth2/authorize
Expandir tabela
Name
Description
user_impersonation
representar a sua conta de utilizador
Pedido de amostra
DELETE https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.SignalRService/webPubSub/myWebPubSubService?api-version=2024-03-01
/**
* Samples for WebPubSub Delete.
*/
public final class Main {
/*
* x-ms-original-file:
* specification/webpubsub/resource-manager/Microsoft.SignalRService/stable/2024-03-01/examples/WebPubSub_Delete.
* json
*/
/**
* Sample code: WebPubSub_Delete.
*
* @param manager Entry point to WebPubSubManager.
*/
public static void webPubSubDelete(com.azure.resourcemanager.webpubsub.WebPubSubManager manager) {
manager.webPubSubs().delete("myResourceGroup", "myWebPubSubService", 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.webpubsub import WebPubSubManagementClient
"""
# PREREQUISITES
pip install azure-identity
pip install azure-mgmt-webpubsub
# USAGE
python web_pub_sub_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 = WebPubSubManagementClient(
credential=DefaultAzureCredential(),
subscription_id="00000000-0000-0000-0000-000000000000",
)
client.web_pub_sub.begin_delete(
resource_group_name="myResourceGroup",
resource_name="myWebPubSubService",
).result()
# x-ms-original-file: specification/webpubsub/resource-manager/Microsoft.SignalRService/stable/2024-03-01/examples/WebPubSub_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 armwebpubsub_test
import (
"context"
"log"
"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/webpubsub/armwebpubsub"
)
// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7189fb57f69468c56df76f9a4d68dd9ff04ab100/specification/webpubsub/resource-manager/Microsoft.SignalRService/stable/2024-03-01/examples/WebPubSub_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 := armwebpubsub.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
log.Fatalf("failed to create client: %v", err)
}
poller, err := clientFactory.NewClient().BeginDelete(ctx, "myResourceGroup", "myWebPubSubService", 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 { WebPubSubManagementClient } = require("@azure/arm-webpubsub");
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/webpubsub/resource-manager/Microsoft.SignalRService/stable/2024-03-01/examples/WebPubSub_Delete.json
*/
async function webPubSubDelete() {
const subscriptionId =
process.env["WEB-PUBSUB_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000";
const resourceGroupName = process.env["WEB-PUBSUB_RESOURCE_GROUP"] || "myResourceGroup";
const resourceName = "myWebPubSubService";
const credential = new DefaultAzureCredential();
const client = new WebPubSubManagementClient(credential, subscriptionId);
const result = await client.webPubSub.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
Resposta da amostra
Location: https://management.azure.com/subscriptions/subid/providers/Microsoft.SignalRService/...pathToOperationResult...
Azure-AsyncOperation: https://management.azure.com/subscriptions/subid/providers/Microsoft.SignalRService/...pathToOperationStatus...
Expandir tabela
Object
Informações adicionais sobre o erro de gestão de recursos.
Expandir tabela
Name
Tipo
Description
info
object
As informações adicionais.
type
string
O tipo de informação adicional.
Object
O detalhe do erro.
Expandir tabela
Name
Tipo
Description
additionalInfo
ErrorAdditionalInfo []
As informações adicionais do erro.
code
string
O código de erro.
details
ErrorDetail []
Os detalhes do erro.
message
string
A mensagem de erro.
target
string
O destino do erro.
Object
Resposta a erros
Expandir tabela
Name
Tipo
Description
error
ErrorDetail
O objeto de erro.