Azure CosmosDB binding spec

Detailed documentation on the Azure CosmosDB binding component

Setup Dapr component

  1. apiVersion: dapr.io/v1alpha1
  2. kind: Component
  3. metadata:
  4. name: <NAME>
  5. namespace: <NAMESPACE>
  6. spec:
  7. type: bindings.azure.cosmosdb
  8. version: v1
  9. metadata:
  10. - name: url
  11. value: https://******.documents.azure.com:443/
  12. - name: masterKey
  13. value: *****
  14. - name: database
  15. value: db
  16. - name: collection
  17. value: collection
  18. - name: partitionKey
  19. value: message
  • url is the CosmosDB url.
  • masterKey is the CosmosDB account master key.
  • database is the name of the CosmosDB database.
  • collection is name of the collection inside the database.
  • partitionKey is the name of the partitionKey to extract from the payload.

Warning

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

Output Binding Supported Operations

  • create

Related links

Last modified February 16, 2021: Merge pull request #1235 from dapr/update-v0.11 (b4e9fbb)