Class DatabaseSecret
A database secret.
Inherited Members
Namespace: Amazon.CDK.AWS.DocDB
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public class DatabaseSecret : Secret, ISecret, IResource
Syntax (vb)
Public Class DatabaseSecret
Inherits Secret
Implements ISecret, IResource
Remarks
Resource: AWS::SecretsManager::Secret
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
DatabaseSecret(ByRefValue) | Used by jsii to construct an instance of this class from a Javascript-owned object reference |
DatabaseSecret(DeputyBase.DeputyProps) | Used by jsii to construct an instance of this class from DeputyProps |
DatabaseSecret(Construct, String, IDatabaseSecretProps) |
Constructors
DatabaseSecret(ByRefValue)
Used by jsii to construct an instance of this class from a Javascript-owned object reference
protected DatabaseSecret(ByRefValue reference)
Parameters
- reference Amazon.JSII.Runtime.Deputy.ByRefValue
The Javascript-owned object reference
DatabaseSecret(DeputyBase.DeputyProps)
Used by jsii to construct an instance of this class from DeputyProps
protected DatabaseSecret(DeputyBase.DeputyProps props)
Parameters
- props Amazon.JSII.Runtime.Deputy.DeputyBase.DeputyProps
The deputy props
DatabaseSecret(Construct, String, IDatabaseSecretProps)
public DatabaseSecret(Construct scope, string id, IDatabaseSecretProps props)
Parameters
- scope Constructs.Construct
- id System.String
- props IDatabaseSecretProps
Implements
Constructs.IConstruct
Constructs.IDependable