# LogtoResource.WithResourcePort

- Module: [CommunityToolkit.Aspire.Hosting.Logto](/reference/api/go/communitytoolkit.aspire.hosting.logto.md)
- Defined on: [LogtoResource](/reference/api/go/communitytoolkit.aspire.hosting.logto/logtoresource.md)
- Version: `13.6.1`
- Kind: `method`

Configures HTTP endpoints for the given Logto resource builder with specified port settings.

## Definition

```go
type LogtoResource interface {
    // ... omitted for brevity
    WithResourcePort(options ...*WithResourcePortOptions) LogtoResource
}
```

## Signature

```go
WithResourcePort(options ...*WithResourcePortOptions) LogtoResource
```

## Parameters

- `options` (`...*WithResourcePortOptions`) -- optional settings, see [Options](#options)

## Options

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

- `Port` (`*float64`) -- The host port to be configured for the primary endpoint. If `null`, Aspire will assign a random host port.
- `AdminPort` (`*float64`) -- The host port to be configured for the administrative endpoint. If `null`, Aspire will assign a random host port.

## Returns

[`LogtoResource`](/reference/api/go/communitytoolkit.aspire.hosting.logto/logtoresource.md) -- The updated resource builder with the configured HTTP endpoints.

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

## Defined on

- [LogtoResource](/reference/api/go/communitytoolkit.aspire.hosting.logto/logtoresource.md) -- `handle`
