# WithResourcePort

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

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

## Definition

```go
func (LogtoResource) 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()`.

## Applies to

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