Class DatabaseSecretProps.Builder
java.lang.Object
software.amazon.awscdk.services.docdb.DatabaseSecretProps.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<DatabaseSecretProps>
- Enclosing interface:
DatabaseSecretProps
@Stability(Stable)
public static final class DatabaseSecretProps.Builder
extends Object
implements software.amazon.jsii.Builder<DatabaseSecretProps>
A builder for
DatabaseSecretProps
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
Builds the configured instance.encryptionKey
(IKey encryptionKey) Sets the value ofDatabaseSecretProps.getEncryptionKey()
excludeCharacters
(String excludeCharacters) Sets the value ofDatabaseSecretProps.getExcludeCharacters()
masterSecret
(ISecret masterSecret) Sets the value ofDatabaseSecretProps.getMasterSecret()
secretName
(String secretName) Sets the value ofDatabaseSecretProps.getSecretName()
Sets the value ofDatabaseSecretProps.getUsername()
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
username
Sets the value ofDatabaseSecretProps.getUsername()
- Parameters:
username
- The username. This parameter is required.- Returns:
this
-
encryptionKey
Sets the value ofDatabaseSecretProps.getEncryptionKey()
- Parameters:
encryptionKey
- The KMS key to use to encrypt the secret.- Returns:
this
-
excludeCharacters
Sets the value ofDatabaseSecretProps.getExcludeCharacters()
- Parameters:
excludeCharacters
- Characters to not include in the generated password.- Returns:
this
-
masterSecret
Sets the value ofDatabaseSecretProps.getMasterSecret()
- Parameters:
masterSecret
- The master secret which will be used to rotate this secret.- Returns:
this
-
secretName
Sets the value ofDatabaseSecretProps.getSecretName()
- Parameters:
secretName
- The physical name of the secret.- Returns:
this
-
build
Builds the configured instance.- Specified by:
build
in interfacesoftware.amazon.jsii.Builder<DatabaseSecretProps>
- Returns:
- a new instance of
DatabaseSecretProps
- Throws:
NullPointerException
- if any required attribute was not provided
-