Class DatabaseSecret

java.lang.Object
software.amazon.jsii.JsiiObject
software.constructs.Construct
All Implemented Interfaces:
IConstruct, IDependable, IResource, ISecret, software.amazon.jsii.JsiiSerializable, software.constructs.IConstruct

@Generated(value="jsii-pacmak/1.84.0 (build 5404dcf)", date="2023-06-19T16:30:41.916Z") @Stability(Stable) public class DatabaseSecret extends Secret
A database secret.

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());
 
  • Constructor Details

    • DatabaseSecret

      protected DatabaseSecret(software.amazon.jsii.JsiiObjectRef objRef)
    • DatabaseSecret

      protected DatabaseSecret(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
    • DatabaseSecret

      @Stability(Stable) public DatabaseSecret(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull DatabaseSecretProps props)
      Parameters:
      scope - This parameter is required.
      id - This parameter is required.
      props - This parameter is required.