# AzureManagedRedisResource

- Module: [Aspire.Hosting.Azure.Redis](/reference/api/go/aspire.hosting.azure.redis.md)
- Version: `17.0.0`
- Kind: `handle`
- Source: [GitHub](https://github.com/microsoft/aspire/tree/2d325b13709752ba6d9a943635c5e2940a2530c0)

Represents an Azure Managed Redis resource.

## Definition

```go
type AzureManagedRedisResource interface {
    ExpressionValue
    Resource
    ResourceWithConnectionString
}
```

## Embeds

- `ExpressionValue`
- `Resource`
- `ResourceWithConnectionString`

## Properties

- `ConnectionStringExpression`: `*ReferenceExpression` `get` -- Gets the connection string template for the manifest for the Azure Managed Redis resource.
- `HostName`: `*ReferenceExpression` `get` -- Gets the host name for the Redis server.
- `Id`: [`BicepOutputReference`](/reference/api/go/aspire.hosting.azure.redis/bicepoutputreference.md) `get` -- Gets the "id" output reference for the resource.
- `NameOutputReference`: [`BicepOutputReference`](/reference/api/go/aspire.hosting.azure.redis/bicepoutputreference.md) `get` -- Gets the "name" output reference for the resource.
- `Password`: `*ReferenceExpression` `get` -- Gets the password/access key for the Redis server.
- `Port`: `*ReferenceExpression` `get` -- Gets the port for the Redis server.
- `ResourceTypeDisplayName`: `string` `get` -- Gets the ResourceTypeDisplayName property
- `UriExpression`: `*ReferenceExpression` `get` -- Gets the connection URI expression for the Redis server.
- `UseAccessKeyAuthentication`: `bool` `get` -- Gets a value indicating whether the resource uses access key authentication.

## Methods

- [RunAsContainer](/reference/api/go/aspire.hosting.azure.redis/azuremanagedredisresource/runascontainer.md) -- `method` -- Configures an Azure Managed Redis resource to run locally in a container.
  ```go
  RunAsContainer(options ...*RunAsContainerOptions) AzureManagedRedisResource
  ```
- [WithAccessKeyAuthentication](/reference/api/go/aspire.hosting.azure.redis/azuremanagedredisresource/withaccesskeyauthentication.md) -- `method` -- Configures Azure Managed Redis to use access key authentication
  ```go
  WithAccessKeyAuthentication(options ...*WithAccessKeyAuthenticationOptions) AzureManagedRedisResource
  ```
