Class UserAttributes
(experimental) A full specification of a Redshift user that can be used to import it fluently into the CDK application.
Inheritance
Namespace: Amazon.CDK.AWS.Redshift
Assembly: Amazon.CDK.AWS.Redshift.dll
Syntax (csharp)
public class UserAttributes : Object, IUserAttributes, IDatabaseOptions
Syntax (vb)
Public Class UserAttributes
Inherits Object
Implements IUserAttributes, IDatabaseOptions
Remarks
Stability: Experimental
ExampleMetadata: fixture=cluster infused
Examples
var databaseName = "databaseName";
var username = "myuser";
var tableName = "mytable";
var user = User.FromUserAttributes(this, "User", new UserAttributes {
Username = username,
Password = SecretValue.UnsafePlainText("NOT_FOR_PRODUCTION"),
Cluster = cluster,
DatabaseName = databaseName
});
var table = Table.FromTableAttributes(this, "Table", new TableAttributes {
TableName = tableName,
TableColumns = new [] { new Column { Name = "col1", DataType = "varchar(4)" }, new Column { Name = "col2", DataType = "float" } },
Cluster = cluster,
DatabaseName = "databaseName"
});
table.Grant(user, TableAction.INSERT);
Synopsis
Constructors
UserAttributes() |
Properties
AdminUser | (experimental) The secret containing credentials to a Redshift user with administrator privileges. |
Cluster | (experimental) The cluster containing the database. |
DatabaseName | (experimental) The name of the database. |
Password | (experimental) The password of the user. |
Username | (experimental) The name of the user. |
Constructors
UserAttributes()
public UserAttributes()
Properties
AdminUser
(experimental) The secret containing credentials to a Redshift user with administrator privileges.
public ISecret AdminUser { get; set; }
Property Value
Remarks
Secret JSON schema: { username: string; password: string }
.
Default: - the admin secret is taken from the cluster
Stability: Experimental
Cluster
(experimental) The cluster containing the database.
public ICluster Cluster { get; set; }
Property Value
Remarks
Stability: Experimental
DatabaseName
(experimental) The name of the database.
public string DatabaseName { get; set; }
Property Value
System.String
Remarks
Stability: Experimental
Password
(experimental) The password of the user.
public SecretValue Password { get; set; }
Property Value
Remarks
Do not put passwords in CDK code directly.
Stability: Experimental
Username
(experimental) The name of the user.
public string Username { get; set; }
Property Value
System.String
Remarks
Stability: Experimental