# MinioContainerResource

- Module: [CommunityToolkit.Aspire.Hosting.Minio](/reference/api/typescript/communitytoolkit.aspire.hosting.minio.md)
- Version: `13.4.0`
- Kind: `handle`
- Source: [GitHub](https://github.com/CommunityToolkit/Aspire)

A resource that represents a MinIO storage

## Definition

```typescript
interface MinioContainerResource
  extends IComputeResource,
    IExpressionValue,
    IManifestExpressionProvider,
    IResource,
    IResourceWithArgs,
    IResourceWithConnectionString,
    IResourceWithEndpoints,
    IResourceWithEnvironment,
    IResourceWithProbes,
    IResourceWithWaitSupport,
    IValueProvider,
    IValueWithReferences {
  readonly connectionStringExpression: ReferenceExpression;
  readonly host: EndpointReferenceExpression;
  passwordParameter: ParameterResource;
  readonly port: EndpointReferenceExpression;
  readonly primaryEndpoint: EndpointReference;
  rootUser: ParameterResource;
  readonly uriExpression: ReferenceExpression;
  withDataBindMount(source: string): MinioContainerResource;
  withDataVolume(name?: string): MinioContainerResource;
  withHostPort(port: number): MinioContainerResource;
  withPassword(password: ParameterResource): MinioContainerResource;
  withUserName(userName: ParameterResource): MinioContainerResource;
}
```

## Properties

- `connectionStringExpression`: `ReferenceExpression` `get` -- Gets the connection string expression for the Minio
- `host`: `EndpointReferenceExpression` `get` -- Gets the host endpoint reference for this resource.
- `passwordParameter`: `ParameterResource` `get - set` -- The MinIO root password.
- `port`: `EndpointReferenceExpression` `get` -- Gets the port endpoint reference for this resource.
- `primaryEndpoint`: `EndpointReference` `get` -- Gets the primary endpoint for the MinIO. This endpoint is used for all API calls over HTTP.
- `rootUser`: `ParameterResource` `get - set` -- The MinIO root user.
- `uriExpression`: `ReferenceExpression` `get` -- Gets the connection URI expression for the MinIO server.

## Methods

- [withDataBindMount](/reference/api/typescript/communitytoolkit.aspire.hosting.minio/miniocontainerresource/withdatabindmount.md) -- `method` -- Adds a bind mount for the data folder to a MinIO container resource.
    ```typescript
  withDataBindMount(source: string): MinioContainerResource
  ```
- [withDataVolume](/reference/api/typescript/communitytoolkit.aspire.hosting.minio/miniocontainerresource/withdatavolume.md) -- `method` -- Adds a named volume for the data folder to a MinIO container resource.
    ```typescript
  withDataVolume(name?: string): MinioContainerResource
  ```
- [withHostPort](/reference/api/typescript/communitytoolkit.aspire.hosting.minio/miniocontainerresource/withhostport.md) -- `method` -- Configures the host port that the MinIO resource is exposed on instead of using randomly assigned port.
    ```typescript
  withHostPort(port: number): MinioContainerResource
  ```
- [withPassword](/reference/api/typescript/communitytoolkit.aspire.hosting.minio/miniocontainerresource/withpassword.md) -- `method` -- Configures the password that the MinIO resource uses.
    ```typescript
  withPassword(password: ParameterResource): MinioContainerResource
  ```
- [withUserName](/reference/api/typescript/communitytoolkit.aspire.hosting.minio/miniocontainerresource/withusername.md) -- `method` -- Configures the user name that the MinIO resource uses.
    ```typescript
  withUserName(userName: ParameterResource): MinioContainerResource
  ```
