Edit

Share via


Get-AzCosmosDBTableRestorableTable

Lists all the restorable Azure Cosmos DB Tables available for a specific database.

Syntax

ByNameParameterSet (Default)

Get-AzCosmosDBTableRestorableTable
    -Location <String>
    -DatabaseAccountInstanceId <String>
    [-StartTime <String>]
    [-EndTime <String>]
    [-DefaultProfile <IAzureContextContainer>]
    [<CommonParameters>]

ByParentObjectParameterSet

Get-AzCosmosDBTableRestorableTable
    -InputObject <PSRestorableTableGetResult>
    [-DefaultProfile <IAzureContextContainer>]
    [<CommonParameters>]

Description

Lists all the restorable Azure Cosmos DB Tables available for a specific database account. The list would have entries corresponding to create, replace and delete events of all live and deleted tables under a specific database account. This list is useful to identify the restore timestamp based on the changes in the collection. For example, if user wants to restore the database account to a timestamp when a specific table is deleted, the user can find corresponding table delete event from this list, and choose a timestamp before the delete event for restore.

Examples

Example 1

Get-AzCosmosDBTableRestorableTable -Location "location" -DatabaseAccountInstanceId "DatabaseAccountInstanceId" -StartTime "StartTime" -EndTime "EndTime"
Id              : /subscriptions/23587e98-b6ac-4328-a753-03bcd3c8e744/providers/Microsoft.DocumentDB/locations/East%20US2%20EUAP/restorableDatabaseAccounts/45221949-3b3b-457a-b23c-2562858de5a8/restorab
                  leTables/768c880d-082a-4414-9095-33eb612de58e
Name            : 768c880d-082a-4414-9095-33eb612de58e
Type            : Microsoft.DocumentDB/locations/restorableDatabaseAccounts/restorableTables
_rid            : QEE+IAAAAA==
OperationType   : Create
EventTimestamp  : 01/27/2022 02:08:02
OwnerId         : table1
OwnerResourceId : F45qAKUxkWc=

Id              : /subscriptions/23587e98-b6ac-4328-a753-03bcd3c8e744/providers/Microsoft.DocumentDB/locations/East%20US2%20EUAP/restorableDatabaseAccounts/45221949-3b3b-457a-b23c-2562858de5a8/restorab
                  leTables/6af230dc-dd95-4a36-97b9-5c7071d40fef
Name            : 6af230dc-dd95-4a36-97b9-5c7071d40fef
Type            : Microsoft.DocumentDB/locations/restorableDatabaseAccounts/restorableTables
_rid            : s74kawAAAA==
OperationType   : Create
EventTimestamp  : 01/27/2022 02:08:34
OwnerId         : table2
OwnerResourceId : F45qAJxEhOM=

The resource object contains the properties of the table resource.

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

ByNameParameterSet
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

-EndTime

Restorable Tables event feed end time.

Parameter properties

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

Parameter sets

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

-InputObject

CosmosDB Restorable Table object.

Parameter properties

Type:PSRestorableTableGetResult
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

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

-StartTime

Restorable Tables event feed start time.

Parameter properties

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

Parameter sets

ByNameParameterSet
Position:Named
Mandatory:False
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

PSRestorableTableGetResult

Outputs

PSRestorableTableGetResult