# AzureManagedRedisResource

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

## Definition

```typescript
interface AzureManagedRedisResource
  extends IAzureResource,
    IManifestExpressionProvider,
    IResource,
    IResourceWithConnectionString,
    IResourceWithParameters,
    IValueProvider,
    IValueWithReferences,
    IAzurePrivateEndpointTarget {
  readonly connectionStringExpression: ReferenceExpression;
  readonly hostName: ReferenceExpression;
  readonly name: string;
  readonly outputs: Dict<string,any>;
  readonly parameters: Dict<string,any>;
  readonly password: ReferenceExpression;
  readonly port: ReferenceExpression;
  readonly secretOutputs: Dict<string,string>;
  readonly uriExpression: ReferenceExpression;
  readonly useAccessKeyAuthentication: boolean;
  runAsContainer(configureContainer?: (obj: RedisResource) => Promise<void>): AzureManagedRedisResource;
  withAccessKeyAuthentication(): AzureManagedRedisResource;
  withAccessKeyAuthenticationWithKeyVault(keyVaultBuilder: IAzureKeyVaultResource): AzureManagedRedisResource;
}
```

## Properties

- `connectionStringExpression`: `ReferenceExpression` `get` -- Gets the ConnectionStringExpression property
- `hostName`: `ReferenceExpression` `get` -- Gets the HostName property
- `name`: `string` `get` -- Gets the Name property
- `outputs`: `Dict<string,any>` `get` -- Gets the Outputs property
- `parameters`: `Dict<string,any>` `get` -- Gets the Parameters property
- `password`: `ReferenceExpression` `get` -- Gets the Password property
- `port`: `ReferenceExpression` `get` -- Gets the Port property
- `secretOutputs`: `Dict<string,string>` `get` -- Gets the SecretOutputs property
- `uriExpression`: `ReferenceExpression` `get` -- Gets the UriExpression property
- `useAccessKeyAuthentication`: `boolean` `get` -- Gets the UseAccessKeyAuthentication property

## Methods

- [runAsContainer](/reference/api/typescript/aspire.hosting.azure.redis/azuremanagedredisresource/runascontainer.md) -- `method` -- Configures Azure Managed Redis to run in a local 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(): AzureManagedRedisResource
  ```
- [withAccessKeyAuthenticationWithKeyVault](/reference/api/typescript/aspire.hosting.azure.redis/azuremanagedredisresource/withaccesskeyauthenticationwithkeyvault.md) -- `method` -- Configures Azure Managed Redis to use access key authentication with a specific Key Vault
    ```typescript
  withAccessKeyAuthenticationWithKeyVault(keyVaultBuilder: IAzureKeyVaultResource): AzureManagedRedisResource
  ```
