Edit

Share via


Get-AzCosmosDBMongoDBRestorableResource

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

Syntax

ByNameParameterSet (Default)

Get-AzCosmosDBMongoDBRestorableResource
    -Location <String>
    -DatabaseAccountInstanceId <String>
    -RestoreTimestampInUtc <DateTime>
    -RestoreLocation <String>
    [-DefaultProfile <IAzureContextContainer>]
    [<CommonParameters>]

ByParentObjectParameterSet

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

Description

Lists all the restorable Azure Cosmos DB MongoDB 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/collections.

Examples

Example 1

Get-AzCosmosDBMongoDBRestorableResource -Location "location" -DatabaseAccountInstanceId "DatabaseInstanceId" -RestoreLocation "Database" -RestoreTimestampInUtc $RestoreTimestamp
DatabaseName CollectionNames
------------ ---------------
{DBName}     {Collection names}

Returns the list of all restorable Azure Cosmos DB MongoDB 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).

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-DefaultProfile

The credentials, account, tenant, and subscription used for communication with Azure.

Parameter properties

Type:IAzureContextContainer
Default value:None
Supports wildcards:False
DontShow:False
Aliases:AzContext, AzureRmContext, AzureCredential

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-InputObject

CosmosDB Restorable Database Account object

Parameter properties

Type:PSRestorableDatabaseAccountGetResult
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

ByParentObjectParameterSet
Position:Named
Mandatory:True
Value from pipeline:True
Value from pipeline by property name:False
Value from remaining arguments:False

-Location

Name of the Location in string.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-RestoreLocation

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

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-RestoreTimestampInUtc

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

Parameter properties

Type:DateTime
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

CommonParameters

This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, -ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.

Inputs

None

Outputs

PSDatabaseToRestore