java.lang.Object
software.amazon.jsii.JsiiObject
software.constructs.Construct
software.amazon.awscdk.core.Construct
software.amazon.awscdk.services.redshift.User
All Implemented Interfaces:
IConstruct, IDependable, IUser, software.amazon.jsii.JsiiSerializable, software.constructs.IConstruct

@Generated(value="jsii-pacmak/1.84.0 (build 5404dcf)", date="2023-06-19T16:30:42.858Z") @Stability(Experimental) public class User extends Construct implements IUser
(experimental) A user in a Redshift cluster.

Example:

 User user = User.Builder.create(this, "User")
         .cluster(cluster)
         .databaseName("databaseName")
         .build();
 cluster.addRotationMultiUser("MultiUserRotation", RotationMultiUserOptions.builder()
         .secret(user.getSecret())
         .build());
 
  • Constructor Details

    • User

      protected User(software.amazon.jsii.JsiiObjectRef objRef)
    • User

      protected User(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
    • User

      @Stability(Experimental) public User(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull UserProps props)
      Parameters:
      scope - This parameter is required.
      id - This parameter is required.
      props - This parameter is required.
  • Method Details

    • fromUserAttributes

      @Stability(Experimental) @NotNull public static IUser fromUserAttributes(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull UserAttributes attrs)
      (experimental) Specify a Redshift user using credentials that already exist.

      Parameters:
      scope - This parameter is required.
      id - This parameter is required.
      attrs - This parameter is required.
    • addTablePrivileges

      @Stability(Experimental) public void addTablePrivileges(@NotNull ITable table, @NotNull @NotNull TableAction... actions)
      (experimental) Grant this user privilege to access a table.

      Specified by:
      addTablePrivileges in interface IUser
      Parameters:
      table - This parameter is required.
      actions - This parameter is required.
    • applyRemovalPolicy

      @Stability(Experimental) public void applyRemovalPolicy(@NotNull RemovalPolicy policy)
      (experimental) Apply the given removal policy to this resource.

      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.

      Parameters:
      policy - This parameter is required.
    • getCluster

      @Stability(Experimental) @NotNull public ICluster getCluster()
      (experimental) The cluster where the table is located.
      Specified by:
      getCluster in interface IUser
    • getDatabaseName

      @Stability(Experimental) @NotNull public String getDatabaseName()
      (experimental) The name of the database where the table is located.
      Specified by:
      getDatabaseName in interface IUser
    • getPassword

      @Stability(Experimental) @NotNull public SecretValue getPassword()
      (experimental) The password of the user.
      Specified by:
      getPassword in interface IUser
    • getSecret

      @Stability(Experimental) @NotNull public ISecret getSecret()
      (experimental) The Secrets Manager secret of the user.
    • getUsername

      @Stability(Experimental) @NotNull public String getUsername()
      (experimental) The name of the user.
      Specified by:
      getUsername in interface IUser
    • getDatabaseProps

      @Stability(Experimental) @NotNull protected DatabaseOptions getDatabaseProps()
    • setDatabaseProps

      @Stability(Experimental) protected void setDatabaseProps(@NotNull DatabaseOptions value)