Class DatabaseSecret.Builder

java.lang.Object
software.amazon.awscdk.services.docdb.DatabaseSecret.Builder
All Implemented Interfaces:
software.amazon.jsii.Builder<DatabaseSecret>
Enclosing class:
DatabaseSecret

@Stability(Stable) public static final class DatabaseSecret.Builder extends Object implements software.amazon.jsii.Builder<DatabaseSecret>
A fluent builder for DatabaseSecret.
  • Method Details

    • create

      @Stability(Stable) public static DatabaseSecret.Builder create(software.constructs.Construct scope, String id)
      Parameters:
      scope - This parameter is required.
      id - This parameter is required.
      Returns:
      a new instance of DatabaseSecret.Builder.
    • username

      @Stability(Stable) public DatabaseSecret.Builder username(String username)
      The username.

      Parameters:
      username - The username. This parameter is required.
      Returns:
      this
    • encryptionKey

      @Stability(Stable) public DatabaseSecret.Builder encryptionKey(IKey encryptionKey)
      The KMS key to use to encrypt the secret.

      Default: default master key

      Parameters:
      encryptionKey - The KMS key to use to encrypt the secret. This parameter is required.
      Returns:
      this
    • excludeCharacters

      @Stability(Stable) public DatabaseSecret.Builder excludeCharacters(String excludeCharacters)
      Characters to not include in the generated password.

      Default: "\"

      Parameters:
      excludeCharacters - Characters to not include in the generated password. This parameter is required.
      Returns:
      this
    • masterSecret

      @Stability(Stable) public DatabaseSecret.Builder masterSecret(ISecret masterSecret)
      The master secret which will be used to rotate this secret.

      Default: - no master secret information will be included

      Parameters:
      masterSecret - The master secret which will be used to rotate this secret. This parameter is required.
      Returns:
      this
    • secretName

      @Stability(Stable) public DatabaseSecret.Builder secretName(String secretName)
      The physical name of the secret.

      Default: Secretsmanager will generate a physical name for the secret

      Parameters:
      secretName - The physical name of the secret. This parameter is required.
      Returns:
      this
    • build

      @Stability(Stable) public DatabaseSecret build()
      Specified by:
      build in interface software.amazon.jsii.Builder<DatabaseSecret>
      Returns:
      a newly built instance of DatabaseSecret.