# LogtoResource

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

Represents a containerized resource specific to Logto that extends the base functionality of container resources by providing additional endpoint and connection string management.

## Remarks

This class is designed for use in an application hosting environment and incorporates
a primary HTTP endpoint with predefined default port configurations.

## Definition

```go
type LogtoResource interface {
    ExpressionValue
    IComputeResource
    Resource
    ResourceWithArgs
    ResourceWithConnectionString
    ResourceWithEndpoints
    ResourceWithEnvironment
    ResourceWithWaitSupport
}
```

## Embeds

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

## Properties

- `ConnectionStringExpression`: `*ReferenceExpression` `get` -- Gets the ConnectionStringExpression property
- `Host`: `EndpointReferenceExpression` `get` -- Gets the Host property
- `Port`: `EndpointReferenceExpression` `get` -- Gets the Port property
- `PrimaryEndpoint`: `EndpointReference` `get` -- Gets the PrimaryEndpoint property
- `UriExpression`: `*ReferenceExpression` `get` -- Gets the connection URI expression for the Logto container resource.

## Methods

- [WithAdminEndpoint](/reference/api/go/communitytoolkit.aspire.hosting.logto/logtoresource/withadminendpoint.md) -- `method` -- Configures the specified Logto resource to include an administrative endpoint with the given URL.
  ```go
  WithAdminEndpoint(url string) LogtoResource
  ```
- [WithDatabase](/reference/api/go/communitytoolkit.aspire.hosting.logto/logtoresource/withdatabase.md) -- `method` -- Configures the Logto resource to connect to the specified PostgreSQL database.
  ```go
  WithDatabase(postgres PostgresServerResource, options ...*WithDatabaseOptions) LogtoResource
  ```
- [WithDatabaseSeeding](/reference/api/go/communitytoolkit.aspire.hosting.logto/logtoresource/withdatabaseseeding.md) -- `method` -- Starts Logto by running the database seed command before the application process.
  ```go
  WithDatabaseSeeding() LogtoResource
  ```
- [WithDataBindMount](/reference/api/go/communitytoolkit.aspire.hosting.logto/logtoresource/withdatabindmount.md) -- `method` -- Configures the Logto resource to use a data bind mount with the specified source directory.
  ```go
  WithDataBindMount(source string) LogtoResource
  ```
- [WithDataVolume](/reference/api/go/communitytoolkit.aspire.hosting.logto/logtoresource/withdatavolume.md) -- `method` -- Configures the Logto resource with a data volume, allowing persistent storage.
  ```go
  WithDataVolume(options ...*WithDataVolumeOptions) LogtoResource
  ```
- [WithDeprecationTracing](/reference/api/go/communitytoolkit.aspire.hosting.logto/logtoresource/withdeprecationtracing.md) -- `method` -- Enables Node.js deprecation tracing for the Logto by setting the NODE_OPTIONS environment variable to '--trace-deprecation'. This allows stack traces to be printed for deprecated API usage.
  ```go
  WithDeprecationTracing() LogtoResource
  ```
- [WithDisableAdminConsole](/reference/api/go/communitytoolkit.aspire.hosting.logto/logtoresource/withdisableadminconsole.md) -- `method` -- Configures the Logto resource to disable the Admin Console port.
  ```go
  WithDisableAdminConsole(disable bool) LogtoResource
  ```
- [WithNodeEnv](/reference/api/go/communitytoolkit.aspire.hosting.logto/logtoresource/withnodeenv.md) -- `method` -- Configures the Logto resource to use the specified Node.js environment value by setting the corresponding environment variable.
  ```go
  WithNodeEnv(env string) LogtoResource
  ```
- [WithRedis](/reference/api/go/communitytoolkit.aspire.hosting.logto/logtoresource/withredis.md) -- `method` -- Configures the Logto resource to use a specified Redis resource for caching or other functionality.
  ```go
  WithRedis(redis RedisResource) LogtoResource
  ```
- [WithResourcePort](/reference/api/go/communitytoolkit.aspire.hosting.logto/logtoresource/withresourceport.md) -- `method` -- Configures HTTP endpoints for the given Logto resource builder with specified port settings.
  ```go
  WithResourcePort(options ...*WithResourcePortOptions) LogtoResource
  ```
- [WithSecretVault](/reference/api/go/communitytoolkit.aspire.hosting.logto/logtoresource/withsecretvault.md) -- `method` -- Configures the Logto resource to use a secret vault with the specified key encryption key (KEK).
  ```go
  WithSecretVault(secretVaultKek string) LogtoResource
  ```
- [WithSensitiveUsername](/reference/api/go/communitytoolkit.aspire.hosting.logto/logtoresource/withsensitiveusername.md) -- `method` -- Specifies whether the username is case-sensitive.
  ```go
  WithSensitiveUsername(sensitiveUsername bool) LogtoResource
  ```
- [WithTrustProxyHeader](/reference/api/go/communitytoolkit.aspire.hosting.logto/logtoresource/withtrustproxyheader.md) -- `method` -- Configures the Logto resource to enable or disable the trust proxy header behavior.
  ```go
  WithTrustProxyHeader(trustProxyHeader bool) LogtoResource
  ```
