# AzureManagedRedisResource

- Kind: `class`
- Package: [Aspire.Hosting.Azure.Redis](/reference/api/csharp/aspire.hosting.azure.redis.md)
- Version: `13.4.0`
- Namespace: `Aspire.Hosting.Azure`
- Target framework: `net8.0`
- Source: [GitHub](https://github.com/microsoft/aspire/blob/cbc352350f1a9bafbaff10d14a2c8de4ac186a48/src/Aspire.Hosting.Azure.Redis/AzureManagedRedisResource.cs)
- Inherits: `AzureProvisioningResource`
- Implements: `IExpressionValue`, `IManifestExpressionProvider`, `IResource`, `IResourceWithConnectionString`, `IValueProvider`, `IValueWithReferences`, `IAzurePrivateEndpointTarget`

Represents an Azure Managed Redis resource.

## Definition

```csharp
namespace Aspire.Hosting.Azure;

public class AzureManagedRedisResource
    : Aspire.Hosting.Azure.AzureProvisioningResource,
      Aspire.Hosting.ApplicationModel.IExpressionValue,
      Aspire.Hosting.ApplicationModel.IManifestExpressionProvider,
      Aspire.Hosting.ApplicationModel.IResource,
      Aspire.Hosting.ApplicationModel.IResourceWithConnectionString,
      Aspire.Hosting.ApplicationModel.IValueProvider,
      Aspire.Hosting.ApplicationModel.IValueWithReferences,
      Aspire.Hosting.Azure.IAzurePrivateEndpointTarget
{
    // ...
}
```

## ATS metadata

### ATS export

- Type ID: `Aspire.Hosting.Azure.Redis/AzureManagedRedisResource`

## Constructors

- [AzureManagedRedisResource(string, Action<AzureResourceInfrastructure>)](/reference/api/csharp/aspire.hosting.azure.redis/azuremanagedredisresource/constructors.md#constructor-string-action-azureresourceinfrastructure) -- Represents an Azure Managed Redis resource.

## Properties

- [Annotations](/reference/api/csharp/aspire.hosting.azure.redis/azuremanagedredisresource/properties.md#annotations) : `ResourceAnnotationCollection` `get` `ats ignored`
- [ConnectionStringExpression](/reference/api/csharp/aspire.hosting.azure.redis/azuremanagedredisresource/properties.md#connectionstringexpression) : `ReferenceExpression` `get` -- Gets the connection string template for the manifest for the Azure Managed Redis resource.
- [HostName](/reference/api/csharp/aspire.hosting.azure.redis/azuremanagedredisresource/properties.md#hostname) : `ReferenceExpression` `get` -- Gets the host name for the Redis server.
- [Id](/reference/api/csharp/aspire.hosting.azure.redis/azuremanagedredisresource/properties.md#id) : `BicepOutputReference` `get` -- Gets the "id" output reference for the resource.
- [NameOutputReference](/reference/api/csharp/aspire.hosting.azure.redis/azuremanagedredisresource/properties.md#nameoutputreference) : `BicepOutputReference` `get` -- Gets the "name" output reference for the resource.
- [Password](/reference/api/csharp/aspire.hosting.azure.redis/azuremanagedredisresource/properties.md#password) : `ReferenceExpression?` `get` -- Gets the password/access key for the Redis server.
- [Port](/reference/api/csharp/aspire.hosting.azure.redis/azuremanagedredisresource/properties.md#port) : `ReferenceExpression` `get` -- Gets the port for the Redis server.
- [UriExpression](/reference/api/csharp/aspire.hosting.azure.redis/azuremanagedredisresource/properties.md#uriexpression) : `ReferenceExpression` `get` -- Gets the connection URI expression for the Redis server.
- [UseAccessKeyAuthentication](/reference/api/csharp/aspire.hosting.azure.redis/azuremanagedredisresource/properties.md#useaccesskeyauthentication) : `bool` `get` -- Gets a value indicating whether the resource uses access key authentication.

## Methods

- [AddAsExistingResource(AzureResourceInfrastructure)](/reference/api/csharp/aspire.hosting.azure.redis/azuremanagedredisresource/methods.md#addasexistingresource-azureresourceinfrastructure) : `ProvisionableResource`
- [AddRoleAssignments(IAddRoleAssignmentsContext)](/reference/api/csharp/aspire.hosting.azure.redis/azuremanagedredisresource/methods.md#addroleassignments-iaddroleassignmentscontext)
