@Generated(value="jsii-pacmak/1.63.2 (build a8a8833)", date="2022-08-02T20:25:33.033Z") public class User extends Construct implements IUser
Example:
User user = User.Builder.create(this, "User") .cluster(cluster) .databaseName("databaseName") .build(); cluster.addRotationMultiUser("MultiUserRotation", RotationMultiUserOptions.builder() .secret(user.getSecret()) .build());
Modifier and Type | Class and Description |
---|---|
static class |
User.Builder
(experimental) A fluent builder for
User . |
IUser.Jsii$Default, IUser.Jsii$Proxy
Modifier | Constructor and Description |
---|---|
protected |
User(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) |
protected |
User(software.amazon.jsii.JsiiObjectRef objRef) |
|
User(software.constructs.Construct scope,
java.lang.String id,
UserProps props) |
Modifier and Type | Method and Description |
---|---|
void |
addTablePrivileges(ITable table,
TableAction... actions)
(experimental) Grant this user privilege to access a table.
|
void |
applyRemovalPolicy(RemovalPolicy policy)
(experimental) Apply the given removal policy to this resource.
|
static IUser |
fromUserAttributes(software.constructs.Construct scope,
java.lang.String id,
UserAttributes attrs)
(experimental) Specify a Redshift user using credentials that already exist.
|
ICluster |
getCluster()
(experimental) The cluster where the table is located.
|
java.lang.String |
getDatabaseName()
(experimental) The name of the database where the table is located.
|
protected DatabaseOptions |
getDatabaseProps() |
SecretValue |
getPassword()
(experimental) The password of the user.
|
ISecret |
getSecret()
(experimental) The Secrets Manager secret of the user.
|
java.lang.String |
getUsername()
(experimental) The name of the user.
|
protected void |
setDatabaseProps(DatabaseOptions value) |
getNode, isConstruct, onPrepare, onSynthesize, onValidate, prepare, synthesize, validate
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getNode
protected User(software.amazon.jsii.JsiiObjectRef objRef)
protected User(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
public User(software.constructs.Construct scope, java.lang.String id, UserProps props)
scope
- This parameter is required.id
- This parameter is required.props
- This parameter is required.public static IUser fromUserAttributes(software.constructs.Construct scope, java.lang.String id, UserAttributes attrs)
scope
- This parameter is required.id
- This parameter is required.attrs
- This parameter is required.public void addTablePrivileges(ITable table, TableAction... actions)
addTablePrivileges
in interface IUser
table
- This parameter is required.actions
- This parameter is required.public void applyRemovalPolicy(RemovalPolicy policy)
The Removal Policy controls what happens to this resource when it stops being managed by CloudFormation, either because you've removed it from the CDK application or because you've made a change that requires the resource to be replaced.
The resource can be destroyed (RemovalPolicy.DESTROY
), or left in your AWS
account for data recovery and cleanup later (RemovalPolicy.RETAIN
).
This resource is destroyed by default.
policy
- This parameter is required.public ICluster getCluster()
getCluster
in interface IUser
public java.lang.String getDatabaseName()
getDatabaseName
in interface IUser
public SecretValue getPassword()
getPassword
in interface IUser
public ISecret getSecret()
public java.lang.String getUsername()
getUsername
in interface IUser
protected DatabaseOptions getDatabaseProps()
protected void setDatabaseProps(DatabaseOptions value)