# KafkaServerResource

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

## Definition

```typescript
interface KafkaServerResource
  extends IComputeResource,
    IManifestExpressionProvider,
    IResource,
    IResourceWithArgs,
    IResourceWithConnectionString,
    IResourceWithEndpoints,
    IResourceWithEnvironment,
    IResourceWithProbes,
    IResourceWithWaitSupport,
    IValueProvider,
    IValueWithReferences {
  readonly connectionStringExpression: ReferenceExpression;
  entrypoint: string;
  readonly host: EndpointReferenceExpression;
  readonly internalEndpoint: EndpointReference;
  readonly name: string;
  readonly port: EndpointReferenceExpression;
  readonly primaryEndpoint: EndpointReference;
  shellExecution: boolean;
  withDataBindMount(
      source: string,
      isReadOnly?: boolean): KafkaServerResource;
  withDataVolume(
      name?: string,
      isReadOnly?: boolean): KafkaServerResource;
  withKafkaUI(configureContainer?: (obj: KafkaUIContainerResource) => Promise<void>, containerName?: string): KafkaServerResource;
}
```

## Properties

- `connectionStringExpression`: `ReferenceExpression` `get` -- Gets the ConnectionStringExpression property
- `entrypoint`: `string` `get - set` -- Gets the Entrypoint property
- `host`: `EndpointReferenceExpression` `get` -- Gets the Host property
- `internalEndpoint`: `EndpointReference` `get` -- Gets the InternalEndpoint property
- `name`: `string` `get` -- Gets the Name property
- `port`: `EndpointReferenceExpression` `get` -- Gets the Port property
- `primaryEndpoint`: `EndpointReference` `get` -- Gets the PrimaryEndpoint property
- `shellExecution`: `boolean` `get - set` -- Gets the ShellExecution property

## Methods

- [withDataBindMount](/reference/api/typescript/aspire.hosting.kafka/kafkaserverresource/withdatabindmount.md) -- `method` -- Adds a data bind mount to the Kafka container
    ```typescript
  withDataBindMount(source: string, isReadOnly?: boolean): KafkaServerResource
  ```
- [withDataVolume](/reference/api/typescript/aspire.hosting.kafka/kafkaserverresource/withdatavolume.md) -- `method` -- Adds a data volume to the Kafka container
    ```typescript
  withDataVolume(name?: string, isReadOnly?: boolean): KafkaServerResource
  ```
- [withKafkaUI](/reference/api/typescript/aspire.hosting.kafka/kafkaserverresource/withkafkaui.md) -- `method` -- Adds a Kafka UI container to manage the Kafka resource
    ```typescript
  withKafkaUI(configureContainer?: (obj: KafkaUIContainerResource) => Promise<void>, containerName?: string): KafkaServerResource
  ```
