Get-AzCosmosDBSqlRestorableContainer
Lists all the restorable Azure Cosmos DB SQL containers available for a specific database.
Syntax
ByNameParameterSet (Default)
Get-AzCosmosDBSqlRestorableContainer
-Location <String>
-DatabaseAccountInstanceId <String>
-DatabaseRId <String>
[-StartTime <String>]
[-EndTime <String>]
[-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]
ByParentObjectParameterSet
Get-AzCosmosDBSqlRestorableContainer
-InputObject <PSRestorableSqlDatabaseGetResult>
[-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]
Description
Lists all the restorable Azure Cosmos DB SQL containers available for a specific database.
The list would have entries corresponding to create, replace and delete events of all live and deleted containers under the database.
This list is useful to identify the restore timestamp based on the changes in the container.
For example, if user wants to restore the database account to a timestamp when a specific container is deleted, the user can find corresponding collection delete event from this list, and choose a timestamp before the delete event for restore.
Examples
Example 1
Get-AzCosmosDBSqlRestorableContainer -Location "location" -DatabaseAccountInstanceId "DatabaseAccountInstanceId" -DatabaseRId "DatabaseRId"
Id : /subscriptions/{subscriptionId}/providers/Microsoft.DocumentDB/locations/{location}/restorableDatabaseAccounts
/{DatabaseAccountInstanceId}/restorableSqlContainers/6a0cb3e4-7d2b-4363-b585-04a3b14ada8c
Name : 6a0cb3e4-7d2b-4363-b585-04a3b14ada8c
Type : Microsoft.DocumentDB/locations/restorableDatabaseAccounts/restorableSqlContainers
_rid : qsLuzwAAAA==
OperationType : Create
EventTimestamp : 01/20/2021 18:44:07
OwnerId : foo-container2
OwnerResourceId : Ts0YAPGKTvw=
Container : Microsoft.Azure.Management.CosmosDB.Models.PSRestorableSqlContainerPropertiesResourceContainer
Id : /subscriptions/{subscriptionId}/providers/Microsoft.DocumentDB/locations/{location}/restorableDatabaseAccounts
/{DatabaseAccountInstanceId}/restorableSqlContainers/ff36d1d3-f9dc-40a0-a003-60fe349abcfb
Name : ff36d1d3-f9dc-40a0-a003-60fe349abcfb
Type : Microsoft.DocumentDB/locations/restorableDatabaseAccounts/restorableSqlContainers
_rid : Ngu72QAAAA==
OperationType : Replace
EventTimestamp : 01/20/2021 18:44:07
OwnerId : foo-container1
OwnerResourceId : Ts0YAP+RbG0=
Container : Microsoft.Azure.Management.CosmosDB.Models.PSRestorableSqlContainerPropertiesResourceContainer
Id : /subscriptions/{subscriptionId}/providers/Microsoft.DocumentDB/locations/{location}/restorableDatabaseAccounts
/{DatabaseAccountInstanceId}/restorableSqlContainers/2afb35ba-1755-4fbc-85be-ae175dd0668f
Name : 2afb35ba-1755-4fbc-85be-ae175dd0668f
Type : Microsoft.DocumentDB/locations/restorableDatabaseAccounts/restorableSqlContainers
_rid : lSuf5gAAAA==
OperationType : Create
EventTimestamp : 01/20/2021 18:42:43
OwnerId : foo-container1
OwnerResourceId : Ts0YAP+RbG0=
Container : Microsoft.Azure.Management.CosmosDB.Models.PSRestorableSqlContainerPropertiesResourceContainer
The resource object contains the properties of the container 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
-DatabaseRId
ResourceId of the database.
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 Sql containers 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
CosmosDB Restorable Sql Database object
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 Sql containers 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 .
None
Outputs