Interface UserAttributes
- All Superinterfaces:
DatabaseOptions,software.amazon.jsii.JsiiSerializable
- All Known Implementing Classes:
UserAttributes.Jsii$Proxy
@Generated(value="jsii-pacmak/1.116.0 (build 0eddcff)",
date="2025-10-24T13:34:50.385Z")
@Stability(Experimental)
public interface UserAttributes
extends software.amazon.jsii.JsiiSerializable, DatabaseOptions
(experimental) A full specification of a Redshift user that can be used to import it fluently into the CDK application.
Example:
String databaseName = "databaseName";
String username = "myuser";
String tableName = "mytable";
IUser user = User.fromUserAttributes(this, "User", UserAttributes.builder()
.username(username)
.password(SecretValue.unsafePlainText("NOT_FOR_PRODUCTION"))
.cluster(cluster)
.databaseName(databaseName)
.build());
ITable table = Table.fromTableAttributes(this, "Table", TableAttributes.builder()
.tableName(tableName)
.tableColumns(List.of(Column.builder().name("col1").dataType("varchar(4)").build(), Column.builder().name("col2").dataType("float").build()))
.cluster(cluster)
.databaseName("databaseName")
.build());
table.grant(user, TableAction.INSERT);
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic final classA builder forUserAttributesstatic final classAn implementation forUserAttributes -
Method Summary
Modifier and TypeMethodDescriptionstatic UserAttributes.Builderbuilder()(experimental) The password of the user.(experimental) The name of the user.Methods inherited from interface software.amazon.awscdk.services.redshift.alpha.DatabaseOptions
getAdminUser, getCluster, getDatabaseNameMethods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Method Details
-
getPassword
(experimental) The password of the user.Do not put passwords in CDK code directly.
-
getUsername
(experimental) The name of the user. -
builder
- Returns:
- a
UserAttributes.BuilderofUserAttributes
-