Skip to main content

restorable_mongodb_collections

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

Overview

Namerestorable_mongodb_collections
TypeResource
Idazure.cosmosdb.restorable_mongodb_collections

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
idstringThe unique resource Identifier of the ARM resource.
namestringThe name of the ARM resource.
resourceobjectThe resource of an Azure Cosmos DB MongoDB collection event.
typestringThe type of Azure resource.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
listselectlocation, instance_id, subscription_idrestorableMongodbDatabaseRid, startTime, endTimeShow the event feed of all mutations done on all the Azure Cosmos DB MongoDB collections under a specific database. This helps in scenario where container was accidentally deleted. 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
endTimestringRestorable MongoDB collections event feed end time. Default value is None.
restorableMongodbDatabaseRidstringThe resource ID of the MongoDB database. Default value is None.
startTimestringRestorable MongoDB collections event feed start time. Default value is None.

SELECT examples

Show the event feed of all mutations done on all the Azure Cosmos DB MongoDB collections under a specific database. This helps in scenario where container was accidentally deleted. This API requires 'Microsoft.DocumentDB/locations/restorableDatabaseAccounts/.../read' permission.

SELECT
id,
name,
resource,
type
FROM azure.cosmosdb.restorable_mongodb_collections
WHERE location = '{{ location }}' -- required
AND instance_id = '{{ instance_id }}' -- required
AND subscription_id = '{{ subscription_id }}' -- required
AND restorableMongodbDatabaseRid = '{{ restorableMongodbDatabaseRid }}'
AND startTime = '{{ startTime }}'
AND endTime = '{{ endTime }}'
;