Restorable Sql Resources - List

Return a list of database and container 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.

GET https://management.azure.com/subscriptions/{subscriptionId}/providers/Microsoft.DocumentDB/locations/{location}/restorableDatabaseAccounts/{instanceId}/restorableSqlResources?api-version=2024-08-15
GET https://management.azure.com/subscriptions/{subscriptionId}/providers/Microsoft.DocumentDB/locations/{location}/restorableDatabaseAccounts/{instanceId}/restorableSqlResources?api-version=2024-08-15&restoreLocation={restoreLocation}&restoreTimestampInUtc={restoreTimestampInUtc}

URI Parameters

Name In Required Type Description
instanceId
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.

subscriptionId
path True

string

The ID of the target subscription.

api-version
query True

string

The API version to use for this operation.

restoreLocation
query

string

The location where the restorable resources are located.

restoreTimestampInUtc
query

string

The timestamp when the restorable resources existed.

Responses

Name Type Description
200 OK

RestorableSqlResourcesListResult

The operation completed successfully.

Other Status Codes

CloudError

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

CosmosDBRestorableSqlResourceList

Sample request

GET https://management.azure.com/subscriptions/2296c272-5d55-40d9-bc05-4d56dc2d7588/providers/Microsoft.DocumentDB/locations/WestUS/restorableDatabaseAccounts/d9b26648-2f53-4541-b3d8-3044f4f9810d/restorableSqlResources?api-version=2024-08-15&restoreLocation=WestUS&restoreTimestampInUtc=06/01/2022 4:56

Sample response

{
  "value": [
    {
      "id": "/subscriptions/2296c272-5d55-40d9-bc05-4d56dc2d7588/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/d9b26648-2f53-4541-b3d8-3044f4f9810d/restorablesqlresources/Database1",
      "type": "Microsoft.DocumentDB/locations/restorableDatabaseAccounts/restorablesqlresources",
      "name": "Database1",
      "databaseName": "Database1",
      "collectionNames": [
        "Container1"
      ]
    },
    {
      "id": "/subscriptions/2296c272-5d55-40d9-bc05-4d56dc2d7588/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/d9b26648-2f53-4541-b3d8-3044f4f9810d/restorablesqlresources/Database2",
      "type": "Microsoft.DocumentDB/locations/restorableDatabaseAccounts/restorablesqlresources",
      "name": "Database2",
      "databaseName": "Database2",
      "collectionNames": [
        "Container1",
        "Container2"
      ]
    },
    {
      "id": "/subscriptions/2296c272-5d55-40d9-bc05-4d56dc2d7588/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/d9b26648-2f53-4541-b3d8-3044f4f9810d/restorablesqlresources/Database3",
      "type": "Microsoft.DocumentDB/locations/restorableDatabaseAccounts/restorablesqlresources",
      "name": "Database3",
      "databaseName": "Database3",
      "collectionNames": []
    }
  ]
}

Definitions

Name Description
CloudError

An error response from the service.

ErrorResponse

Error Response.

RestorableSqlResourcesGetResult

Specific Databases to restore.

RestorableSqlResourcesListResult

The List operation response, that contains the restorable SQL resources.

CloudError

An error response from the service.

Name Type Description
error

ErrorResponse

Error Response.

ErrorResponse

Error Response.

Name Type Description
code

string

Error code.

message

string

Error message indicating why the operation failed.

RestorableSqlResourcesGetResult

Specific Databases to restore.

Name Type Description
collectionNames

string[]

The names of the collections available for restore.

databaseName

string

The name of the database available for restore.

id

string

The unique resource identifier of the ARM resource.

name

string

The name of the ARM resource.

type

string

The type of Azure resource.

RestorableSqlResourcesListResult

The List operation response, that contains the restorable SQL resources.

Name Type Description
value

RestorableSqlResourcesGetResult[]

List of restorable SQL resources, including the database and collection names.