# DbGateContainerResource

- Module: [CommunityToolkit.Aspire.Hosting.DbGate](/reference/api/go/communitytoolkit.aspire.hosting.dbgate.md)
- Version: `13.6.1`
- Kind: `handle`
- Source: [GitHub](https://github.com/CommunityToolkit/Aspire/tree/d9c2addac6f527ef2e33712d290b84574b455a3b)

Represents a container resource for DbGate.

## Definition

```go
type DbGateContainerResource interface {
    IComputeResource
    Resource
    ResourceWithArgs
    ResourceWithEndpoints
    ResourceWithEnvironment
    ResourceWithWaitSupport
}
```

## Embeds

- `IComputeResource`
- `Resource`
- `ResourceWithArgs`
- `ResourceWithEndpoints`
- `ResourceWithEnvironment`
- `ResourceWithWaitSupport`

## Properties

- `PrimaryEndpoint`: `EndpointReference` `get` -- Gets the primary endpoint for the DbGate.

## Methods

- [WithDataBindMount](/reference/api/go/communitytoolkit.aspire.hosting.dbgate/dbgatecontainerresource/withdatabindmount.md) -- `method` -- Adds a bind mount for the data folder to a DbGate container resource.
  ```go
  WithDataBindMount(source string, options ...*WithDataBindMountOptions) DbGateContainerResource
  ```
- [WithDataVolume](/reference/api/go/communitytoolkit.aspire.hosting.dbgate/dbgatecontainerresource/withdatavolume.md) -- `method` -- Adds a named volume for the data folder to a DbGate container resource.
  ```go
  WithDataVolume(options ...*WithDataVolumeOptions) DbGateContainerResource
  ```
- [WithHostPort](/reference/api/go/communitytoolkit.aspire.hosting.dbgate/dbgatecontainerresource/withhostport.md) -- `method` -- Configures the host port that the DbGate resource is exposed on instead of using randomly assigned port.
  ```go
  WithHostPort(port *float64) DbGateContainerResource
  ```
