# DbGateContainerResource

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

Represents a container resource for DbGate.

## Definition

```typescript
interface DbGateContainerResource
  extends IComputeResource,
    IResource,
    IResourceWithArgs,
    IResourceWithEndpoints,
    IResourceWithEnvironment,
    IResourceWithProbes,
    IResourceWithWaitSupport {
  readonly primaryEndpoint: EndpointReference;
  withDataBindMount(
      source: string,
      isReadOnly?: boolean): DbGateContainerResource;
  withDataVolume(
      name?: string,
      isReadOnly?: boolean): DbGateContainerResource;
  withHostPort(port: number): DbGateContainerResource;
}
```

## Properties

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

## Methods

- [withDataBindMount](/reference/api/typescript/communitytoolkit.aspire.hosting.dbgate/dbgatecontainerresource/withdatabindmount.md) -- `method` -- Adds a bind mount for the data folder to a DbGate container resource.
    ```typescript
  withDataBindMount(source: string, isReadOnly?: boolean): DbGateContainerResource
  ```
- [withDataVolume](/reference/api/typescript/communitytoolkit.aspire.hosting.dbgate/dbgatecontainerresource/withdatavolume.md) -- `method` -- Adds a named volume for the data folder to a DbGate container resource.
    ```typescript
  withDataVolume(name?: string, isReadOnly?: boolean): DbGateContainerResource
  ```
- [withHostPort](/reference/api/typescript/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.
    ```typescript
  withHostPort(port: number): DbGateContainerResource
  ```
