# RedPandaServerResource

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

A resource that represents a Redpanda streaming platform container.

## Remarks

Redpanda is a Kafka API compatible streaming platform. The `ConnectionStringExpression`
returns the bootstrap broker address (`host:port`) that Kafka clients use to connect.

## Definition

```go
type RedPandaServerResource interface {
    ExpressionValue
    IComputeResource
    Resource
    ResourceWithArgs
    ResourceWithConnectionString
    ResourceWithEndpoints
    ResourceWithEnvironment
    ResourceWithWaitSupport
}
```

## Embeds

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

## 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/go/communitytoolkit.aspire.hosting.redpanda/redpandaserverresource/withconsole.md) -- `method` -- Adds a Redpanda Console container to the application, configured to connect to the Redpanda broker.
  ```go
  WithConsole(options ...*WithConsoleOptions) RedPandaServerResource
  ```
- [WithDataBindMount](/reference/api/go/communitytoolkit.aspire.hosting.redpanda/redpandaserverresource/withdatabindmount.md) -- `method` -- Adds a bind mount for the data folder to a Redpanda container resource.
  ```go
  WithDataBindMount(source string, options ...*WithDataBindMountOptions) RedPandaServerResource
  ```
- [WithDataVolume](/reference/api/go/communitytoolkit.aspire.hosting.redpanda/redpandaserverresource/withdatavolume.md) -- `method` -- Adds a named volume for the data folder to a Redpanda container resource.
  ```go
  WithDataVolume(options ...*WithDataVolumeOptions) RedPandaServerResource
  ```
- [WithKafkaUI](/reference/api/go/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.
  ```go
  WithKafkaUI(options ...*WithKafkaUIOptions) RedPandaServerResource
  ```
