Skip to content
DocsTry Aspire
DocsTry

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

propertyconnectionStringExpressionReferenceExpressionget
Gets the connection string expression for the SQL Server.
propertydatabasesDict<string,string>get
A dictionary where the key is the resource name and the value is the database name.
propertyhostEndpointReferenceExpressionget
Gets the host endpoint reference for this resource.
propertyjdbcConnectionStringReferenceExpressionget
Gets the JDBC connection string for the SQL Server.
propertypasswordParameterParameterResourceget · set
Gets the parameter that contains the SQL Server password.
propertyportEndpointReferenceExpressionget
Gets the port endpoint reference for this resource.
propertyprimaryEndpointEndpointReferenceget
Gets the primary endpoint for the SQL Server.
propertyuriExpressionReferenceExpressionget
Gets the connection URI expression for the SQL Server.
propertyuserNameReferenceReferenceExpressionget
Gets a reference to the user name for the SQL Server.

Methods

methodaddDatabasebuilder
Adds a SQL Server database resource
addDatabase(
name: string,
databaseName?: string): SqlServerDatabaseResource
namestring
databaseNamestringoptional
SqlServerDatabaseResource
methodwithDataBindMountbuilder
Adds a bind mount for the data folder to a SQL Server resource.
withDataBindMount(
source: string,
isReadOnly?: boolean): SqlServerServerResource
sourcestring
isReadOnlybooleanoptional= False
SqlServerServerResource
methodwithDataVolumebuilder
Adds a named volume for the data folder to a SQL Server resource.
withDataVolume(
name?: string,
isReadOnly?: boolean): SqlServerServerResource
namestringoptional
isReadOnlybooleanoptional= False
SqlServerServerResource
methodwithHostPortbuilder
Configures the host port that the SqlServer resource is exposed on instead of using randomly assigned port.
withHostPort(port: number): SqlServerServerResource
portnumber
SqlServerServerResource
methodwithPasswordbuilder
Configures the password that the SqlServer resource is used.
withPassword(password: ParameterResource): SqlServerServerResource
passwordParameterResource
SqlServerServerResource