Skip to content
Docs Try Aspire
Docs Try

AzureSqlServerResource

Handle
📦 Aspire.Hosting.Azure.Sql v13.4.0
interface AzureSqlServerResource
extends IAzureResource,
IExpressionValue,
IManifestExpressionProvider,
IResource,
IResourceWithConnectionString,
IResourceWithParameters,
IValueProvider,
IValueWithReferences,
IAzureNspAssociationTarget,
IAzurePrivateEndpointTarget,
IAzurePrivateEndpointTargetNotification {
readonly azureSqlDatabases: Dict<string,Aspire.Hosting.Azure.Sql/Aspire.Hosting.Azure.AzureSqlDatabaseResource>;
readonly connectionStringExpression: ReferenceExpression;
readonly databases: Dict<string,string>;
readonly fullyQualifiedDomainName: BicepOutputReference;
readonly hostName: ReferenceExpression;
readonly id: BicepOutputReference;
readonly isContainer: boolean;
readonly jdbcConnectionString: ReferenceExpression;
readonly nameOutputReference: BicepOutputReference;
readonly port: ReferenceExpression;
readonly uriExpression: ReferenceExpression;
addDatabase(
name: string,
databaseName?: string): AzureSqlDatabaseResource;
runAsContainer(configureContainer?: (obj: SqlServerServerResource) => Promise<void>): AzureSqlServerResource;
withAdminDeploymentScriptStorage(storage: AzureStorageResource): AzureSqlServerResource;
withAdminDeploymentScriptSubnet(subnet: AzureSubnetResource): AzureSqlServerResource;
}

Properties

property azureSqlDatabases Dict<string,Aspire.Hosting.Azure.Sql/Aspire.Hosting.Azure.AzureSqlDatabaseResource> get
A dictionary where the key is the resource name and the value is the Azure SQL database resource.
property connectionStringExpression ReferenceExpression get
Gets the connection template for the manifest for the Azure SQL Server resource.
property databases Dict<string,string> get
A dictionary where the key is the resource name and the value is the Azure SQL database name.
property fullyQualifiedDomainName BicepOutputReference get
Gets the fully qualified domain name (FQDN) output reference from the bicep template for the Azure SQL Server resource.
property hostName ReferenceExpression get
Gets the host name for the SQL Server.
property id BicepOutputReference get
Gets the "id" output reference for the resource.
property isContainer boolean get
Gets a value indicating whether the current resource represents a container. If so the actual resource is not running in Azure.
property jdbcConnectionString ReferenceExpression get
Gets the JDBC connection string for the server.
property nameOutputReference BicepOutputReference get
Gets the "name" output reference for the resource.
property port ReferenceExpression get
Gets the port for the PostgreSQL server.
property uriExpression ReferenceExpression get
Gets the connection URI expression for the SQL Server.

Methods

method addDatabase builder
Adds an Azure SQL Database to the application model. The Free Offer option will be used when deploying the resource in Azure
addDatabase(
name: string,
databaseName?: string): AzureSqlDatabaseResource
name string
databaseName string optional
AzureSqlDatabaseResource
method runAsContainer builder
Configures an Azure SQL Database (server) resource to run locally in a container.
runAsContainer(configureContainer?: (obj: SqlServerServerResource) => Promise<void>): AzureSqlServerResource
configureContainer (obj: SqlServerServerResource) => Promise<void> optional
AzureSqlServerResource
Configures the Azure SQL Server to use the specified storage account for deployment script execution.
withAdminDeploymentScriptStorage(storage: AzureStorageResource): AzureSqlServerResource
storage AzureStorageResource
AzureSqlServerResource
Configures the Azure SQL Server to use the specified subnet for deployment script execution.
withAdminDeploymentScriptSubnet(subnet: AzureSubnetResource): AzureSqlServerResource
subnet AzureSubnetResource
AzureSqlServerResource