-
Notifications
You must be signed in to change notification settings - Fork 17
/
DatabaseSecretProps.go
44 lines (41 loc) · 1.56 KB
/
DatabaseSecretProps.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
package awsdocdb
import (
"github.com/aws/aws-cdk-go/awscdk/v2/awskms"
"github.com/aws/aws-cdk-go/awscdk/v2/awssecretsmanager"
)
// Construction properties for a DatabaseSecret.
//
// Example:
// var cluster databaseCluster
//
// myUserSecret := docdb.NewDatabaseSecret(this, jsii.String("MyUserSecret"), &DatabaseSecretProps{
// Username: jsii.String("myuser"),
// MasterSecret: cluster.Secret,
// })
// myUserSecretAttached := myUserSecret.attach(cluster) // Adds DB connections information in the secret
//
// cluster.AddRotationMultiUser(jsii.String("MyUser"), &RotationMultiUserOptions{
// // Add rotation using the multi user scheme
// Secret: myUserSecretAttached,
// })
//
type DatabaseSecretProps struct {
// The username.
Username *string `field:"required" json:"username" yaml:"username"`
// The KMS key to use to encrypt the secret.
// Default: default master key.
//
EncryptionKey awskms.IKey `field:"optional" json:"encryptionKey" yaml:"encryptionKey"`
// Characters to not include in the generated password.
// Default: "\"@/".
//
ExcludeCharacters *string `field:"optional" json:"excludeCharacters" yaml:"excludeCharacters"`
// The master secret which will be used to rotate this secret.
// Default: - no master secret information will be included.
//
MasterSecret awssecretsmanager.ISecret `field:"optional" json:"masterSecret" yaml:"masterSecret"`
// The physical name of the secret.
// Default: Secretsmanager will generate a physical name for the secret.
//
SecretName *string `field:"optional" json:"secretName" yaml:"secretName"`
}