# AzureManagedRedisResource

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

Represents an Azure Managed Redis resource.

## Definition

```typescript
interface AzureManagedRedisResource
  extends IAzureResource,
    IExpressionValue,
    IManifestExpressionProvider,
    IResource,
    IResourceWithConnectionString,
    IResourceWithParameters,
    IValueProvider,
    IValueWithReferences,
    IAzurePrivateEndpointTarget {
  readonly connectionStringExpression: ReferenceExpression;
  readonly hostName: ReferenceExpression;
  readonly id: BicepOutputReference;
  readonly nameOutputReference: BicepOutputReference;
  readonly password: ReferenceExpression;
  readonly port: ReferenceExpression;
  readonly uriExpression: ReferenceExpression;
  readonly useAccessKeyAuthentication: boolean;
  runAsContainer(configureContainer?: (obj: RedisResource) => Promise<void>): AzureManagedRedisResource;
  withAccessKeyAuthentication(keyVaultBuilder?: IAzureKeyVaultResource): AzureManagedRedisResource;
}
```

## 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` `get` -- Gets the "id" output reference for the resource.
- `nameOutputReference`: `BicepOutputReference` `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.
- `uriExpression`: `ReferenceExpression` `get` -- Gets the connection URI expression for the Redis server.
- `useAccessKeyAuthentication`: `boolean` `get` -- Gets a value indicating whether the resource uses access key authentication.

## Methods

- [runAsContainer](/reference/api/typescript/aspire.hosting.azure.redis/azuremanagedredisresource/runascontainer.md) -- `method` -- Configures an Azure Managed Redis resource to run locally in a container.
    ```typescript
  runAsContainer(configureContainer?: (obj: RedisResource) => Promise<void>): AzureManagedRedisResource
  ```
- [withAccessKeyAuthentication](/reference/api/typescript/aspire.hosting.azure.redis/azuremanagedredisresource/withaccesskeyauthentication.md) -- `method` -- Configures Azure Managed Redis to use access key authentication
    ```typescript
  withAccessKeyAuthentication(keyVaultBuilder?: IAzureKeyVaultResource): AzureManagedRedisResource
  ```
