MockableCosmosDBResourceGroupResource.RestoreAsync Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Restores a soft-deleted Azure Cosmos DB database account.
- Request Path. : /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/locations/{location}/softDeletedDatabaseAccounts/{accountName}?softDeleteActionKind=RestoreSoftDeletedResource.
- Operation Id. : SoftDeletedDatabaseAccounts_Restore.
- Default Api Version. : 2026-04-01-preview.
public virtual System.Threading.Tasks.Task<Azure.ResourceManager.ArmOperation> RestoreAsync(Azure.WaitUntil waitUntil, Azure.Core.AzureLocation location, string accountName, Azure.ResourceManager.CosmosDB.Models.SoftDeleteActionKind? softDeleteActionKind = default, System.Threading.CancellationToken cancellationToken = default);
abstract member RestoreAsync : Azure.WaitUntil * Azure.Core.AzureLocation * string * Nullable<Azure.ResourceManager.CosmosDB.Models.SoftDeleteActionKind> * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.ResourceManager.ArmOperation>
override this.RestoreAsync : Azure.WaitUntil * Azure.Core.AzureLocation * string * Nullable<Azure.ResourceManager.CosmosDB.Models.SoftDeleteActionKind> * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.ResourceManager.ArmOperation>
Public Overridable Function RestoreAsync (waitUntil As WaitUntil, location As AzureLocation, accountName As String, Optional softDeleteActionKind As Nullable(Of SoftDeleteActionKind) = Nothing, Optional cancellationToken As CancellationToken = Nothing) As Task(Of ArmOperation)
Parameters
- waitUntil
- WaitUntil
Completed if the method should wait to return until the long-running operation has completed on the service; Started if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples.
- location
- AzureLocation
The name of the Azure region.
- accountName
- String
Cosmos DB database account name.
- softDeleteActionKind
- Nullable<SoftDeleteActionKind>
The kind of soft delete action to perform.
- cancellationToken
- CancellationToken
The cancellation token to use.
Returns
Exceptions
accountName is null.
accountName is an empty string, and was expected to be non-empty.