Cosmos DB icon

Cosmos DB

Cosmos DB Node - Upsert documents to Azure Cosmos DB

Database → Delete

AI-generated

Summary

Delete a database from the Azure Cosmos DB account by specifying its name or ID, using supported authentication methods.

Inputs

  • Authentication Type (required) — Select the authentication method to connect to Cosmos DB: either Master Key or Microsoft Entra ID (Azure AD).
  • Database Name or ID (required) — Choose the database to delete from a dynamically loaded list based on the selected authentication or specify a database ID using an expression.
  • Use Dev Override (Custom Endpoint + Token) — Optionally bypass OAuth and specify a custom Cosmos DB endpoint and bearer token manually, useful for development environments where OAuth is unavailable.
  • Custom Endpoint — Specify the custom Cosmos DB account endpoint URL if using the Dev Override option.
  • Custom Access Token — Provide a bearer token scoped to the Cosmos DB service if using the Dev Override option.

Output shape

A single JSON object per input item indicating the deletion status with fields: database ID, status code, and a boolean flag 'deleted' indicating success.

The operation requires the database name or ID. If deletion succeeds, the output includes statusCode and deleted=true. If it fails, an error is thrown unless the node is set to continue on failure, in which case the error message is returned as part of the output. No pagination or multiple results as deletion is per database specified.

Examples

Example 1: Deleting a Database

Select 'Database' as the resource and 'Delete' as the operation. Authenticate with Master Key or Microsoft Entra ID. Choose the database from the dropdown list or set the database ID dynamically. Optionally set Dev Override credentials for custom endpoint and token. On execution, the specified database will be deleted from the Cosmos DB account, and the node outputs a success confirmation with status code.

Links

Discussion