Exclui uma conexão de ponto de extremidade privado com um determinado nome.
DELETE https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/privateEndpointConnections/{privateEndpointConnectionName}?api-version=2023-11-15
Parâmetros de URI
Nome |
Em |
Obrigatório |
Tipo |
Description |
accountName
|
path |
True
|
string
|
Nome da conta de banco de dados do Cosmos DB.
Regex pattern: ^[a-z0-9]+(-[a-z0-9]+)*
|
privateEndpointConnectionName
|
path |
True
|
string
|
O nome da conexão de ponto de extremidade privado.
|
resourceGroupName
|
path |
True
|
string
|
O nome do grupo de recursos. O nome diferencia maiúsculas de minúsculas.
|
subscriptionId
|
path |
True
|
string
|
A ID da assinatura de destino.
|
api-version
|
query |
True
|
string
|
A versão da API a ser usada para esta operação.
|
Respostas
Nome |
Tipo |
Description |
202 Accepted
|
|
Aceita. A exclusão da conexão de ponto de extremidade privado será concluída de forma assíncrona.
|
204 No Content
|
|
A conexão de ponto de extremidade privado não existe.
|
Other Status Codes
|
ErrorResponse
|
Resposta de erro que descreve por que a operação falhou.
|
Segurança
azure_auth
Fluxo do OAuth2 do Azure Active Directory
Type:
oauth2
Flow:
implicit
Authorization URL:
https://login.microsoftonline.com/common/oauth2/authorize
Scopes
Nome |
Description |
user_impersonation
|
Representar sua conta de usuário
|
Exemplos
Deletes a private endpoint connection with a given name.
Sample Request
DELETE https://management.azure.com/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/rg1/providers/Microsoft.DocumentDB/databaseAccounts/ddb1/privateEndpointConnections/privateEndpointConnectionName?api-version=2023-11-15
from azure.identity import DefaultAzureCredential
from azure.mgmt.cosmosdb import CosmosDBManagementClient
"""
# PREREQUISITES
pip install azure-identity
pip install azure-mgmt-cosmosdb
# USAGE
python cosmos_db_private_endpoint_connection_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 = CosmosDBManagementClient(
credential=DefaultAzureCredential(),
subscription_id="00000000-1111-2222-3333-444444444444",
)
client.private_endpoint_connections.begin_delete(
resource_group_name="rg1",
account_name="ddb1",
private_endpoint_connection_name="privateEndpointConnectionName",
).result()
# x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2023-11-15/examples/CosmosDBPrivateEndpointConnectionDelete.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 armcosmos_test
import (
"context"
"log"
"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cosmos/armcosmos/v2"
)
// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/41e4538ed7bb3ceac3c1322c9455a0812ed110ac/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2023-11-15/examples/CosmosDBPrivateEndpointConnectionDelete.json
func ExamplePrivateEndpointConnectionsClient_BeginDelete() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armcosmos.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
log.Fatalf("failed to create client: %v", err)
}
poller, err := clientFactory.NewPrivateEndpointConnectionsClient().BeginDelete(ctx, "rg1", "ddb1", "privateEndpointConnectionName", 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 { CosmosDBManagementClient } = require("@azure/arm-cosmosdb");
const { DefaultAzureCredential } = require("@azure/identity");
/**
* This sample demonstrates how to Deletes a private endpoint connection with a given name.
*
* @summary Deletes a private endpoint connection with a given name.
* x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2023-11-15/examples/CosmosDBPrivateEndpointConnectionDelete.json
*/
async function deletesAPrivateEndpointConnectionWithAGivenName() {
const subscriptionId =
process.env["COSMOSDB_SUBSCRIPTION_ID"] || "00000000-1111-2222-3333-444444444444";
const resourceGroupName = process.env["COSMOSDB_RESOURCE_GROUP"] || "rg1";
const accountName = "ddb1";
const privateEndpointConnectionName = "privateEndpointConnectionName";
const credential = new DefaultAzureCredential();
const client = new CosmosDBManagementClient(credential, subscriptionId);
const result = await client.privateEndpointConnections.beginDeleteAndWait(
resourceGroupName,
accountName,
privateEndpointConnectionName,
);
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://centraluseuap.management.azure.com/subscriptions/d1eb41bc-1b7f-4404-bd2a-8568c222852d/providers/Microsoft.DocumentDB/locations/centraluseuap/operationsStatus/fdd04b7b-86d5-460f-b19e-386230348bcc?api-version=2023-11-15
Azure-AsyncOperation: https://centraluseuap.management.azure.com/subscriptions/d1eb41bc-1b7f-4404-bd2a-8568c222852d/providers/Microsoft.DocumentDB/locations/centraluseuap/operationsStatus/fdd04b7b-86d5-460f-b19e-386230348bcc?api-version=2023-11-15
Definições
ErrorResponse
Resposta de erro.
Nome |
Tipo |
Description |
code
|
string
|
Código do erro.
|
message
|
string
|
Mensagem de erro indicando por que a operação falhou.
|