# KeycloakResource

- Module: [Aspire.Hosting.Keycloak](/reference/api/go/aspire.hosting.keycloak.md)
- Version: `17.0.0-preview.1.26567.5`
- Kind: `handle`
- Source: [GitHub](https://github.com/microsoft/aspire/tree/2d325b13709752ba6d9a943635c5e2940a2530c0)

A resource that represents a Keycloak resource.

## Definition

```go
type KeycloakResource interface {
    IComputeResource
    Resource
    ResourceWithArgs
    ResourceWithEndpoints
    ResourceWithEnvironment
    ResourceWithWaitSupport
}
```

## Embeds

- `IComputeResource`
- `Resource`
- `ResourceWithArgs`
- `ResourceWithEndpoints`
- `ResourceWithEnvironment`
- `ResourceWithWaitSupport`

## Properties

- `AdminPasswordParameter`: `ParameterResource` `get` -- Gets the parameter that contains the Keycloak admin password.
- `AdminUserNameParameter`: `ParameterResource` `get` -- Gets the parameter that contains the Keycloak admin.
- `ResourceTypeDisplayName`: `string` `get` -- Gets the ResourceTypeDisplayName property

## Methods

- [WithDataBindMount](/reference/api/go/aspire.hosting.keycloak/keycloakresource/withdatabindmount.md) -- `method` -- Adds a bind mount for the data folder to a Keycloak container resource.
  ```go
  WithDataBindMount(source string) KeycloakResource
  ```
- [WithDataVolume](/reference/api/go/aspire.hosting.keycloak/keycloakresource/withdatavolume.md) -- `method` -- Adds a named volume for the data folder to a Keycloak container resource.
  ```go
  WithDataVolume(options ...*WithDataVolumeOptions) KeycloakResource
  ```
- [WithDisabledFeatures](/reference/api/go/aspire.hosting.keycloak/keycloakresource/withdisabledfeatures.md) -- `method` -- Additional feature names to disable for the keycloak resource
  ```go
  WithDisabledFeatures(features []string) KeycloakResource
  ```
- [WithEnabledFeatures](/reference/api/go/aspire.hosting.keycloak/keycloakresource/withenabledfeatures.md) -- `method` -- Additional feature names to enable for the keycloak resource
  ```go
  WithEnabledFeatures(features []string) KeycloakResource
  ```
- [WithOtlpExporter](/reference/api/go/aspire.hosting.keycloak/keycloakresource/withotlpexporter.md) -- `method` -- Configures the OTLP exporter for Keycloak
  ```go
  WithOtlpExporter(options ...*WithOtlpExporterOptions) KeycloakResource
  ```
- [WithRealmImport](/reference/api/go/aspire.hosting.keycloak/keycloakresource/withrealmimport.md) -- `method` -- Adds a realm import to a Keycloak container resource.
  ```go
  WithRealmImport(importPath string) KeycloakResource
  ```
