Compartilhar via


CosmosDBSqlContainerCollection.GetIfExistsAsync Método

Definição

Tenta obter detalhes para esse recurso do serviço.

  • Caminho da Solicitação/assinaturas/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlDatabases/{databaseName}/containers/{containerName}
  • Operação IdSqlResources_GetSqlContainer
public virtual System.Threading.Tasks.Task<Azure.NullableResponse<Azure.ResourceManager.CosmosDB.CosmosDBSqlContainerResource>> GetIfExistsAsync (string containerName, System.Threading.CancellationToken cancellationToken = default);
abstract member GetIfExistsAsync : string * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.NullableResponse<Azure.ResourceManager.CosmosDB.CosmosDBSqlContainerResource>>
override this.GetIfExistsAsync : string * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.NullableResponse<Azure.ResourceManager.CosmosDB.CosmosDBSqlContainerResource>>
Public Overridable Function GetIfExistsAsync (containerName As String, Optional cancellationToken As CancellationToken = Nothing) As Task(Of NullableResponse(Of CosmosDBSqlContainerResource))

Parâmetros

containerName
String

Nome do contêiner do Cosmos DB.

cancellationToken
CancellationToken

O token de cancelamento a ser usado.

Retornos

Exceções

containerName é uma cadeia de caracteres vazia e esperava-se que não estivesse vazia.

containerName é nulo.

Aplica-se a