Class UserProps.Builder
java.lang.Object
software.amazon.awscdk.services.redshift.UserProps.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<UserProps>
- Enclosing interface:
UserProps
@Stability(Experimental)
public static final class UserProps.Builder
extends Object
implements software.amazon.jsii.Builder<UserProps>
A builder for
UserProps
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionSets the value ofDatabaseOptions.getAdminUser()
build()
Builds the configured instance.Sets the value ofDatabaseOptions.getCluster()
databaseName
(String databaseName) Sets the value ofDatabaseOptions.getDatabaseName()
encryptionKey
(IKey encryptionKey) Sets the value ofUserProps.getEncryptionKey()
removalPolicy
(RemovalPolicy removalPolicy) Sets the value ofUserProps.getRemovalPolicy()
Sets the value ofUserProps.getUsername()
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
encryptionKey
Sets the value ofUserProps.getEncryptionKey()
- Parameters:
encryptionKey
- KMS key to encrypt the generated secret.- Returns:
this
-
removalPolicy
Sets the value ofUserProps.getRemovalPolicy()
- Parameters:
removalPolicy
- The policy to apply when this resource is removed from the application.- Returns:
this
-
username
Sets the value ofUserProps.getUsername()
- Parameters:
username
- The name of the user. For valid values, see: https://docs.aws.amazon.com/redshift/latest/dg/r_names.html- Returns:
this
-
cluster
Sets the value ofDatabaseOptions.getCluster()
- Parameters:
cluster
- The cluster containing the database. This parameter is required.- Returns:
this
-
databaseName
Sets the value ofDatabaseOptions.getDatabaseName()
- Parameters:
databaseName
- The name of the database. This parameter is required.- Returns:
this
-
adminUser
Sets the value ofDatabaseOptions.getAdminUser()
- Parameters:
adminUser
- The secret containing credentials to a Redshift user with administrator privileges. Secret JSON schema:{ username: string; password: string }
.- Returns:
this
-
build
Builds the configured instance.- Specified by:
build
in interfacesoftware.amazon.jsii.Builder<UserProps>
- Returns:
- a new instance of
UserProps
- Throws:
NullPointerException
- if any required attribute was not provided
-