Skip to content
Docs Try Aspire
Docs Try

SurrealDbServerResource

Handle
📦 CommunityToolkit.Aspire.Hosting.SurrealDb v13.4.0
interface SurrealDbServerResource
extends IComputeResource,
IExpressionValue,
IManifestExpressionProvider,
IResource,
IResourceWithArgs,
IResourceWithConnectionString,
IResourceWithEndpoints,
IResourceWithEnvironment,
IResourceWithProbes,
IResourceWithWaitSupport,
IValueProvider,
IValueWithReferences {
readonly connectionStringExpression: ReferenceExpression;
readonly host: EndpointReferenceExpression;
readonly namespaces: Dict<string,string>;
readonly passwordParameter: ParameterResource;
readonly port: EndpointReferenceExpression;
readonly primaryEndpoint: EndpointReference;
readonly uriExpression: ReferenceExpression;
readonly userNameParameter: ParameterResource;
addNamespace(
name: string,
namespaceName?: string): SurrealDbNamespaceResource;
withDataBindMount(source: string): SurrealDbServerResource;
withDataVolume(name?: string): SurrealDbServerResource;
withInitFiles(source: string): SurrealDbServerResource;
withLogLevel(logLevel: string): SurrealDbServerResource;
withSurrealDbOtlpExporter(): SurrealDbServerResource;
withSurrealist(containerName?: string): SurrealDbServerResource;
}

Properties

property connectionStringExpression ReferenceExpression get
Gets the connection string expression for the SurrealDB instance.
property host EndpointReferenceExpression get
Gets the host endpoint reference for this resource.
property namespaces Dict<string,string> get
A dictionary where the key is the resource name and the value is the namespace name.
property passwordParameter ParameterResource get
Gets the parameter that contains the SurrealDB password.
property port EndpointReferenceExpression get
Gets the port endpoint reference for this resource.
property primaryEndpoint EndpointReference get
Gets the primary endpoint for the SurrealDB instance.
property uriExpression ReferenceExpression get
Gets the connection URI expression for the SurrealDB instance.
property userNameParameter ParameterResource get
Gets the parameter that contains the SurrealDB username.

Methods

method addNamespace builder
Adds a SurrealDB namespace resource to the application model
addNamespace(
name: string,
namespaceName?: string): SurrealDbNamespaceResource
name string
namespaceName string optional
SurrealDbNamespaceResource
method withDataBindMount builder
Adds a bind mount for the data folder to a SurrealDB resource.
withDataBindMount(source: string): SurrealDbServerResource
source string
SurrealDbServerResource
method withDataVolume builder
Adds a named volume for the data folder to a SurrealDB resource.
withDataVolume(name?: string): SurrealDbServerResource
name string optional
SurrealDbServerResource
method withInitFiles builder
Copies init files into a SurrealDB container resource.
withInitFiles(source: string): SurrealDbServerResource
source string
SurrealDbServerResource
method withLogLevel builder
withLogLevel(logLevel: string): SurrealDbServerResource
logLevel string
SurrealDbServerResource
Injects the appropriate environment variables to allow the resource to enable sending telemetry to the dashboard. 1. It sets the OTLP endpoint to the value of the DOTNET_DASHBOARD_OTLP_ENDPOINT_URL environment variable. 2. It sets the service name and instance id to the resource name and UID. Values are injected by the orchestrator. 3. It sets a small batch schedule delay in development. This reduces the delay that OTLP exporter waits to sends telemetry and makes the dashboard telemetry pages responsive.
withSurrealDbOtlpExporter(): SurrealDbServerResource
SurrealDbServerResource
method withSurrealist builder
withSurrealist(containerName?: string): SurrealDbServerResource
containerName string optional
SurrealDbServerResource