# MilvusServerResource

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

## Definition

```typescript
interface MilvusServerResource
  extends IComputeResource,
    IManifestExpressionProvider,
    IResource,
    IResourceWithArgs,
    IResourceWithConnectionString,
    IResourceWithEndpoints,
    IResourceWithEnvironment,
    IResourceWithProbes,
    IResourceWithWaitSupport,
    IValueProvider,
    IValueWithReferences {
  readonly apiKeyParameter: ParameterResource;
  readonly connectionStringExpression: ReferenceExpression;
  readonly databases: Dict<string,string>;
  entrypoint: string;
  readonly host: EndpointReferenceExpression;
  readonly name: string;
  readonly port: EndpointReferenceExpression;
  readonly primaryEndpoint: EndpointReference;
  shellExecution: boolean;
  readonly token: ReferenceExpression;
  readonly uriExpression: ReferenceExpression;
  addDatabase(
      name: string,
      databaseName?: string): MilvusDatabaseResource;
  withAttu(configureContainer?: (obj: AttuResource) => Promise<void>, containerName?: string): MilvusServerResource;
  withConfigurationFile(configurationFilePath: string): MilvusServerResource;
  withDataBindMount(
      source: string,
      isReadOnly?: boolean): MilvusServerResource;
  withDataVolume(
      name?: string,
      isReadOnly?: boolean): MilvusServerResource;
}
```

## Properties

- `apiKeyParameter`: `ParameterResource` `get` -- Gets the ApiKeyParameter property
- `connectionStringExpression`: `ReferenceExpression` `get` -- Gets the ConnectionStringExpression property
- `databases`: `Dict<string,string>` `get` -- Gets the Databases property
- `entrypoint`: `string` `get - set` -- Gets the Entrypoint property
- `host`: `EndpointReferenceExpression` `get` -- Gets the Host property
- `name`: `string` `get` -- Gets the Name property
- `port`: `EndpointReferenceExpression` `get` -- Gets the Port property
- `primaryEndpoint`: `EndpointReference` `get` -- Gets the PrimaryEndpoint property
- `shellExecution`: `boolean` `get - set` -- Gets the ShellExecution property
- `token`: `ReferenceExpression` `get` -- Gets the Token property
- `uriExpression`: `ReferenceExpression` `get` -- Gets the UriExpression property

## Methods

- [addDatabase](/reference/api/typescript/aspire.hosting.milvus/milvusserverresource/adddatabase.md) -- `method` -- Adds a Milvus database resource to a Milvus server resource.
    ```typescript
  addDatabase(name: string, databaseName?: string): MilvusDatabaseResource
  ```
- [withAttu](/reference/api/typescript/aspire.hosting.milvus/milvusserverresource/withattu.md) -- `method` -- Adds the Attu administration tool for Milvus.
    ```typescript
  withAttu(configureContainer?: (obj: AttuResource) => Promise<void>, containerName?: string): MilvusServerResource
  ```
- [withConfigurationFile](/reference/api/typescript/aspire.hosting.milvus/milvusserverresource/withconfigurationfile.md) -- `method` -- Copies a Milvus configuration file into the container.
    ```typescript
  withConfigurationFile(configurationFilePath: string): MilvusServerResource
  ```
- [withDataBindMount](/reference/api/typescript/aspire.hosting.milvus/milvusserverresource/withdatabindmount.md) -- `method` -- Mounts a host directory as the Milvus data directory.
    ```typescript
  withDataBindMount(source: string, isReadOnly?: boolean): MilvusServerResource
  ```
- [withDataVolume](/reference/api/typescript/aspire.hosting.milvus/milvusserverresource/withdatavolume.md) -- `method` -- Adds a persistent data volume to the Milvus server resource.
    ```typescript
  withDataVolume(name?: string, isReadOnly?: boolean): MilvusServerResource
  ```
