mirror of https://github.com/dapr/docs.git
				
				
				
			Merge pull request #3660 from hhunter-ms/issue_3592_3
[Bindings] Update yaml snippet to match updated qs
This commit is contained in:
		
						commit
						d4e19078a4
					
				| 
						 | 
				
			
			@ -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" %}}
 | 
			
		||||
<img src="/images/binding-overview.png" width=1000 alt="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.
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -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:
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
										
											Binary file not shown.
										
									
								
							| 
		 After Width: | Height: | Size: 27 KiB  | 
		Loading…
	
		Reference in New Issue