# Hosted Metadata Endpoint

You can use WarpStream's hosted `serverless.warpstream.com:9092` endpoint to easily run any Kafka administrative tasks for your BYOC clusters, like creating topics. The hosted endpoint can handle almost all Kafka protocol requests except for Produce and Fetch because WarpStream does not have **any** access to your data with our BYOC product.

### **Instructions**

First, identify your cluster's region and ID from the "Overview" tab (e.g., `ap-southeast-1` and `vci_xxx`).

<figure><img src="/files/aJXhk7Y9DZWLJ8b8Lp2Q" alt=""><figcaption></figcaption></figure>

Next, create a new dedicated agent key in the "Agent Keys" tab (e.g., `aks_xxx`).

<div><figure><img src="/files/VglV4MoCO6KXvXUtqbcs" alt=""><figcaption></figcaption></figure> <figure><img src="/files/FPZsKBbTRGlChG5UGZWD" alt=""><figcaption></figcaption></figure></div>

Finally, arrange the credentials in this format and configure your Kafka client to connect with TLS enabled using SASL PLAIN:

```xml
SASL_USERNAME=<region>::<virtualCluster>
SASL_PASSWORD=<agentKey>
```

Concretely that would look like:

```
SASL_USERNAME=ap-southeast-1::vci_02e1aa27_5024_695d_819b_dc2d1719959d
SASL_PASSWORD=aks_29c445a02ae375e31c316eab7c69e2f1709b16bdcc044ab3a2489da19ae9239b
```

#### **Example: franz-go**

```go
var (
    virtualCluster = "vci_xxx"
    agentKey       = "aks_xxx"
    region         = "xxx" // e.g. "us-east-1"
)

opts := []kgo.Opt{
	kgo.SeedBrokers("serverless.warpstream.com:9092"),
	kgo.DialTLS(),
	kgo.SASL(plain.Auth{
		User: fmt.Sprintf("%s::%s", region, virtualCluster),
		Pass: agentKey,
	}.AsMechanism()),
}

adm, err := kadm.NewOptClient(opts...)
```

#### Example: terraform

[See our terraform example on Github.](https://github.com/warpstreamlabs/terraform-provider-warpstream/blob/main/examples/byoc-with-topics/main.tf)


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.warpstream.com/warpstream/kafka/configure-kafka-client/administrate-your-byoc-clusters-with-serverless.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
