# KeycloakResource

- Module: [Aspire.Hosting.Keycloak](/reference/api/typescript/aspire.hosting.keycloak.md)
- Version: `13.2.0-preview.1.26170.3`
- 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;
  entrypoint: string;
  readonly name: string;
  shellExecution: boolean;
  withDataBindMount(source: string): KeycloakResource;
  withDataVolume(name?: string): KeycloakResource;
  withDisabledFeatures(features: string[]): KeycloakResource;
  withEnabledFeatures(features: string[]): KeycloakResource;
  withOtlpExporter(): KeycloakResource;
  withOtlpExporterWithProtocol(protocol: OtlpProtocol): KeycloakResource;
  withRealmImport(importPath: string): KeycloakResource;
}
```

## Properties

- `adminPasswordParameter`: `ParameterResource` `get` -- Gets the AdminPasswordParameter property
- `adminUserNameParameter`: `ParameterResource` `get` -- Gets the AdminUserNameParameter property
- `entrypoint`: `string` `get - set` -- Gets the Entrypoint property
- `name`: `string` `get` -- Gets the Name property
- `shellExecution`: `boolean` `get - set` -- Gets the ShellExecution 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(): KeycloakResource
  ```
- [withOtlpExporterWithProtocol](/reference/api/typescript/aspire.hosting.keycloak/keycloakresource/withotlpexporterwithprotocol.md) -- `method` -- Configures the OTLP exporter for Keycloak with a specific protocol
    ```typescript
  withOtlpExporterWithProtocol(protocol: OtlpProtocol): KeycloakResource
  ```
- [withRealmImport](/reference/api/typescript/aspire.hosting.keycloak/keycloakresource/withrealmimport.md) -- `method` -- Imports a Keycloak realm configuration
    ```typescript
  withRealmImport(importPath: string): KeycloakResource
  ```
