Interface DatabaseSecretProps
- All Superinterfaces:
software.amazon.jsii.JsiiSerializable
- All Known Implementing Classes:
DatabaseSecretProps.Jsii$Proxy
@Generated(value="jsii-pacmak/1.116.0 (build 0eddcff)",
date="2025-10-24T13:34:35.170Z")
@Stability(Stable)
public interface DatabaseSecretProps
extends software.amazon.jsii.JsiiSerializable
Construction properties for a DatabaseSecret.
Example:
DatabaseCluster cluster;
DatabaseSecret myUserSecret = DatabaseSecret.Builder.create(this, "MyUserSecret")
.username("myuser")
.masterSecret(cluster.getSecret())
.build();
ISecret myUserSecretAttached = myUserSecret.attach(cluster); // Adds DB connections information in the secret
cluster.addRotationMultiUser("MyUser", RotationMultiUserOptions.builder() // Add rotation using the multi user scheme
.secret(myUserSecretAttached).build());
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic final classA builder forDatabaseSecretPropsstatic final classAn implementation forDatabaseSecretProps -
Method Summary
Modifier and TypeMethodDescriptionstatic DatabaseSecretProps.Builderbuilder()default IKeyThe KMS key to use to encrypt the secret.default StringCharacters to not include in the generated password.default ISecretThe master secret which will be used to rotate this secret.default StringThe physical name of the secret.The username.Methods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Method Details
-
getUsername
The username. -
getEncryptionKey
The KMS key to use to encrypt the secret.Default: default master key
-
getExcludeCharacters
Characters to not include in the generated password.Default: "\"@/"
-
getMasterSecret
The master secret which will be used to rotate this secret.Default: - no master secret information will be included
-
getSecretName
The physical name of the secret.Default: Secretsmanager will generate a physical name for the secret
-
builder
- Returns:
- a
DatabaseSecretProps.BuilderofDatabaseSecretProps
-