# WithMetadata

- Module: [Aspire.Hosting.Yarp](/reference/api/go/aspire.hosting.yarp.md)
- Version: `17.0.0`
- Kind: `method`
- Defined on: [`YarpCluster`](/reference/api/go/aspire.hosting.yarp/yarpcluster.md)
- Source: [GitHub](https://github.com/microsoft/aspire/tree/2d325b13709752ba6d9a943635c5e2940a2530c0)

Set the Metadata for the cluster.

## Definition

```go
func (YarpCluster) WithMetadata(metadata map[string]string) YarpCluster
```

## Parameters

- `metadata` (`map[string]string`)

## Returns

[`YarpCluster`](/reference/api/go/aspire.hosting.yarp/yarpcluster.md)

Returns a handle; failures surface later via `Err()`.

## Applies to

- [`YarpCluster`](/reference/api/go/aspire.hosting.yarp/yarpcluster.md)
