# MilvusServerResource

- Module: [Aspire.Hosting.Milvus](/reference/api/go/aspire.hosting.milvus.md)
- Version: `17.0.0`
- Kind: `handle`
- Source: [GitHub](https://github.com/microsoft/aspire/tree/2d325b13709752ba6d9a943635c5e2940a2530c0)

A resource that represents a Milvus database.

## Definition

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

## Embeds

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

## Properties

- `ApiKeyParameter`: `ParameterResource` `get` -- Gets the parameter that contains the Milvus API key.
- `ConnectionStringExpression`: `*ReferenceExpression` `get` -- Gets the connection string expression for the Milvus gRPC endpoint.
- `Databases`: `map[string]string` `get` -- A dictionary where the key is the resource name and the value is the database name.
- `Host`: `EndpointReferenceExpression` `get` -- Gets the host endpoint reference for this resource.
- `Port`: `EndpointReferenceExpression` `get` -- Gets the port endpoint reference for this resource.
- `PrimaryEndpoint`: `EndpointReference` `get` -- Gets the gRPC endpoint for the Milvus database.
- `ResourceTypeDisplayName`: `string` `get` -- Gets the ResourceTypeDisplayName property
- `Token`: `*ReferenceExpression` `get` -- Gets a valid access token to access the Milvus instance.
- `UriExpression`: `*ReferenceExpression` `get` -- Gets URI expression for the Milvus instance.

## Methods

- [AddDatabase](/reference/api/go/aspire.hosting.milvus/milvusserverresource/adddatabase.md) -- `method` -- Adds a Milvus database to the application model.
  ```go
  AddDatabase(name string, options ...*AddDatabaseOptions) MilvusDatabaseResource
  ```
- [WithAttu](/reference/api/go/aspire.hosting.milvus/milvusserverresource/withattu.md) -- `method` -- Adds an administration and development platform for Milvus to the application model using Attu.
  ```go
  WithAttu(options ...*WithAttuOptions) MilvusServerResource
  ```
- [WithConfigurationFile](/reference/api/go/aspire.hosting.milvus/milvusserverresource/withconfigurationfile.md) -- `method` -- Copies a configuration file into a Milvus container resource.
  ```go
  WithConfigurationFile(configurationFilePath string) MilvusServerResource
  ```
- [WithDataBindMount](/reference/api/go/aspire.hosting.milvus/milvusserverresource/withdatabindmount.md) -- `method` -- Adds a bind mount for the data folder to a Milvus container resource.
  ```go
  WithDataBindMount(source string, options ...*WithDataBindMountOptions) MilvusServerResource
  ```
- [WithDataVolume](/reference/api/go/aspire.hosting.milvus/milvusserverresource/withdatavolume.md) -- `method` -- Adds a named volume for the data folder to a Milvus container resource.
  ```go
  WithDataVolume(options ...*WithDataVolumeOptions) MilvusServerResource
  ```
