Language

SoftDeletedDatabaseAccountGetResultCollection.GetIfExistsAsync Method

Definition

Tries to get details for this resource from the service.

  • Request Path. : /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/locations/{location}/softDeletedDatabaseAccounts/{accountName}.
  • Operation Id. : SoftDeletedDatabaseAccounts_Get.
  • Default Api Version. : 2026-04-01-preview.
public virtual System.Threading.Tasks.Task<Azure.NullableResponse<Azure.ResourceManager.CosmosDB.SoftDeletedDatabaseAccountGetResultResource>> GetIfExistsAsync(Azure.Core.AzureLocation location, string accountName, System.Threading.CancellationToken cancellationToken = default);
abstract member GetIfExistsAsync : Azure.Core.AzureLocation * string * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.NullableResponse<Azure.ResourceManager.CosmosDB.SoftDeletedDatabaseAccountGetResultResource>>
override this.GetIfExistsAsync : Azure.Core.AzureLocation * string * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.NullableResponse<Azure.ResourceManager.CosmosDB.SoftDeletedDatabaseAccountGetResultResource>>
Public Overridable Function GetIfExistsAsync (location As AzureLocation, accountName As String, Optional cancellationToken As CancellationToken = Nothing) As Task(Of NullableResponse(Of SoftDeletedDatabaseAccountGetResultResource))

Parameters

location
AzureLocation

The name of the Azure region.

accountName
String

Cosmos DB database account name.

cancellationToken
CancellationToken

The cancellation token to use.

Returns

Exceptions

accountName is null.

accountName is an empty string, and was expected to be non-empty.

Applies to