> For the complete documentation index, see [llms.txt](https://docs.frends.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.frends.com/tasks/tasks/redis/keyexists.md).

# KeyExists

This is Task to check if Redis key exists.

Task version: 1.2.0

Required Frends version: 5.5+

Required .NET version: 6.0

Compatible Agents: Crossplatform

Source code: <https://github.com/FrendsPlatform/Frends.Redis/tree/main/Frends.Redis.KeyExists>

## Task Parameters

{% tabs %}
{% tab title="Input" %}

| Name           | Description                                                                      |
| -------------- | -------------------------------------------------------------------------------- |
| Key : `String` | <p>Key to set</p><p><br>Default: <code>-</code><br>Example: <code>Foo</code></p> |
| {% endtab %}   |                                                                                  |

{% tab title="Options" %}

| Name                             | Description                                                                                                                                                                                                |
| -------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| ThrowErrorOnFailure : `Boolean`  | <p>True: Throw an exception.</p><p>False: Error will be added to the Result.Error.AdditionalInfo list instead of stopping the Task.</p><p><br>Default: <code>True</code><br>Example: <code>true</code></p> |
| ErrorMessageOnFailure : `String` | <p>Message what will be used when an error occurs</p><p><br>Default: <code>-</code><br>Example: <code>Task failed during execution</code></p>                                                              |
| {% endtab %}                     |                                                                                                                                                                                                            |

{% tab title="Connection" %}

| Name                                  | Description                                                                                                                                                                                                                                                                                                                                                                                           |
| ------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| ConnectionMethod : `ConnectionMethod` | <p>Method to use to connect to Redis</p><p>Possible values:</p><ul><li><code>SimpleConnectionString</code>: Using basic connection string with all required credentials</li><li><code>MicrosoftEntraId</code>: Using Microsoft Entra ID to get token authentication</li></ul><p><br>Default: <code>SimpleConnectionString</code><br>Example: <code>ConnectionMethod.SimpleConnectionString</code></p> |
| ConnectionString : `String`           | <p>Connection string to Redis.</p><p><br>Default: <code>-</code><br>Example: <code>127.0.0.1:6379</code></p>                                                                                                                                                                                                                                                                                          |
| {% endtab %}                          |                                                                                                                                                                                                                                                                                                                                                                                                       |
| {% endtabs %}                         |                                                                                                                                                                                                                                                                                                                                                                                                       |

## Task Result

| Name                            | Description                                       |
| ------------------------------- | ------------------------------------------------- |
| Success : `Boolean`             | <p>Success flag<br>Example: <code>true</code></p> |
| Error : `Error`                 | Error info                                        |
| Error.Message : `String`        | Error message                                     |
| Error.AdditionalInfo : `Object` | Object with additional information                |

## Task Changelog

Changelog for Task Frends.Redis.KeyExists.

### \[1.2.0] - 2026-03-03

#### Added

* Add support for Microsoft Entra ID

### \[1.1.0] - 2025-07-31

#### Changed

* Make default error message empty by default

### \[1.0.0] - 2025-05-13

#### Added

* Initial implementation


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.frends.com/tasks/tasks/redis/keyexists.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
