# GetValue

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.GetValue>

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

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

{% tab title="Parameter: Options" %}

| Name                             | Description                                                                                                                                                                                                       |
| -------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| ThrowErrorOnFailure : `Boolean`  | <p>True: Throw an exception.</p><p>False: Error will be added to the Result.Error.AdditionalInformation 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 error occurs</p><p><br>Default: <code>-</code><br>Example: <code>Task failed during execution</code></p>                                                                        |
| {% endtab %}                     |                                                                                                                                                                                                                   |

{% tab title="Parameter: Connection" %}

| Name                                  | Description                                                                                                                                                                                                                                                                                                                                              |
| ------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| ConnectionMethod : `ConnectionMethod` | <p>Method to use to connect to Redis</p><p>Possible values:</p><ul><li><code>SimpleConnectionString</code>:</li></ul><p>Method to use to connect to Redis</p><ul><li><code>MicrosoftEntraId</code>:</li></ul><p>Method to use to connect to Redis</p><p><br>Default: <code>1</code><br>Example: <code>ConnectionMethod.SimpleConnectionString</code></p> |
| ConnectionString : `String`           | <p>Connection string to Redis.</p><p><br>Default: <code>-</code><br>Example: <code>your-redis-name.redis.cache.windows.net:6380,ssl=true</code></p>                                                                                                                                                                                                      |
| {% endtab %}                          |                                                                                                                                                                                                                                                                                                                                                          |

{% tab title="Result: Result" %}

| Name                                           | Description                                                                                      |
| ---------------------------------------------- | ------------------------------------------------------------------------------------------------ |
| StringValue : `String`                         | <p>Returned string value<br>Example: <code>"foobar"</code></p>                                   |
| ListValue : `List<String>`                     | <p>Returned list value<br>Example: <code>\["Foo", "Bar"]</code></p>                              |
| DictionaryValue : `Dictionary<String, String>` | <p>Returned dictionary value<br>Example: <code>{ { "Foo", "Bar" }, { "Moo", "Baz" } }</code></p> |
| Success : `Boolean`                            | <p>Success flag<br>Example: <code>true</code></p>                                                |
| Error : `Error`                                | Error info                                                                                       |
| {% endtab %}                                   |                                                                                                  |

{% tab title="Changelog" %}

## Changelog

### \[2.0.0] - 2026-03-03

#### Changed

* Changed result values to distinguish between supported values (string, hash, set, list)
* **\[Breaking Change]** Renamed Result.Value to Result.StringValue to distinguish between other values

#### Added

* Added support for MicrosoftEntraId Authentication

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

#### Changed

* Make default error message empty by default

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

#### Changed

* Initial implementation
  {% endtab %}
  {% endtabs %}
