Skip to content
DocsTry Aspire
DocsTry

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

propertyazureSqlDatabasesDict<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.
propertyconnectionStringExpressionReferenceExpressionget
Gets the connection template for the manifest for the Azure SQL Server resource.
propertydatabasesDict<string,string>get
A dictionary where the key is the resource name and the value is the Azure SQL database name.
propertyfullyQualifiedDomainNameBicepOutputReferenceget
Gets the fully qualified domain name (FQDN) output reference from the bicep template for the Azure SQL Server resource.
propertyhostNameReferenceExpressionget
Gets the host name for the SQL Server.
propertyidBicepOutputReferenceget
Gets the "id" output reference for the resource.
propertyisContainerbooleanget
Gets a value indicating whether the current resource represents a container. If so the actual resource is not running in Azure.
propertyjdbcConnectionStringReferenceExpressionget
Gets the JDBC connection string for the server.
propertynameOutputReferenceBicepOutputReferenceget
Gets the "name" output reference for the resource.
propertyportReferenceExpressionget
Gets the port for the PostgreSQL server.
propertyuriExpressionReferenceExpressionget
Gets the connection URI expression for the SQL Server.

Methods

methodaddDatabasebuilder
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
namestring
databaseNamestringoptional
AzureSqlDatabaseResource
methodrunAsContainerbuilder
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
storageAzureStorageResource
AzureSqlServerResource
Configures the Azure SQL Server to use the specified subnet for deployment script execution.
withAdminDeploymentScriptSubnet(subnet: AzureSubnetResource): AzureSqlServerResource
subnetAzureSubnetResource
AzureSqlServerResource