Skip to main content

restorable_mongodb_resources

Creates, updates, deletes, gets or lists a restorable_mongodb_resources resource.

Overview​

Namerestorable_mongodb_resources
TypeResource
Idazure.cosmosdb.restorable_mongodb_resources

Fields​

The following fields are returned by SELECT queries:

NameDatatypeDescription
idstringThe unique resource identifier of the ARM resource.
namestringThe name of the ARM resource.
collectionNamesarrayThe names of the collections available for restore.
databaseNamestringThe name of the database available for restore.
typestringThe type of Azure resource.

Methods​

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
listselectlocation, instance_id, subscription_idrestoreLocation, restoreTimestampInUtcReturn a list of database and collection combo that exist on the account at the given timestamp and location. This helps in scenarios to validate what resources exist at given timestamp and location. This API requires 'Microsoft.DocumentDB/locations/restorableDatabaseAccounts/.../read' permission.

Parameters​

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
instance_idstringThe instanceId GUID of a restorable database account. Required.
locationstringCosmos DB region, with spaces between words and each word capitalized. Required.
subscription_idstring
restoreLocationstringThe location where the restorable resources are located. Default value is None.
restoreTimestampInUtcstringThe timestamp when the restorable resources existed. Default value is None.

SELECT examples​

Return a list of database and collection combo that exist on the account at the given timestamp and location. This helps in scenarios to validate what resources exist at given timestamp and location. This API requires 'Microsoft.DocumentDB/locations/restorableDatabaseAccounts/.../read' permission.

SELECT
id,
name,
collectionNames,
databaseName,
type
FROM azure.cosmosdb.restorable_mongodb_resources
WHERE location = '{{ location }}' -- required
AND instance_id = '{{ instance_id }}' -- required
AND subscription_id = '{{ subscription_id }}' -- required
AND restoreLocation = '{{ restoreLocation }}'
AND restoreTimestampInUtc = '{{ restoreTimestampInUtc }}'
;