Interface CredentialsBaseOptions

All Superinterfaces:
software.amazon.jsii.JsiiSerializable
All Known Subinterfaces:
CredentialsFromUsernameOptions
All Known Implementing Classes:
CredentialsBaseOptions.Jsii$Proxy, CredentialsFromUsernameOptions.Jsii$Proxy

@Generated(value="jsii-pacmak/1.104.0 (build e79254c)", date="2024-12-17T21:37:37.990Z") @Stability(Stable) public interface CredentialsBaseOptions extends software.amazon.jsii.JsiiSerializable
Base options for creating Credentials.

Example:

 Vpc vpc;
 IInstanceEngine engine = DatabaseInstanceEngine.postgres(PostgresInstanceEngineProps.builder().version(PostgresEngineVersion.VER_16_3).build());
 Key myKey = new Key(this, "MyKey");
 DatabaseInstance.Builder.create(this, "InstanceWithCustomizedSecret")
         .engine(engine)
         .vpc(vpc)
         .credentials(Credentials.fromGeneratedSecret("postgres", CredentialsBaseOptions.builder()
                 .secretName("my-cool-name")
                 .encryptionKey(myKey)
                 .excludeCharacters("!&*^#@()")
                 .replicaRegions(List.of(ReplicaRegion.builder().region("eu-west-1").build(), ReplicaRegion.builder().region("eu-west-2").build()))
                 .build()))
         .build();
 
  • Method Details

    • getEncryptionKey

      @Stability(Stable) @Nullable default IKey getEncryptionKey()
      KMS encryption key to encrypt the generated secret.

      Default: - default master key

    • getExcludeCharacters

      @Stability(Stable) @Nullable default String getExcludeCharacters()
      The characters to exclude from the generated password.

      Has no effect if password has been provided.

      Default: - the DatabaseSecret default exclude character set (" %+~`#$invalid input: '&'*()|[]{}:;invalid input: '<'>?!'/@\"\\")

    • getReplicaRegions

      @Stability(Stable) @Nullable default List<ReplicaRegion> getReplicaRegions()
      A list of regions where to replicate this secret.

      Default: - Secret is not replicated

    • getSecretName

      @Stability(Stable) @Nullable default String getSecretName()
      The name of the secret.

      Default: - A name is generated by CloudFormation.

    • builder

      @Stability(Stable) static CredentialsBaseOptions.Builder builder()
      Returns:
      a CredentialsBaseOptions.Builder of CredentialsBaseOptions