你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn。
Restorable Mongodb Databases - List
Show the event feed of all mutations done on all the Azure Cosmos DB MongoDB databases under the restorable account. This helps in scenario where database was accidentally deleted to get the deletion time. This API requires 'Microsoft.DocumentDB/locations/restorableDatabaseAccounts/.../read' permission
GET https://management.azure.com/subscriptions/{subscriptionId}/providers/Microsoft.DocumentDB/locations/{location}/restorableDatabaseAccounts/{instanceId}/restorableMongodbDatabases?api-version=2024-08-15
URI Parameters
Name | In | Required | Type | Description |
---|---|---|---|---|
instance
|
path | True |
string |
The instanceId GUID of a restorable database account. |
location
|
path | True |
string |
Cosmos DB region, with spaces between words and each word capitalized. |
subscription
|
path | True |
string |
The ID of the target subscription. |
api-version
|
query | True |
string |
The API version to use for this operation. |
Responses
Name | Type | Description |
---|---|---|
200 OK |
The operation completed successfully. |
|
Other Status Codes |
Error response describing why the operation failed. |
Security
azure_auth
Azure Active Directory OAuth2 Flow
Type:
oauth2
Flow:
implicit
Authorization URL:
https://login.microsoftonline.com/common/oauth2/authorize
Scopes
Name | Description |
---|---|
user_impersonation | Impersonate your user account |
Examples
CosmosDBRestorableMongodbDatabaseList
Sample request
GET https://management.azure.com/subscriptions/2296c272-5d55-40d9-bc05-4d56dc2d7588/providers/Microsoft.DocumentDB/locations/WestUS/restorableDatabaseAccounts/d9b26648-2f53-4541-b3d8-3044f4f9810d/restorableMongodbDatabases?api-version=2024-08-15
Sample response
{
"value": [
{
"id": "/subscriptions/2296c272-5d55-40d9-bc05-4d56dc2d7588/providers/Microsoft.DocumentDb/locations/westus/restorableDatabaseAccounts/36f09704-6be3-4f33-aa05-17b73e504c75/restorableMongodbDatabases/59c21367-b98b-4a8e-abb7-b6f46600decc",
"type": "Microsoft.DocumentDB/locations/restorableDatabaseAccounts/restorableMongodbDatabases",
"name": "59c21367-b98b-4a8e-abb7-b6f46600decc",
"properties": {
"resource": {
"_rid": "DLB14gAAAA==",
"eventTimestamp": "2020-09-02T19:45:03Z",
"ownerId": "Database1",
"ownerResourceId": "PD5DALigDgw=",
"operationType": "Create",
"canUndelete": "invalid"
}
}
},
{
"id": "/subscriptions/2296c272-5d55-40d9-bc05-4d56dc2d7588/providers/Microsoft.DocumentDb/locations/westus/restorableDatabaseAccounts/d9b26648-2f53-4541-b3d8-3044f4f9810d/restorableMongodbDatabases/8456cb17-cdb0-4c6a-8db8-d0ff3f886257",
"type": "Microsoft.DocumentDB/locations/restorableDatabaseAccounts/restorableMongodbDatabases",
"name": "8456cb17-cdb0-4c6a-8db8-d0ff3f886257",
"properties": {
"resource": {
"_rid": "ESXNLAAAAA==",
"eventTimestamp": "2020-09-02T19:53:42Z",
"ownerId": "Database1",
"ownerResourceId": "PD5DALigDgw=",
"operationType": "Delete",
"canUndelete": "notRestorable",
"canUndeleteReason": "Database already exists. Only deleted resources can be restored within same account."
}
}
}
]
}
Definitions
Name | Description |
---|---|
Cloud |
An error response from the service. |
Error |
Error Response. |
Operation |
Enum to indicate the operation type of the event. |
Resource |
The resource of an Azure Cosmos DB MongoDB database event |
Restorable |
An Azure Cosmos DB MongoDB database event |
Restorable |
The List operation response, that contains the MongoDB database events and their properties. |
CloudError
An error response from the service.
Name | Type | Description |
---|---|---|
error |
Error Response. |
ErrorResponse
Error Response.
Name | Type | Description |
---|---|---|
code |
string |
Error code. |
message |
string |
Error message indicating why the operation failed. |
OperationType
Enum to indicate the operation type of the event.
Name | Type | Description |
---|---|---|
Create |
string |
|
Delete |
string |
|
Recreate |
string |
|
Replace |
string |
|
SystemOperation |
string |
Resource
The resource of an Azure Cosmos DB MongoDB database event
Name | Type | Description |
---|---|---|
_rid |
string |
A system generated property. A unique identifier. |
canUndelete |
string |
A state of this database to identify if this database is restorable in same account. |
canUndeleteReason |
string |
The reason why this database can not be restored in same account. |
eventTimestamp |
string |
The time when this database event happened. |
operationType |
The operation type of this database event. |
|
ownerId |
string |
The name of this MongoDB database. |
ownerResourceId |
string |
The resource ID of this MongoDB database. |
RestorableMongodbDatabaseGetResult
An Azure Cosmos DB MongoDB database event
Name | Type | Description |
---|---|---|
id |
string |
The unique resource Identifier of the ARM resource. |
name |
string |
The name of the ARM resource. |
properties.resource |
The resource of an Azure Cosmos DB MongoDB database event |
|
type |
string |
The type of Azure resource. |
RestorableMongodbDatabasesListResult
The List operation response, that contains the MongoDB database events and their properties.
Name | Type | Description |
---|---|---|
value |
List of MongoDB database events and their properties. |