Azure Cosmos DB (Gremlin API) binding spec

Detailed documentation on the Azure Cosmos DB (Gremlin API) binding component

Component format

To setup an Azure Cosmos DB (Gremlin API) binding create a component of type bindings.azure.cosmosdb.gremlinapi. See this guide on how to create and apply a binding configuration.

  1. apiVersion: dapr.io/v1alpha1
  2. kind: Component
  3. metadata:
  4. name: <NAME>
  5. spec:
  6. type: bindings.azure.cosmosdb.gremlinapi
  7. version: v1
  8. metadata:
  9. - name: url
  10. value: wss://******.gremlin.cosmos.azure.com:443/
  11. - name: masterKey
  12. value: *****
  13. - name: username
  14. value: *****

Warning

The above example uses secrets as plain strings. It is recommended to use a secret store for the secrets as described here.

Spec metadata fields

FieldRequiredBinding supportDetailsExample
urlYOutputThe Cosmos DB url for Gremlin APIs“wss://**.gremlin.cosmos.azure.com:443/“
masterKeyYOutputThe Cosmos DB account master key“masterKey”
usernameYOutputThe username of the Cosmos DB database“/dbs/<database_name>/colls/<graph_name>”

For more information see Quickstart: Azure Cosmos Graph DB using Gremlin.

Binding support

This component supports output binding with the following operations:

  • query

Request payload sample

  1. {
  2. "data": {
  3. "gremlin": "g.V().count()"
  4. },
  5. "operation": "query"
  6. }

Last modified June 19, 2023: Merge pull request #3565 from dapr/aacrawfi/skip-secrets-close (b1763bf)