# RedPandaServerResource

- Module: [CommunityToolkit.Aspire.Hosting.RedPanda](/reference/api/typescript/communitytoolkit.aspire.hosting.redpanda.md)
- Version: `13.5.0`
- Kind: `handle`
- Source: [GitHub](https://github.com/CommunityToolkit/Aspire/tree/4ff8268fbd97ddd23cb73dc8eff9cc92718156d1)

A resource that represents a Redpanda streaming platform container.

## Definition

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

## Properties

- `adminEndpoint`: `EndpointReference` `get` -- Gets the Admin API HTTP endpoint for the Redpanda broker.
- `connectionStringExpression`: `ReferenceExpression` `get` -- Gets the connection string expression for the Redpanda broker in the form of `host:port`, suitable for use as the Kafka bootstrap servers value.
- `host`: `EndpointReferenceExpression` `get` -- Gets the host of the primary Kafka endpoint.
- `internalEndpoint`: `EndpointReference` `get` -- Gets the internal Kafka API endpoint used for container-to-container communication.
- `port`: `EndpointReferenceExpression` `get` -- Gets the port of the primary Kafka endpoint.
- `primaryEndpoint`: `EndpointReference` `get` -- Gets the primary (Kafka API) endpoint for the Redpanda broker. This endpoint is reachable from the host.
- `schemaRegistryEndpoint`: `EndpointReference` `get` -- Gets the Schema Registry HTTP endpoint for the Redpanda broker.

## Methods

- [withConsole](/reference/api/typescript/communitytoolkit.aspire.hosting.redpanda/redpandaserverresource/withconsole.md) -- `method` -- Adds a Redpanda Console container to the application, configured to connect to the Redpanda broker.
    ```typescript
  withConsole(configureContainer?: (obj: RedPandaConsoleContainerResource) => Promise<void>, containerName?: string): RedPandaServerResource
  ```
- [withDataBindMount](/reference/api/typescript/communitytoolkit.aspire.hosting.redpanda/redpandaserverresource/withdatabindmount.md) -- `method` -- Adds a bind mount for the data folder to a Redpanda container resource.
    ```typescript
  withDataBindMount(source: string, isReadOnly?: boolean): RedPandaServerResource
  ```
- [withDataVolume](/reference/api/typescript/communitytoolkit.aspire.hosting.redpanda/redpandaserverresource/withdatavolume.md) -- `method` -- Adds a named volume for the data folder to a Redpanda container resource.
    ```typescript
  withDataVolume(name?: string, isReadOnly?: boolean): RedPandaServerResource
  ```
- [withKafkaUI](/reference/api/typescript/communitytoolkit.aspire.hosting.redpanda/redpandaserverresource/withkafkaui.md) -- `method` -- Adds a Kafka UI container to the application, configured to connect to the Redpanda broker. This is the same Kafka management UI (the `kafbat/kafka-ui` image) used by the official Aspire Kafka integration, so it works against any Kafka API compatible broker.
    ```typescript
  withKafkaUI(configureContainer?: (obj: RedPandaKafkaUiContainerResource) => Promise<void>, containerName?: string): RedPandaServerResource
  ```
