Compartilhar via


MongoDBRoleDefinitionCollection.GetIfExists(String, CancellationToken) Método

Definição

Tenta obter detalhes desse recurso do serviço.

  • Caminho da Solicitação/assinaturas/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/mongodbRoleDefinitions/{mongoRoleDefinitionId}
  • IdMongoDBResources_GetMongoRoleDefinition de operação
public virtual Azure.NullableResponse<Azure.ResourceManager.CosmosDB.MongoDBRoleDefinitionResource> GetIfExists (string mongoRoleDefinitionId, System.Threading.CancellationToken cancellationToken = default);
abstract member GetIfExists : string * System.Threading.CancellationToken -> Azure.NullableResponse<Azure.ResourceManager.CosmosDB.MongoDBRoleDefinitionResource>
override this.GetIfExists : string * System.Threading.CancellationToken -> Azure.NullableResponse<Azure.ResourceManager.CosmosDB.MongoDBRoleDefinitionResource>
Public Overridable Function GetIfExists (mongoRoleDefinitionId As String, Optional cancellationToken As CancellationToken = Nothing) As NullableResponse(Of MongoDBRoleDefinitionResource)

Parâmetros

mongoRoleDefinitionId
String

A ID da Definição de Função {dbName.roleName}.

cancellationToken
CancellationToken

O token de cancelamento a ser usado.

Retornos

Exceções

mongoRoleDefinitionId é uma cadeia de caracteres vazia e era esperado que não estivesse vazio.

mongoRoleDefinitionId é nulo.

Aplica-se a