@aws-cdk_aws-redshift-alpha.UserAttributes

interface UserAttributes ๐Ÿ”น

LanguageType name
.NETAmazon.CDK.AWS.Redshift.Alpha.UserAttributes
Gogithub.com/aws/aws-cdk-go/awscdkredshiftalpha/v2#UserAttributes
Javasoftware.amazon.awscdk.services.redshift.alpha.UserAttributes
Pythonaws_cdk.aws_redshift_alpha.UserAttributes
TypeScript (source)@aws-cdk/aws-redshift-alpha ยป UserAttributes

A full specification of a Redshift user that can be used to import it fluently into the CDK application.

Example

const databaseName = 'databaseName';
const username = 'myuser'
const tableName = 'mytable'

const user = User.fromUserAttributes(this, 'User', {
  username: username,
  password: SecretValue.unsafePlainText('NOT_FOR_PRODUCTION'),
  cluster: cluster,
  databaseName: databaseName,
});
const table = Table.fromTableAttributes(this, 'Table', {
  tableName: tableName,
  tableColumns: [{ name: 'col1', dataType: 'varchar(4)' }, { name: 'col2', dataType: 'float' }],
  cluster: cluster,
  databaseName: 'databaseName',
});
table.grant(user, TableAction.INSERT);

Properties

NameTypeDescription
cluster๐Ÿ”นIClusterThe cluster containing the database.
databaseName๐Ÿ”นstringThe name of the database.
password๐Ÿ”นSecretValueThe password of the user.
username๐Ÿ”นstringThe name of the user.
adminUser?๐Ÿ”นISecretThe secret containing credentials to a Redshift user with administrator privileges.

cluster๐Ÿ”น

Type: ICluster

The cluster containing the database.


databaseName๐Ÿ”น

Type: string

The name of the database.


password๐Ÿ”น

Type: SecretValue

The password of the user.

Do not put passwords in CDK code directly.


username๐Ÿ”น

Type: string

The name of the user.


adminUser?๐Ÿ”น

Type: ISecret (optional, default: the admin secret is taken from the cluster)

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

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