Interface UserAttributes

All Superinterfaces:
DatabaseOptions, software.amazon.jsii.JsiiSerializable
All Known Implementing Classes:
UserAttributes.Jsii$Proxy

@Generated(value="jsii-pacmak/1.104.0 (build e79254c)", date="2024-11-22T02:24:11.843Z") @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);
 
  • Method Details

    • getPassword

      @Stability(Experimental) @NotNull SecretValue getPassword()
      (experimental) The password of the user.

      Do not put passwords in CDK code directly.

    • getUsername

      @Stability(Experimental) @NotNull String getUsername()
      (experimental) The name of the user.
    • builder

      @Stability(Experimental) static UserAttributes.Builder builder()
      Returns:
      a UserAttributes.Builder of UserAttributes