Skip to content
DocsTry Aspire
DocsTry

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

propertyconnectionStringExpressionReferenceExpressionget
Gets the connection string expression for the SurrealDB instance.
propertyhostEndpointReferenceExpressionget
Gets the host endpoint reference for this resource.
propertynamespacesDict<string,string>get
A dictionary where the key is the resource name and the value is the namespace name.
propertypasswordParameterParameterResourceget
Gets the parameter that contains the SurrealDB password.
propertyportEndpointReferenceExpressionget
Gets the port endpoint reference for this resource.
propertyprimaryEndpointEndpointReferenceget
Gets the primary endpoint for the SurrealDB instance.
propertyuriExpressionReferenceExpressionget
Gets the connection URI expression for the SurrealDB instance.
propertyuserNameParameterParameterResourceget
Gets the parameter that contains the SurrealDB username.

Methods

methodaddNamespacebuilder
Adds a SurrealDB namespace resource to the application model
addNamespace(
name: string,
namespaceName?: string): SurrealDbNamespaceResource
namestring
namespaceNamestringoptional
SurrealDbNamespaceResource
methodwithDataBindMountbuilder
Adds a bind mount for the data folder to a SurrealDB resource.
withDataBindMount(source: string): SurrealDbServerResource
sourcestring
SurrealDbServerResource
methodwithDataVolumebuilder
Adds a named volume for the data folder to a SurrealDB resource.
withDataVolume(name?: string): SurrealDbServerResource
namestringoptional
SurrealDbServerResource
methodwithInitFilesbuilder
Copies init files into a SurrealDB container resource.
withInitFiles(source: string): SurrealDbServerResource
sourcestring
SurrealDbServerResource
methodwithLogLevelbuilder
withLogLevel(logLevel: string): SurrealDbServerResource
logLevelstring
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
methodwithSurrealistbuilder
withSurrealist(containerName?: string): SurrealDbServerResource
containerNamestringoptional
SurrealDbServerResource