mirror of https://github.com/dapr/docs.git
1.4 KiB
1.4 KiB
| type | title | linkTitle | description |
|---|---|---|---|
| docs | Azure CosmosDB binding spec | Azure CosmosDB | Detailed documentation on the Azure CosmosDB binding component |
Setup Dapr component
apiVersion: dapr.io/v1alpha1
kind: Component
metadata:
name: <NAME>
namespace: <NAMESPACE>
spec:
type: bindings.azure.cosmosdb
version: v1
metadata:
- name: url
value: https://******.documents.azure.com:443/
- name: masterKey
value: *****
- name: database
value: db
- name: collection
value: collection
- name: partitionKey
value: message
urlis the CosmosDB url.masterKeyis the CosmosDB account master key.databaseis the name of the CosmosDB database.collectionis name of the collection inside the database.partitionKeyis the name of the partitionKey to extract from the payload.
{{% alert title="Warning" color="warning" %}} The above example uses secrets as plain strings. It is recommended to use a secret store for the secrets as described [here]({{< ref component-secrets.md >}}). {{% /alert %}}
Output Binding Supported Operations
- create
Related links
- [Bindings building block]({{< ref bindings >}})
- [How-To: Trigger application with input binding]({{< ref howto-triggers.md >}})
- [How-To: Use bindings to interface with external resources]({{< ref howto-bindings.md >}})
- [Bindings API reference]({{< ref bindings_api.md >}})