Upravit

Sdílet prostřednictvím


Get-AzCosmosDBSqlRestorableResource

Lists all the restorable Azure Cosmos DB SQL resources available for a specific database account at a given time and location.

Syntax

Get-AzCosmosDBSqlRestorableResource
   -Location <String>
   -DatabaseAccountInstanceId <String>
   -RestoreTimestampInUtc <DateTime>
   -RestoreLocation <String>
   [-DefaultProfile <IAzureContextContainer>]
   [<CommonParameters>]
Get-AzCosmosDBSqlRestorableResource
   -Location <String>
   -DatabaseAccountInstanceId <String>
   -RestoreTimestampInUtc <DateTime>
   -RestoreLocation <String>
   -InputObject <PSRestorableDatabaseAccountGetResult>
   [-DefaultProfile <IAzureContextContainer>]
   [<CommonParameters>]

Description

Lists all the restorable Azure Cosmos DB SQL resources available for a specific database account at a given time and location. The list is useful to know what resources exist in the source account at the given time. This will provide the user an indication of what to expect if the account is restored to the given time. The user can also use this list and provide a subset of restorable resources if the user wants to restore only specific databases/containers.

Examples

Example 1

Get-AzCosmosDBSqlRestorableResource -Location "location" -DatabaseAccountInstanceId "DatabaseInstanceId" -RestoreLocation "Database" -RestoreTimestampInUtc $RestoreTimestamp

DatabaseName CollectionNames
------------ ---------------
{DBName}     {Collection names}

Returns the list of all restorable Azure Cosmos DB SQL resources available for a specific database account at a given time and location.

Parameters

-DatabaseAccountInstanceId

The instance Id of the CosmosDB database account. (This is returned as a part of database account properties).

Type:String
Position:Named
Default value:None
Required:True
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

-InputObject

CosmosDB Restorable Database Account object

Type:PSRestorableDatabaseAccountGetResult
Position:Named
Default value:None
Required:True
Accept pipeline input:True
Accept wildcard characters:False

-Location

Name of the Location in string.

Type:String
Position:Named
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False

-RestoreLocation

The location of the source account from which restore is triggered. This will also be the write region of the restored account

Type:String
Position:Named
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False

-RestoreTimestampInUtc

The timestamp to which the source account has to be restored to.

Type:DateTime
Position:Named
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False

Inputs

None

Outputs

PSDatabaseToRestore