diff --git a/daprdocs/content/en/developing-applications/building-blocks/bindings/bindings-overview.md b/daprdocs/content/en/developing-applications/building-blocks/bindings/bindings-overview.md index 1b691732e..1b071bd30 100644 --- a/daprdocs/content/en/developing-applications/building-blocks/bindings/bindings-overview.md +++ b/daprdocs/content/en/developing-applications/building-blocks/bindings/bindings-overview.md @@ -15,14 +15,18 @@ Using Dapr's bindings API, you can trigger your app with events coming in from e - Switch between bindings at runtime. - Build portable applications with environment-specific bindings set-up and no required code changes. -For example, with bindings, your microservice can respond to incoming Twilio/SMS messages without: +For example, with bindings, your application can respond to incoming Twilio/SMS messages without: - Adding or configuring a third-party Twilio SDK - Worrying about polling from Twilio (or using WebSockets, etc.) -{{% alert title="Note" color="primary" %}} +Diagram showing bindings + +In the above diagram: +- The input binding triggers a method on your application. +- Execute output binding operations on the component, such as `"create"`. + Bindings are developed independently of Dapr runtime. You can [view and contribute to the bindings](https://github.com/dapr/components-contrib/tree/master/bindings). -{{% /alert %}} {{% alert title="Note" color="primary" %}} If you are using the HTTP Binding, then it is preferable to use [service invocation]({{< ref service_invocation_api.md >}}) instead. Read [How-To: Invoke Non-Dapr Endpoints using HTTP]({{< ref "howto-invoke-non-dapr-endpoints.md" >}}) for more information. @@ -53,7 +57,12 @@ With output bindings, you can invoke external resources. An optional payload and To invoke an output binding: 1. Define the component YAML that describes the binding type and its metadata (connection info, etc.). -2. Use the HTTP endpoint or gRPC method to invoke the binding with an optional payload. +1. Use the HTTP endpoint or gRPC method to invoke the binding with an optional payload. +1. Specify an output operation. Output operations depend on the binding component you use, and can include: + - `"create"` + - `"update"` + - `"delete"` + - `"exec"` Read the [Use output bindings to interface with external resources guide]({{< ref howto-bindings.md >}}) to get started with output bindings. diff --git a/daprdocs/content/en/getting-started/quickstarts/bindings-quickstart.md b/daprdocs/content/en/getting-started/quickstarts/bindings-quickstart.md index bac891b5a..b818c4348 100644 --- a/daprdocs/content/en/getting-started/quickstarts/bindings-quickstart.md +++ b/daprdocs/content/en/getting-started/quickstarts/bindings-quickstart.md @@ -189,6 +189,8 @@ spec: metadata: - name: schedule value: "@every 10s" # valid cron schedule + - name: direction + value: "input" # direction of the cron binding ``` **Note:** The `metadata` section of `binding-cron.yaml` contains a [Cron expression]({{< ref cron.md >}}) that specifies how often the binding is invoked. @@ -216,6 +218,8 @@ spec: metadata: - name: url # Required value: "user=postgres password=docker host=localhost port=5432 dbname=orders pool_min_conns=1 pool_max_conns=10" + - name: direction + value: "output" # direction of the postgresql binding ``` In the YAML file: @@ -391,6 +395,8 @@ spec: metadata: - name: schedule value: "@every 10s" # valid cron schedule + - name: direction + value: "input" # direction of the cron binding ``` **Note:** The `metadata` section of `binding-cron.yaml` contains a [Cron expression]({{< ref cron.md >}}) that specifies how often the binding is invoked. @@ -418,6 +424,8 @@ spec: metadata: - name: url # Required value: "user=postgres password=docker host=localhost port=5432 dbname=orders pool_min_conns=1 pool_max_conns=10" + - name: direction + value: "output" # direction of the postgresql binding ``` In the YAML file: @@ -595,6 +603,8 @@ spec: metadata: - name: schedule value: "@every 10s" # valid cron schedule + - name: direction + value: "input" # direction of the cron binding ``` **Note:** The `metadata` section of `binding-cron.yaml` contains a [Cron expression]({{< ref cron.md >}}) that specifies how often the binding is invoked. @@ -622,6 +632,8 @@ spec: metadata: - name: url # Required value: "user=postgres password=docker host=localhost port=5432 dbname=orders pool_min_conns=1 pool_max_conns=10" + - name: direction + value: "output" # direction of the postgresql binding ``` In the YAML file: @@ -805,6 +817,8 @@ spec: metadata: - name: schedule value: "@every 10s" # valid cron schedule + - name: direction + value: "input" # direction of the cron binding ``` **Note:** The `metadata` section of `binding-cron.yaml` contains a [Cron expression]({{< ref cron.md >}}) that specifies how often the binding is invoked. @@ -832,6 +846,8 @@ spec: metadata: - name: url # Required value: "user=postgres password=docker host=localhost port=5432 dbname=orders pool_min_conns=1 pool_max_conns=10" + - name: direction + value: "output" # direction of the postgresql binding ``` In the YAML file: @@ -1017,6 +1033,8 @@ spec: metadata: - name: schedule value: "@every 10s" # valid cron schedule + - name: direction + value: "input" # direction of the cron binding ``` **Note:** The `metadata` section of `binding-cron.yaml` contains a [Cron expression]({{< ref cron.md >}}) that specifies how often the binding is invoked. @@ -1044,6 +1062,8 @@ spec: metadata: - name: url # Required value: "user=postgres password=docker host=localhost port=5432 dbname=orders pool_min_conns=1 pool_max_conns=10" + - name: direction + value: "output" # direction of the postgresql binding ``` In the YAML file: diff --git a/daprdocs/static/images/binding-overview.png b/daprdocs/static/images/binding-overview.png new file mode 100644 index 000000000..fd8c08d8e Binary files /dev/null and b/daprdocs/static/images/binding-overview.png differ