java.lang.Object
software.amazon.jsii.JsiiObject
software.constructs.Construct
All Implemented Interfaces:
IResource, IUserGroup, 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.839Z") @Stability(Experimental) public class UserGroup extends UserGroupBase
(experimental) An ElastiCache UserGroup.

Example:

 NoPasswordUser newDefaultUser = NoPasswordUser.Builder.create(this, "NoPasswordUser")
         .userId("default")
         .accessControl(AccessControl.fromAccessString("on ~* +@all"))
         .build();
 UserGroup userGroup = UserGroup.Builder.create(this, "UserGroup")
         .users(List.of(newDefaultUser))
         .build();
 
  • Field Details

    • PROPERTY_INJECTION_ID

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

    • UserGroup

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

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

      @Stability(Experimental) public UserGroup(@NotNull software.constructs.Construct scope, @NotNull String id, @Nullable UserGroupProps props)
      Parameters:
      scope - This parameter is required.
      id - This parameter is required.
      props -
    • UserGroup

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

    • fromUserGroupArn

      @Stability(Experimental) @NotNull public static IUserGroup fromUserGroupArn(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull String userGroupArn)
      (experimental) Import an existing user group by ARN.

      Parameters:
      scope - The parent creating construct (usually this). This parameter is required.
      id - The construct's name. This parameter is required.
      userGroupArn - The ARN of the existing user group. This parameter is required.
    • fromUserGroupAttributes

      @Stability(Experimental) @NotNull public static IUserGroup fromUserGroupAttributes(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull UserGroupAttributes attrs)
      (experimental) Import an existing user group using attributes.

      Parameters:
      scope - The parent creating construct (usually this). This parameter is required.
      id - The construct's name. This parameter is required.
      attrs - A UserGroupAttributes object. This parameter is required.
    • fromUserGroupName

      @Stability(Experimental) @NotNull public static IUserGroup fromUserGroupName(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull String userGroupName)
      (experimental) Import an existing user group by name.

      Parameters:
      scope - The parent creating construct (usually this). This parameter is required.
      id - The construct's name. This parameter is required.
      userGroupName - The name of the existing user group. This parameter is required.
    • isUserGroup

      @Stability(Experimental) @NotNull public static Boolean isUserGroup(@NotNull Object x)
      (experimental) Return whether the given object is a UserGroup.

      Parameters:
      x - This parameter is required.
    • addUser

      @Stability(Experimental) public void addUser(@NotNull IUser user)
      (experimental) Add a user to this user group.

      Specified by:
      addUser in interface IUserGroup
      Overrides:
      addUser in class UserGroupBase
      Parameters:
      user - The user to add to the group. This parameter is required.
    • getUserGroupArn

      @Stability(Experimental) @NotNull public String getUserGroupArn()
      (experimental) The ARN of the user group.
      Specified by:
      getUserGroupArn in interface IUserGroup
      Specified by:
      getUserGroupArn in class UserGroupBase
    • getUserGroupName

      @Stability(Experimental) @NotNull public String getUserGroupName()
      (experimental) The name of the user group.
      Specified by:
      getUserGroupName in interface IUserGroup
      Specified by:
      getUserGroupName in class UserGroupBase
    • getUserGroupStatus

      @Stability(Experimental) @NotNull public String getUserGroupStatus()
      (experimental) The status of the user group Can be 'creating', 'active', 'modifying', 'deleting'.
    • getEngine

      @Stability(Experimental) @Nullable public UserEngine getEngine()
      (experimental) The engine type for the user group.
      Specified by:
      getEngine in interface IUserGroup
      Specified by:
      getEngine in class UserGroupBase
    • getUsers

      @Stability(Experimental) @Nullable public List<IUser> getUsers()
      (experimental) Array of users in the user group.

      Do not push directly to this array. Use addUser() instead to ensure proper validation and dependency management.

      Specified by:
      getUsers in interface IUserGroup
      Specified by:
      getUsers in class UserGroupBase