# KeycloakResource

- Module: [Aspire.Hosting.Keycloak](/reference/api/typescript/aspire.hosting.keycloak.md)
- Version: `13.3.0-preview.1.26254.5`
- Kind: `handle`
- Source: [GitHub](https://github.com/microsoft/aspire)

## Definition

```typescript
interface KeycloakResource
  extends IComputeResource,
    IResource,
    IResourceWithArgs,
    IResourceWithEndpoints,
    IResourceWithEnvironment,
    IResourceWithProbes,
    IResourceWithWaitSupport,
    IResourceWithServiceDiscovery {
  readonly adminPasswordParameter: ParameterResource;
  readonly adminUserNameParameter: ParameterResource;
  withDataBindMount(source: string): KeycloakResource;
  withDataVolume(name?: string): KeycloakResource;
  withDisabledFeatures(features: string[]): KeycloakResource;
  withEnabledFeatures(features: string[]): KeycloakResource;
  withOtlpExporter(protocol?: OtlpProtocol): KeycloakResource;
  withRealmImport(importPath: string): KeycloakResource;
}
```

## Properties

- `adminPasswordParameter`: `ParameterResource` `get` -- Gets the AdminPasswordParameter property
- `adminUserNameParameter`: `ParameterResource` `get` -- Gets the AdminUserNameParameter property

## Methods

- [withDataBindMount](/reference/api/typescript/aspire.hosting.keycloak/keycloakresource/withdatabindmount.md) -- `method` -- Adds a data bind mount for Keycloak
    ```typescript
  withDataBindMount(source: string): KeycloakResource
  ```
- [withDataVolume](/reference/api/typescript/aspire.hosting.keycloak/keycloakresource/withdatavolume.md) -- `method` -- Adds a data volume for Keycloak
    ```typescript
  withDataVolume(name?: string): KeycloakResource
  ```
- [withDisabledFeatures](/reference/api/typescript/aspire.hosting.keycloak/keycloakresource/withdisabledfeatures.md) -- `method` -- Disables Keycloak features
    ```typescript
  withDisabledFeatures(features: string[]): KeycloakResource
  ```
- [withEnabledFeatures](/reference/api/typescript/aspire.hosting.keycloak/keycloakresource/withenabledfeatures.md) -- `method` -- Enables Keycloak features
    ```typescript
  withEnabledFeatures(features: string[]): KeycloakResource
  ```
- [withOtlpExporter](/reference/api/typescript/aspire.hosting.keycloak/keycloakresource/withotlpexporter.md) -- `method` -- Configures the OTLP exporter for Keycloak
    ```typescript
  withOtlpExporter(protocol?: OtlpProtocol): KeycloakResource
  ```
- [withRealmImport](/reference/api/typescript/aspire.hosting.keycloak/keycloakresource/withrealmimport.md) -- `method` -- Imports a Keycloak realm configuration
    ```typescript
  withRealmImport(importPath: string): KeycloakResource
  ```
