Class DbConfigure.Request<T extends DbConfigure.Request<T>>

Type Parameters:
T - type of the subclass of this class
All Implemented Interfaces:
ApiRequest<T>
Direct Known Subclasses:
MySqlConfigureRequest, OracleConfigureRequest
Enclosing class:
DbConfigure

public abstract static class DbConfigure.Request<T extends DbConfigure.Request<T>> extends VaultRequest<T>
Request object. Can be configured with additional headers, query parameters etc.
  • Constructor Details

    • Request

      protected Request(String pluginName)
      Create a new request with the defined plugin name.
      Parameters:
      pluginName - name of the database plugin
  • Method Details

    • username

      public T username(String username)
      Specifies the name of the user to use as the "root" user when connecting to the database. This "root" user is used to create/update/delete users managed by these plugins, so you will need to ensure that this user has permissions to manipulate users appropriate to the database. This is typically used in the connection_url field via the templating directive {{username}} or {{name}}.
      Parameters:
      username - user
      Returns:
      updated request
    • password

      public T password(String password)
      Specifies the password to use when connecting with the username. This value will not be returned by Vault when performing a read upon the configuration. This is typically used in the connection_url field via the templating directive {{password}}.
      Parameters:
      password - password
      Returns:
      updated request
    • verifyConnection

      public T verifyConnection(boolean verify)
      Specifies if the connection is verified during initial configuration. Defaults to true.
      Parameters:
      verify - whether to verify connections
      Returns:
      updated request
    • addAllowedRole

      public T addAllowedRole(String role)
      List of the roles allowed to use this connection. Defaults to empty (no roles), if contains a "*" any role can use this connection.
      Parameters:
      role - role name
      Returns:
      updated request
    • addRootRotationStatement

      public T addRootRotationStatement(String statement)
      Specifies the database statements to be executed to rotate the root user's credentials. See the plugin's API page for more information on support and formatting for this parameter.
      Parameters:
      statement - statement to add
      Returns:
      updated request
    • passwordPolicy

      public T passwordPolicy(String policy)
      The name of the password policy to use when generating passwords for this database. If not specified, this will use a default policy defined as: 20 characters with at least 1 uppercase, 1 lowercase, 1 number, and 1 dash character.

      Password policy docs: password policies

      Parameters:
      policy - password policy to use
      Returns:
      updated request
    • name

      public T name(String name)
      Name of the credentials.
      Parameters:
      name - the name
      Returns:
      updated request