Class DatabaseSecretProps.Builder
java.lang.Object
software.amazon.awscdk.services.rds.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
Constructors -
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()replaceOnPasswordCriteriaChanges(Boolean replaceOnPasswordCriteriaChanges) Sets the value ofDatabaseSecretProps.getReplaceOnPasswordCriteriaChanges()replicaRegions(List<? extends ReplicaRegion> replicaRegions) Sets the value ofDatabaseSecretProps.getReplicaRegions()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
-
replaceOnPasswordCriteriaChanges
@Stability(Stable) public DatabaseSecretProps.Builder replaceOnPasswordCriteriaChanges(Boolean replaceOnPasswordCriteriaChanges) Sets the value ofDatabaseSecretProps.getReplaceOnPasswordCriteriaChanges()- Parameters:
replaceOnPasswordCriteriaChanges- Whether to replace this secret when the criteria for the password change. This is achieved by overriding the logical id of the AWS::SecretsManager::Secret with a hash of the options that influence the password generation. This way a new secret will be created when the password is regenerated and the cluster or instance consuming this secret will have its credentials updated.- Returns:
this
-
replicaRegions
@Stability(Stable) public DatabaseSecretProps.Builder replicaRegions(List<? extends ReplicaRegion> replicaRegions) Sets the value ofDatabaseSecretProps.getReplicaRegions()- Parameters:
replicaRegions- A list of regions where to replicate this secret.- Returns:
this
-
secretName
Sets the value ofDatabaseSecretProps.getSecretName()- Parameters:
secretName- A name for the secret.- Returns:
this
-
build
Builds the configured instance.- Specified by:
buildin interfacesoftware.amazon.jsii.Builder<DatabaseSecretProps>- Returns:
- a new instance of
DatabaseSecretProps - Throws:
NullPointerException- if any required attribute was not provided
-