Class MySqlConfigureRequest
- java.lang.Object
-
- io.helidon.integrations.common.rest.ApiJsonBuilder<T>
-
- io.helidon.integrations.common.rest.ApiJsonRequest<T>
-
- io.helidon.integrations.vault.VaultRequest<T>
-
- io.helidon.integrations.vault.secrets.database.DbConfigure.Request<MySqlConfigureRequest>
-
- io.helidon.integrations.vault.secrets.database.MySqlConfigureRequest
-
- All Implemented Interfaces:
ApiRequest<MySqlConfigureRequest>
public class MySqlConfigureRequest extends DbConfigure.Request<MySqlConfigureRequest>
Request to configure MySQL database.
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedMySqlConfigureRequest(String connectionUrl)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static MySqlConfigureRequestbuilder(String connectionUrl)A new request builder with connection URL.MySqlConfigureRequestmaxConnectionLifetime(Duration duration)Specifies the maximum amount of time a connection may be reused.MySqlConfigureRequestmaxIdleConnections(int connections)Specifies the maximum number of idle connections to the database.MySqlConfigureRequestmaxOpenConnections(int connections)Specifies the maximum number of open connections to the database.MySqlConfigureRequesttlsCa(String tlsCa)x509 CA file for validating the certificate presented by the MySQL server.MySqlConfigureRequesttlsCertificateKey(String certificateWithKey)x509 certificate for connecting to the database.-
Methods inherited from class io.helidon.integrations.vault.secrets.database.DbConfigure.Request
addAllowedRole, addRootRotationStatement, name, password, passwordPolicy, username, verifyConnection
-
Methods inherited from class io.helidon.integrations.vault.VaultRequest
add, addCommaDelimitedArray, addToCommaDelimitedArray, durationToTtl, preBuild
-
Methods inherited from class io.helidon.integrations.common.rest.ApiJsonRequest
addHeader, addQueryParam, headers, queryParams, requestId, requestId, requestMediaType, requestMediaType, responseMediaType, responseMediaType
-
Methods inherited from class io.helidon.integrations.common.rest.ApiJsonBuilder
add, add, add, add, add, add, addBase64, addToArray, addToArray, addToArray, addToArray, addToArray, addToArray, addToObject, addToObject, addToObject, addToObject, addToObject, emptyArray, me, postBuild, toJson
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface io.helidon.integrations.common.rest.ApiRequest
toJson
-
-
-
-
Constructor Detail
-
MySqlConfigureRequest
protected MySqlConfigureRequest(String connectionUrl)
-
-
Method Detail
-
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 is4.- 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 ofmaxOpenConnections(int)and a negative value disables idle connections. If larger thanmaxOpenConnections(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
-
-