Class CredentialsFromUsernameOptions.Builder
java.lang.Object
software.amazon.awscdk.services.rds.CredentialsFromUsernameOptions.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<CredentialsFromUsernameOptions>
- Enclosing interface:
CredentialsFromUsernameOptions
@Stability(Stable)
public static final class CredentialsFromUsernameOptions.Builder
extends Object
implements software.amazon.jsii.Builder<CredentialsFromUsernameOptions>
A builder for
CredentialsFromUsernameOptions
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
Builds the configured instance.encryptionKey
(IKey encryptionKey) Sets the value ofCredentialsBaseOptions.getEncryptionKey()
excludeCharacters
(String excludeCharacters) Sets the value ofCredentialsBaseOptions.getExcludeCharacters()
password
(SecretValue password) Sets the value ofCredentialsFromUsernameOptions.getPassword()
replicaRegions
(List<? extends ReplicaRegion> replicaRegions) Sets the value ofCredentialsBaseOptions.getReplicaRegions()
secretName
(String secretName) Sets the value ofCredentialsBaseOptions.getSecretName()
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
password
Sets the value ofCredentialsFromUsernameOptions.getPassword()
- Parameters:
password
- Password. Do not put passwords in your CDK code directly.- Returns:
this
-
encryptionKey
Sets the value ofCredentialsBaseOptions.getEncryptionKey()
- Parameters:
encryptionKey
- KMS encryption key to encrypt the generated secret.- Returns:
this
-
excludeCharacters
@Stability(Stable) public CredentialsFromUsernameOptions.Builder excludeCharacters(String excludeCharacters) Sets the value ofCredentialsBaseOptions.getExcludeCharacters()
- Parameters:
excludeCharacters
- The characters to exclude from the generated password. Has no effect ifpassword
has been provided.- Returns:
this
-
replicaRegions
@Stability(Stable) public CredentialsFromUsernameOptions.Builder replicaRegions(List<? extends ReplicaRegion> replicaRegions) Sets the value ofCredentialsBaseOptions.getReplicaRegions()
- Parameters:
replicaRegions
- A list of regions where to replicate this secret.- Returns:
this
-
secretName
Sets the value ofCredentialsBaseOptions.getSecretName()
- Parameters:
secretName
- The name of the secret.- Returns:
this
-
build
Builds the configured instance.- Specified by:
build
in interfacesoftware.amazon.jsii.Builder<CredentialsFromUsernameOptions>
- Returns:
- a new instance of
CredentialsFromUsernameOptions
- Throws:
NullPointerException
- if any required attribute was not provided
-