# 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="https://77315434-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FjB7FxO8ty4EXO4HsQP4E%2Fuploads%2Fgit-blob-beced2cff52d666d56d00f7a318f6bea7ee39047%2FScreenshot%202024-08-28%20at%209.41.26%20AM.png?alt=media" alt=""><figcaption></figcaption></figure>

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

<div><figure><img src="https://77315434-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FjB7FxO8ty4EXO4HsQP4E%2Fuploads%2Fgit-blob-85f3af30ccdb1a96f1988f23efb1f0e20d8a61ea%2FScreenshot%202024-08-28%20at%209.43.35%20AM.png?alt=media" alt=""><figcaption></figcaption></figure> <figure><img src="https://77315434-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FjB7FxO8ty4EXO4HsQP4E%2Fuploads%2Fgit-blob-254592c53028e439ac218d0a0d401869f21cd325%2FScreenshot%202024-08-28%20at%209.43.48%20AM.png?alt=media" 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)
