Skip to content
Docs Try Aspire
Docs Try

MySqlServerResource

Handle
📦 Aspire.Hosting.MySql v13.4.0
interface MySqlServerResource
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;
addDatabase(
name: string,
databaseName?: string): MySqlDatabaseResource;
withDataBindMount(
source: string,
isReadOnly?: boolean): MySqlServerResource;
withDataVolume(
name?: string,
isReadOnly?: boolean): MySqlServerResource;
withInitFiles(source: string): MySqlServerResource;
withPassword(password: ParameterResource): MySqlServerResource;
withPhpMyAdmin(configureContainer?: (obj: PhpMyAdminContainerResource) => Promise<void>, containerName?: string): MySqlServerResource;
}

Properties

property connectionStringExpression ReferenceExpression get
Gets the connection string expression for the MySQL 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 MySQL server.
property passwordParameter ParameterResource get · set
Gets or sets the parameter that contains the MySQL server password.
property port EndpointReferenceExpression get
Gets the port endpoint reference for this resource.
property primaryEndpoint EndpointReference get
Gets the primary endpoint for the MySQL server.
property uriExpression ReferenceExpression get
Gets the connection URI expression for the MySQL server.

Methods

method addDatabase builder
Adds a MySQL database to the application model.
addDatabase(
name: string,
databaseName?: string): MySqlDatabaseResource
name string
databaseName string optional
MySqlDatabaseResource
method withDataBindMount builder
Adds a bind mount for the data folder to a MySql container resource.
withDataBindMount(
source: string,
isReadOnly?: boolean): MySqlServerResource
source string
isReadOnly boolean optional = False
MySqlServerResource
method withDataVolume builder
Adds a named volume for the data folder to a MySql container resource.
withDataVolume(
name?: string,
isReadOnly?: boolean): MySqlServerResource
name string optional
isReadOnly boolean optional = False
MySqlServerResource
method withInitFiles builder
Copies init files into a MySql container resource.
withInitFiles(source: string): MySqlServerResource
source string
MySqlServerResource
method withPassword builder
Configures the password that the MySQL resource uses.
withPassword(password: ParameterResource): MySqlServerResource
password ParameterResource
MySqlServerResource
method withPhpMyAdmin builder
Adds a phpMyAdmin administration and development platform for MySql to the application model.
withPhpMyAdmin(configureContainer?: (obj: PhpMyAdminContainerResource) => Promise<void>, containerName?: string): MySqlServerResource
configureContainer (obj: PhpMyAdminContainerResource) => Promise<void> optional
containerName string optional
MySqlServerResource