java.lang.Object
software.amazon.jsii.JsiiObject
software.constructs.Construct
software.amazon.awscdk.Resource
software.amazon.awscdk.services.elasticache.alpha.UserBase
software.amazon.awscdk.services.elasticache.alpha.IamUser
All Implemented Interfaces:
IResource, IUser, software.amazon.jsii.JsiiSerializable, software.constructs.IConstruct, software.constructs.IDependable

@Generated(value="jsii-pacmak/1.113.0 (build fc68b25)", date="2025-10-01T17:47:05.831Z") @Stability(Experimental) public class IamUser extends UserBase
(experimental) Define an ElastiCache user with IAM authentication.

Example:

 IamUser user = IamUser.Builder.create(this, "User")
         // set user engine
         .engine(UserEngine.REDIS)
         // set user id
         .userId("my-user")
         // set username
         .userName("my-user")
         // set access string
         .accessControl(AccessControl.fromAccessString("on ~* +@all"))
         .build();
 
  • Field Details

    • PROPERTY_INJECTION_ID

      @Stability(Experimental) public static final String PROPERTY_INJECTION_ID
      (experimental) Uniquely identifies this class.
  • Constructor Details

    • IamUser

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

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

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

    • isIamUser

      @Stability(Experimental) @NotNull public static Boolean isIamUser(@NotNull Object x)
      (experimental) Return whether the given object is an IamUser.

      Parameters:
      x - This parameter is required.
    • grant

      @Stability(Experimental) @NotNull public Grant grant(@NotNull IGrantable grantee, @NotNull String... actions)
      (experimental) Grant the given identity custom permissions.

      Parameters:
      grantee - The IAM identity to grant permissions to. This parameter is required.
      actions - The actions to grant. This parameter is required.
    • grantConnect

      @Stability(Experimental) @NotNull public Grant grantConnect(@NotNull IGrantable grantee)
      (experimental) Grant connect permissions to the given IAM identity.

      Parameters:
      grantee - The IAM identity to grant permissions to. This parameter is required.
    • getAccessString

      @Stability(Experimental) @NotNull public String getAccessString()
      (experimental) The access string that defines the user's permissions.
    • getUserArn

      @Stability(Experimental) @NotNull public String getUserArn()
      (experimental) The user's ARN.
      Specified by:
      getUserArn in interface IUser
      Specified by:
      getUserArn in class UserBase
    • getUserId

      @Stability(Experimental) @NotNull public String getUserId()
      (experimental) The user's ID.
      Specified by:
      getUserId in interface IUser
      Specified by:
      getUserId in class UserBase
    • getUserStatus

      @Stability(Experimental) @NotNull public String getUserStatus()
      (experimental) The user's status.

      Can be 'active', 'modifying', 'deleting'.

    • getEngine

      @Stability(Experimental) @Nullable public UserEngine getEngine()
      (experimental) The engine for the user.
      Specified by:
      getEngine in interface IUser
      Specified by:
      getEngine in class UserBase
    • getUserName

      @Stability(Experimental) @Nullable public String getUserName()
      (experimental) The user's name.

      For IAM authentication userName must be equal to userId.

      Specified by:
      getUserName in interface IUser
      Specified by:
      getUserName in class UserBase