Class DatabaseSecret.Builder
java.lang.Object
software.amazon.awscdk.services.docdb.DatabaseSecret.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<DatabaseSecret>
- Enclosing class:
DatabaseSecret
@Stability(Stable)
public static final class DatabaseSecret.Builder
extends Object
implements software.amazon.jsii.Builder<DatabaseSecret>
A fluent builder for
DatabaseSecret
.-
Method Summary
Modifier and TypeMethodDescriptionbuild()
static DatabaseSecret.Builder
encryptionKey
(IKey encryptionKey) The KMS key to use to encrypt the secret.excludeCharacters
(String excludeCharacters) Characters to not include in the generated password.masterSecret
(ISecret masterSecret) The master secret which will be used to rotate this secret.secretName
(String secretName) The physical name of the secret.The username.
-
Method Details
-
create
@Stability(Stable) public static DatabaseSecret.Builder create(software.constructs.Construct scope, String id) - Parameters:
scope
- This parameter is required.id
- This parameter is required.- Returns:
- a new instance of
DatabaseSecret.Builder
.
-
username
The username.- Parameters:
username
- The username. This parameter is required.- Returns:
this
-
encryptionKey
The KMS key to use to encrypt the secret.Default: default master key
- Parameters:
encryptionKey
- The KMS key to use to encrypt the secret. This parameter is required.- Returns:
this
-
excludeCharacters
Characters to not include in the generated password.Default: "\"
- Parameters:
excludeCharacters
- Characters to not include in the generated password. This parameter is required.- Returns:
this
-
masterSecret
The master secret which will be used to rotate this secret.Default: - no master secret information will be included
- Parameters:
masterSecret
- The master secret which will be used to rotate this secret. This parameter is required.- Returns:
this
-
secretName
The physical name of the secret.Default: Secretsmanager will generate a physical name for the secret
- Parameters:
secretName
- The physical name of the secret. This parameter is required.- Returns:
this
-
build
- Specified by:
build
in interfacesoftware.amazon.jsii.Builder<DatabaseSecret>
- Returns:
- a newly built instance of
DatabaseSecret
.
-