Skip to content
DocsTry Aspire
DocsTry

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

propertyconnectionStringExpressionReferenceExpressionget
Gets the connection string expression for the MySQL 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 MySQL server.
propertypasswordParameterParameterResourceget · set
Gets or sets the parameter that contains the MySQL server password.
propertyportEndpointReferenceExpressionget
Gets the port endpoint reference for this resource.
propertyprimaryEndpointEndpointReferenceget
Gets the primary endpoint for the MySQL server.
propertyuriExpressionReferenceExpressionget
Gets the connection URI expression for the MySQL server.

Methods

methodaddDatabasebuilder
Adds a MySQL database to the application model.
addDatabase(
name: string,
databaseName?: string): MySqlDatabaseResource
namestring
databaseNamestringoptional
MySqlDatabaseResource
methodwithDataBindMountbuilder
Adds a bind mount for the data folder to a MySql container resource.
withDataBindMount(
source: string,
isReadOnly?: boolean): MySqlServerResource
sourcestring
isReadOnlybooleanoptional= False
MySqlServerResource
methodwithDataVolumebuilder
Adds a named volume for the data folder to a MySql container resource.
withDataVolume(
name?: string,
isReadOnly?: boolean): MySqlServerResource
namestringoptional
isReadOnlybooleanoptional= False
MySqlServerResource
methodwithInitFilesbuilder
Copies init files into a MySql container resource.
withInitFiles(source: string): MySqlServerResource
sourcestring
MySqlServerResource
methodwithPasswordbuilder
Configures the password that the MySQL resource uses.
withPassword(password: ParameterResource): MySqlServerResource
passwordParameterResource
MySqlServerResource
methodwithPhpMyAdminbuilder
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
containerNamestringoptional
MySqlServerResource