MySqlServerResource

Handle
📦 Aspire.Hosting.MySql v17.0.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 resourceTypeDisplayName: string;
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;
withRepl(): 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.
propertyresourceTypeDisplayNamestringget
Gets the ResourceTypeDisplayName property
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
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`.
MySqlDatabaseResource
methodwithDataBindMountbuilder
Adds a bind mount for the data folder to a MySql container resource.
withDataBindMount(
source: string,
isReadOnly?: boolean): MySqlServerResource
sourcestringThe source directory on the host to mount into the container.
isReadOnlybooleanoptional= FalseA flag that indicates if this is a read-only mount.
MySqlServerResource
methodwithDataVolumebuilder
Adds a named volume for the data folder to a MySql container resource.
withDataVolume(
name?: string,
isReadOnly?: boolean): MySqlServerResource
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.
MySqlServerResource
methodwithInitFilesbuilder
Copies init files into a MySql container resource.
withInitFiles(source: string): MySqlServerResource
sourcestringThe source file or directory on the host to copy into the container.
MySqlServerResource
methodwithPasswordbuilder
Configures the password that the MySQL resource uses.
withPassword(password: ParameterResource): MySqlServerResource
passwordParameterResourceThe parameter used to provide the password for the MySQL resource.
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>optionalCallback to configure PhpMyAdmin container resource.
containerNamestringoptionalThe name of the container (Optional).
MySqlServerResource
methodwithReplbuilder
Adds a REPL command that opens an authenticated MySQL shell in the dashboard terminal dock.
withRepl(): MySqlServerResource
MySqlServerResource