Class DatabaseSecretProps
Construction properties for a DatabaseSecret.
Inheritance
System.Object
DatabaseSecretProps
Implements
Namespace: Amazon.CDK.AWS.DocDB
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public class DatabaseSecretProps : Object, IDatabaseSecretProps
Syntax (vb)
Public Class DatabaseSecretProps
Inherits Object
Implements IDatabaseSecretProps
Remarks
ExampleMetadata: infused
Examples
DatabaseCluster cluster;
var myUserSecret = new DatabaseSecret(this, "MyUserSecret", new DatabaseSecretProps {
Username = "myuser",
MasterSecret = cluster.Secret
});
var myUserSecretAttached = myUserSecret.Attach(cluster); // Adds DB connections information in the secret
cluster.AddRotationMultiUser("MyUser", new RotationMultiUserOptions { // Add rotation using the multi user scheme
Secret = myUserSecretAttached });
Synopsis
Constructors
DatabaseSecretProps() |
Properties
EncryptionKey | The KMS key to use to encrypt the secret. |
ExcludeCharacters | Characters to not include in the generated password. |
MasterSecret | The master secret which will be used to rotate this secret. |
SecretName | The physical name of the secret. |
Username | The username. |
Constructors
DatabaseSecretProps()
public DatabaseSecretProps()
Properties
EncryptionKey
The KMS key to use to encrypt the secret.
public IKey EncryptionKey { get; set; }
Property Value
Remarks
Default: default master key
ExcludeCharacters
Characters to not include in the generated password.
public string ExcludeCharacters { get; set; }
Property Value
System.String
Remarks
Default: ""@/"
MasterSecret
The master secret which will be used to rotate this secret.
public ISecret MasterSecret { get; set; }
Property Value
Remarks
Default: - no master secret information will be included
SecretName
The physical name of the secret.
public string SecretName { get; set; }
Property Value
System.String
Remarks
Default: Secretsmanager will generate a physical name for the secret
Username
The username.
public string Username { get; set; }
Property Value
System.String