SqlServerServerResource

Handle
📦 Aspire.Hosting.SqlServer v17.0.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 resourceTypeDisplayName: string;
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;
withRepl(configure?: (obj: SqlServerReplOptions) => Promise<void>): 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.
propertyresourceTypeDisplayNamestringget
Gets the ResourceTypeDisplayName property
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
namestringThe name of the resource. This name will be used as the connection string name when referenced in a dependency.
databaseNamestringoptionalThe name of the database. If not provided, this defaults to the same value as `name`.
SqlServerDatabaseResource
methodwithDataBindMountbuilder
Adds a bind mount for the data folder to a SQL Server resource.
withDataBindMount(
source: string,
isReadOnly?: boolean): SqlServerServerResource
sourcestringThe source directory on the host to mount into the container.
isReadOnlybooleanoptional= FalseA flag that indicates if this is a read-only mount.
SqlServerServerResource
methodwithDataVolumebuilder
Adds a named volume for the data folder to a SQL Server resource.
withDataVolume(
name?: string,
isReadOnly?: boolean): SqlServerServerResource
namestringoptionalThe name of the volume. Defaults to an auto-generated name based on the application and resource names.
isReadOnlybooleanoptional= FalseA flag that indicates if this is a read-only volume.
SqlServerServerResource
methodwithHostPortbuilder
Configures the host port that the SqlServer resource is exposed on instead of using randomly assigned port.
withHostPort(port: number): SqlServerServerResource
portnumberThe port to bind on the host. If `null` is used random port will be assigned.
SqlServerServerResource
methodwithPasswordbuilder
Configures the password that the SqlServer resource is used.
withPassword(password: ParameterResource): SqlServerServerResource
passwordParameterResourceThe parameter used to provide the password for the SqlServer resource.
SqlServerServerResource
methodwithReplbuilder
Adds a REPL command that opens an authenticated SQL Server shell with the configured client tools.
withRepl(configure?: (obj: SqlServerReplOptions) => Promise<void>): SqlServerServerResource
configure(obj: SqlServerReplOptions) => Promise<void>optionalAn optional callback to configure the SQL Server REPL.
SqlServerServerResource