# SeaweedFSContainerResource Methods

- Package: [CommunityToolkit.Aspire.Hosting.SeaweedFS](/reference/api/csharp/communitytoolkit.aspire.hosting.seaweedfs.md)
- Type: [SeaweedFSContainerResource](/reference/api/csharp/communitytoolkit.aspire.hosting.seaweedfs/seaweedfscontainerresource.md)
- Kind: `Methods`
- Members: `1`

A resource that represents a SeaweedFS container.

<a id="getconnectionstringasync"></a>
<a id="getconnectionstringasync-cancellationtoken"></a>

## GetConnectionStringAsync(CancellationToken)

- Name: `GetConnectionStringAsync(CancellationToken)`
- Returns: `ValueTask<string?>`
- Source: [GitHub](https://github.com/CommunityToolkit/Aspire/blob/d479e13473b1d29d06b974f144a0049289a3cb5c/src/CommunityToolkit.Aspire.Hosting.SeaweedFS/SeaweedFSContainerResource.cs#L46-L51)

Gets the connection string asynchronously.

```csharp
public sealed class SeaweedFSContainerResource
{
    public ValueTask<string?> GetConnectionStringAsync(
        CancellationToken cancellationToken = default(CancellationToken))
    {
        // ...
    }
}
```

## Parameters

- `cancellationToken` (`CancellationToken`) `optional`
  A `Threading.CancellationToken` to observe while waiting for the task to complete.

## Returns

`ValueTask<string?>` -- A connection string for the SeaweedFS server.
