# MilvusServerResource

- Kind: `class`
- Package: [Aspire.Hosting.Milvus](/reference/api/csharp/aspire.hosting.milvus.md)
- Version: `13.4.0`
- Namespace: `Aspire.Hosting.Milvus`
- Target framework: `net8.0`
- Source: [GitHub](https://github.com/microsoft/aspire/blob/cbc352350f1a9bafbaff10d14a2c8de4ac186a48/src/Aspire.Hosting.Milvus/MilvusServerResource.cs)
- Inherits: `ContainerResource`
- Implements: `IExpressionValue`, `IManifestExpressionProvider`, `IResource`, `IResourceWithConnectionString`, `IValueProvider`, `IValueWithReferences`

A resource that represents a Milvus database.

## Definition

```csharp
namespace Aspire.Hosting.Milvus;

public class MilvusServerResource
    : Aspire.Hosting.ApplicationModel.ContainerResource,
      Aspire.Hosting.ApplicationModel.IExpressionValue,
      Aspire.Hosting.ApplicationModel.IManifestExpressionProvider,
      Aspire.Hosting.ApplicationModel.IResource,
      Aspire.Hosting.ApplicationModel.IResourceWithConnectionString,
      Aspire.Hosting.ApplicationModel.IValueProvider,
      Aspire.Hosting.ApplicationModel.IValueWithReferences
{
    // ...
}
```

## ATS metadata

### ATS export

- Type ID: `Aspire.Hosting.Milvus/MilvusServerResource`

## Constructors

- [MilvusServerResource(string, ParameterResource)](/reference/api/csharp/aspire.hosting.milvus/milvusserverresource/constructors.md#constructor-string-parameterresource) -- Initializes a new instance of the [MilvusServerResource](/reference/api/csharp/aspire.hosting.milvus/milvusserverresource.md) class.

## Properties

- [ApiKeyParameter](/reference/api/csharp/aspire.hosting.milvus/milvusserverresource/properties.md#apikeyparameter) : `ParameterResource` `get` -- Gets the parameter that contains the Milvus API key.
- [ConnectionStringExpression](/reference/api/csharp/aspire.hosting.milvus/milvusserverresource/properties.md#connectionstringexpression) : `ReferenceExpression` `get` -- Gets the connection string expression for the Milvus gRPC endpoint.
- [Databases](/reference/api/csharp/aspire.hosting.milvus/milvusserverresource/properties.md#databases) : `IReadOnlyDictionary<string, string>` `get` -- A dictionary where the key is the resource name and the value is the database name.
- [Host](/reference/api/csharp/aspire.hosting.milvus/milvusserverresource/properties.md#host) : `EndpointReferenceExpression` `get` -- Gets the host endpoint reference for this resource.
- [Port](/reference/api/csharp/aspire.hosting.milvus/milvusserverresource/properties.md#port) : `EndpointReferenceExpression` `get` -- Gets the port endpoint reference for this resource.
- [PrimaryEndpoint](/reference/api/csharp/aspire.hosting.milvus/milvusserverresource/properties.md#primaryendpoint) : `EndpointReference` `get` -- Gets the gRPC endpoint for the Milvus database.
- [Token](/reference/api/csharp/aspire.hosting.milvus/milvusserverresource/properties.md#token) : `ReferenceExpression` `get` -- Gets a valid access token to access the Milvus instance.
- [UriExpression](/reference/api/csharp/aspire.hosting.milvus/milvusserverresource/properties.md#uriexpression) : `ReferenceExpression` `get` -- Gets URI expression for the Milvus instance.
