mirror of https://github.com/dapr/docs.git
Merge branch 'v1.9' into patch-1
This commit is contained in:
commit
1b1214c88b
|
|
@ -66,10 +66,14 @@ The above example uses secrets as plain strings. It is recommended to use a secr
|
||||||
This component supports **output binding** with the following operations:
|
This component supports **output binding** with the following operations:
|
||||||
|
|
||||||
- `create`
|
- `create`
|
||||||
|
- `get`
|
||||||
|
- `delete`
|
||||||
|
|
||||||
|
### create
|
||||||
|
|
||||||
You can store a record in Redis using the `create` operation. This sets a key to hold a value. If the key already exists, the value is overwritten.
|
You can store a record in Redis using the `create` operation. This sets a key to hold a value. If the key already exists, the value is overwritten.
|
||||||
|
|
||||||
### Request
|
#### Request
|
||||||
|
|
||||||
```json
|
```json
|
||||||
{
|
{
|
||||||
|
|
@ -84,10 +88,58 @@ You can store a record in Redis using the `create` operation. This sets a key to
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
### Response
|
#### Response
|
||||||
|
|
||||||
An HTTP 204 (No Content) and empty body is returned if successful.
|
An HTTP 204 (No Content) and empty body is returned if successful.
|
||||||
|
|
||||||
|
### get
|
||||||
|
|
||||||
|
You can get a record in Redis using the `get` operation. This gets a key that was previously set.
|
||||||
|
|
||||||
|
#### Request
|
||||||
|
|
||||||
|
```json
|
||||||
|
{
|
||||||
|
"operation": "get",
|
||||||
|
"metadata": {
|
||||||
|
"key": "key1"
|
||||||
|
},
|
||||||
|
"data": {
|
||||||
|
}
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
#### Response
|
||||||
|
|
||||||
|
```json
|
||||||
|
{
|
||||||
|
"data": {
|
||||||
|
"Hello": "World",
|
||||||
|
"Lorem": "Ipsum"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
### delete
|
||||||
|
|
||||||
|
You can delete a record in Redis using the `delete` operation. Returns success whether the key exists or not.
|
||||||
|
|
||||||
|
#### Request
|
||||||
|
|
||||||
|
```json
|
||||||
|
{
|
||||||
|
"operation": "delete",
|
||||||
|
"metadata": {
|
||||||
|
"key": "key1"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
#### Response
|
||||||
|
|
||||||
|
An HTTP 204 (No Content) and empty body is returned if successful.
|
||||||
|
|
||||||
|
|
||||||
## Create a Redis instance
|
## Create a Redis instance
|
||||||
|
|
||||||
Dapr can use any Redis instance - containerized, running on your local dev machine, or a managed cloud service, provided the version of Redis is 5.0.0 or later.
|
Dapr can use any Redis instance - containerized, running on your local dev machine, or a managed cloud service, provided the version of Redis is 5.0.0 or later.
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue