diff --git a/daprdocs/content/en/reference/components-reference/supported-bindings/redis.md b/daprdocs/content/en/reference/components-reference/supported-bindings/redis.md index 8fabd7bc3..8fe7638e0 100644 --- a/daprdocs/content/en/reference/components-reference/supported-bindings/redis.md +++ b/daprdocs/content/en/reference/components-reference/supported-bindings/redis.md @@ -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: - `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. -### Request +#### Request ```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. +### 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 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.