Skip to content
Docs Try Aspire
Docs Try

SqlServerServerResource

Handle
📦 Aspire.Hosting.SqlServer v13.4.0
interface SqlServerServerResource
extends IComputeResource,
IExpressionValue,
IManifestExpressionProvider,
IResource,
IResourceWithArgs,
IResourceWithConnectionString,
IResourceWithEndpoints,
IResourceWithEnvironment,
IResourceWithProbes,
IResourceWithWaitSupport,
IValueProvider,
IValueWithReferences {
readonly connectionStringExpression: ReferenceExpression;
readonly databases: Dict<string,string>;
readonly host: EndpointReferenceExpression;
readonly jdbcConnectionString: ReferenceExpression;
passwordParameter: ParameterResource;
readonly port: EndpointReferenceExpression;
readonly primaryEndpoint: EndpointReference;
readonly uriExpression: ReferenceExpression;
readonly userNameReference: ReferenceExpression;
addDatabase(
name: string,
databaseName?: string): SqlServerDatabaseResource;
withDataBindMount(
source: string,
isReadOnly?: boolean): SqlServerServerResource;
withDataVolume(
name?: string,
isReadOnly?: boolean): SqlServerServerResource;
withHostPort(port: number): SqlServerServerResource;
withPassword(password: ParameterResource): SqlServerServerResource;
}

Properties

property connectionStringExpression ReferenceExpression get
Gets the connection string expression for the SQL Server.
property databases Dict<string,string> get
A dictionary where the key is the resource name and the value is the database name.
property host EndpointReferenceExpression get
Gets the host endpoint reference for this resource.
property jdbcConnectionString ReferenceExpression get
Gets the JDBC connection string for the SQL Server.
property passwordParameter ParameterResource get · set
Gets the parameter that contains the SQL Server password.
property port EndpointReferenceExpression get
Gets the port endpoint reference for this resource.
property primaryEndpoint EndpointReference get
Gets the primary endpoint for the SQL Server.
property uriExpression ReferenceExpression get
Gets the connection URI expression for the SQL Server.
property userNameReference ReferenceExpression get
Gets a reference to the user name for the SQL Server.

Methods

method addDatabase builder
Adds a SQL Server database resource
addDatabase(
name: string,
databaseName?: string): SqlServerDatabaseResource
name string
databaseName string optional
SqlServerDatabaseResource
method withDataBindMount builder
Adds a bind mount for the data folder to a SQL Server resource.
withDataBindMount(
source: string,
isReadOnly?: boolean): SqlServerServerResource
source string
isReadOnly boolean optional = False
SqlServerServerResource
method withDataVolume builder
Adds a named volume for the data folder to a SQL Server resource.
withDataVolume(
name?: string,
isReadOnly?: boolean): SqlServerServerResource
name string optional
isReadOnly boolean optional = False
SqlServerServerResource
method withHostPort builder
Configures the host port that the SqlServer resource is exposed on instead of using randomly assigned port.
withHostPort(port: number): SqlServerServerResource
port number
SqlServerServerResource
method withPassword builder
Configures the password that the SqlServer resource is used.
withPassword(password: ParameterResource): SqlServerServerResource
password ParameterResource
SqlServerServerResource