Interface IDatabaseSecretProps
Construction properties for a DatabaseSecret.
Namespace: Amazon.CDK.AWS.DocDB
Assembly: Amazon.CDK.AWS.DocDB.dll
Syntax (csharp)
public interface IDatabaseSecretProps
Syntax (vb)
Public Interface 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
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. |
Properties
EncryptionKey
The KMS key to use to encrypt the secret.
virtual IKey EncryptionKey { get; }
Property Value
Remarks
Default: default master key
ExcludeCharacters
Characters to not include in the generated password.
virtual string ExcludeCharacters { get; }
Property Value
System.String
Remarks
Default: ""
: /"
MasterSecret
The master secret which will be used to rotate this secret.
virtual ISecret MasterSecret { get; }
Property Value
Remarks
Default: - no master secret information will be included
SecretName
The physical name of the secret.
virtual string SecretName { get; }
Property Value
System.String
Remarks
Default: Secretsmanager will generate a physical name for the secret
Username
The username.
string Username { get; }
Property Value
System.String