All Implemented Interfaces:
ApiRequest<MySqlConfigureRequest>

public class MySqlConfigureRequest extends DbConfigure.Request<MySqlConfigureRequest>
Request to configure MySQL database.
  • Constructor Details

    • MySqlConfigureRequest

      protected MySqlConfigureRequest(String connectionUrl)
  • Method Details

    • builder

      public static MySqlConfigureRequest builder(String connectionUrl)
      A new request builder with connection URL.

      URL specifies the MySQL DSN. This field can be templated and supports passing the username and password parameters in the following format {{field_name}}. A templated connection URL is required when using root credential rotation.

      Example: {{username}}:{{password}}@tcp(127.0.0.1:3306)

      Parameters:
      connectionUrl - URL to connect to the database
      Returns:
      a new request builder
    • maxOpenConnections

      public MySqlConfigureRequest maxOpenConnections(int connections)
      Specifies the maximum number of open connections to the database. Default value is 4.
      Parameters:
      connections - number of connections
      Returns:
      updated request
    • maxIdleConnections

      public MySqlConfigureRequest maxIdleConnections(int connections)
      Specifies the maximum number of idle connections to the database. A zero uses the value of maxOpenConnections(int) and a negative value disables idle connections. If larger than maxOpenConnections(int) it will be reduced to be equal.
      Parameters:
      connections - number of connections
      Returns:
      updated request
    • maxConnectionLifetime

      public MySqlConfigureRequest maxConnectionLifetime(Duration duration)
      Specifies the maximum amount of time a connection may be reused. If <= 0s connections are reused forever.
      Parameters:
      duration - maximal lifetime of a connection
      Returns:
      updated request
    • tlsCertificateKey

      public MySqlConfigureRequest tlsCertificateKey(String certificateWithKey)
      x509 certificate for connecting to the database. This must be a PEM encoded version of the private key and the certificate combined.
      Parameters:
      certificateWithKey - certificate and key in PEM format
      Returns:
      updated request
    • tlsCa

      public MySqlConfigureRequest tlsCa(String tlsCa)
      x509 CA file for validating the certificate presented by the MySQL server. Must be PEM encoded.
      Parameters:
      tlsCa - Certification authority certificate in PEM format
      Returns:
      updated request