Get-AzCosmosDBRestorableDatabaseAccount
Gets the restorable database account object
Syntax
Get-AzCosmosDBRestorableDatabaseAccount
[-Location <String>]
[-DatabaseAccountInstanceId <String>]
[-DatabaseAccountName <String>]
[-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]
Description
Gets the list of all restorable database account objects in the given account, or a specific restorable database account object with the given instanceId and location
Examples
Example 1
Get-AzCosmosDBRestorableDatabaseAccount
Id : /subscriptions/{subscriptionId}/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/fb8f230e-bab0-452b-81cf-e32643ccc898
DatabaseAccountInstanceId : fb8f230e-bab0-452b-81cf-e32643ccc898
Location : West US
DatabaseAccountName : deleted-account-1
CreationTime : 8/2/2020 10:23:00 PM
DeletionTime : 8/2/2020 10:26:13 PM
OldestRestorableTime : 8/2/2020 10:23:00 PM
ApiType : Sql
RestorableLocations : {West US, East US}
Id : /subscriptions/{subscriptionId}/providers/Microsoft.DocumentDB/locations/eastus/restorableDatabaseAccounts/ff921125-e31c-4e8c-ae0a-20fe719baca6
DatabaseAccountInstanceId : ff921125-e31c-4e8c-ae0a-20fe719baca6
Location : East US
DatabaseAccountName : deleted-account-2
CreationTime : 8/2/2020 6:32:32 PM
DeletionTime : 8/2/2020 6:34:48 PM
OldestRestorableTime : 8/2/2020 6:32:32 PM
ApiType : Sql
RestorableLocations : {Australia Southeast, East US, West US}
Id : /subscriptions/{subscriptionId}/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/c7b27ad9-3bc0-4955-8cc2-a81790e5c3b3
DatabaseAccountInstanceId : c7b27ad9-3bc0-4955-8cc2-a81790e5c3b3
Location : West US
DatabaseAccountName : live-account-1
CreationTime : 8/2/2020 6:34:35 PM
DeletionTime :
OldestRestorableTime : 8/2/2020 6:34:35 PM
ApiType : MongoDB
RestorableLocations : {West US}
Lists all the restorable database accounts in the current subscription
Example 1
Get-AzCosmosDBRestorableDatabaseAccount -Location "West US" -DatabaseAccountInstanceId fb8f230e-bab0-452b-81cf-e32643ccc898
Id : /subscriptions/{subscriptionId}/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/fb8f230e-bab0-452b-81cf-e32643ccc898
DatabaseAccountInstanceId : fb8f230e-bab0-452b-81cf-e32643ccc898
Location : West US
DatabaseAccountName : deleted-account-1
CreationTime : 8/2/2020 10:23:00 PM
DeletionTime : 8/2/2020 10:26:13 PM
OldestRestorableTime : 8/2/2020 10:23:00 PM
ApiType : Sql
RestorableLocations : {West US, East US}
Gets the restorable database account with the given DatabaseInstanceId in the given ARM location
Parameters
-DatabaseAccountInstanceId
The instance Id of the CosmosDB database account.
Type: | String |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-DatabaseAccountName
Name of the Cosmos DB database account.
Type: | String |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-DefaultProfile
The credentials, account, tenant, and subscription used for communication with Azure.
Type: | IAzureContextContainer |
Aliases: | AzContext, AzureRmContext, AzureCredential |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-Location
Name of the Location in string.
Type: | String |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Inputs
None
Outputs
Azure PowerShell