Skip to content
v2.277.0

Experimental

@aws-cdk/aws-redshift-alpha is an experimental (alpha) package: its API may change in any release, without a major version bump.

UserProps Struct ​

Properties for configuring a Redshift user.

Example ​

ts

const user = new User(this, 'User', {
  cluster: cluster,
  databaseName: 'databaseName',
});
cluster.addRotationMultiUser('MultiUserRotation', {
  secret: user.secret,
});
python
user = User(self, "User",
    cluster=cluster,
    database_name="databaseName"
)
cluster.add_rotation_multi_user("MultiUserRotation",
    secret=user.secret
)
java
User user = User.Builder.create(this, "User")
        .cluster(cluster)
        .databaseName("databaseName")
        .build();
cluster.addRotationMultiUser("MultiUserRotation", RotationMultiUserOptions.builder()
        .secret(user.getSecret())
        .build());
csharp
// Install: dotnet add package Amazon.CDK.AWS.Redshift.Alpha
var user = new User(this, "User", new UserProps {
    Cluster = cluster,
    DatabaseName = "databaseName"
});
cluster.AddRotationMultiUser("MultiUserRotation", new RotationMultiUserOptions {
    Secret = user.Secret
});
go
// Install: go get github.com/aws/aws-cdk-go/awscdkredshiftalpha/v2
user := awscdkredshiftalpha.NewUser(this, jsii.String("User"), &UserProps{
	Cluster: cluster,
	DatabaseName: jsii.String("databaseName"),
})
cluster.AddRotationMultiUser(jsii.String("MultiUserRotation"), &RotationMultiUserOptions{
	Secret: user.Secret,
})

Properties ​

adminUseroptionalISecretadmin_useroptionalISecretadminUseroptionalISecretAdminUseroptionalISecretAdminUseroptionalISecret #
The secret containing credentials to a Redshift user with administrator privileges.

Default: the admin secret is taken from the cluster

Secret JSON schema: { username: string; password: string }.

clusterIClusterclusterIClusterclusterIClusterClusterIClusterClusterICluster required #
The cluster containing the database.
databaseNamestringdatabase_namestrdatabaseNameStringDatabaseNamestringDatabaseName*string required #
The name of the database.
encryptionKeyoptionalIKeyencryption_keyoptionalIKeyencryptionKeyoptionalIKeyEncryptionKeyoptionalIKeyEncryptionKeyoptionalIKey #
KMS key to encrypt the generated secret.

Default: the default AWS managed key is used

excludeCharactersoptionalstringexclude_charactersoptionalstrexcludeCharactersoptionalStringExcludeCharactersoptionalstringExcludeCharactersoptional*string #
Characters to not include in the generated password.

Default: '"@/\\ ''

removalPolicyoptionalRemovalPolicyremoval_policyoptionalRemovalPolicyremovalPolicyoptionalRemovalPolicyRemovalPolicyoptionalRemovalPolicyRemovalPolicyoptionalRemovalPolicy = cdk.RemovalPolicy.Destroy #
The policy to apply when this resource is removed from the application.
usernameoptionalstringusernameoptionalstrusernameoptionalStringUsernameoptionalstringUsernameoptional*string #
The name of the user.