# AddRustFs

- Module: [CommunityToolkit.Aspire.Hosting.RustFs](/reference/api/go/communitytoolkit.aspire.hosting.rustfs.md)
- Version: `13.6.1`
- Kind: `method`
- Defined on: `DistributedApplicationBuilder`
- Source: [GitHub](https://github.com/CommunityToolkit/Aspire/tree/d9c2addac6f527ef2e33712d290b84574b455a3b)

Adds a RustFs container to the application model. The default image is "rustfs/rustfs".

## Definition

```go
func (DistributedApplicationBuilder) AddRustFs(
    name string,
    options ...*AddRustFsOptions,
) RustFsResource
```

## Parameters

- `name` (`string`) -- The name of the resource. This name will be used as the connection string name when referenced in a dependency.
- `options` (`...*AddRustFsOptions`) -- optional settings, see [Options](#options)

## Options

Optional parameters are passed in a trailing `options ...*AddRustFsOptions` argument.

- `AccessKey` (`*ParameterResource`) -- The parameter used to provide the access key for the RustFs resource. If `null` a random key will be generated.
- `SecretKey` (`*ParameterResource`) -- The parameter used to provide the secret key for the RustFs resource. If `null` a random key will be generated.
- `Port` (`*float64`) -- The host port for the RustFs S3-compatible API endpoint.
- `ConsolePort` (`*float64`) -- The host port for the RustFs console endpoint.

## Returns

[`RustFsResource`](/reference/api/go/communitytoolkit.aspire.hosting.rustfs/rustfsresource.md) -- A reference to the `IResourceBuilder`.

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

## Applies to

- `DistributedApplicationBuilder`
