Interface UserPoolGroupOptions

All Superinterfaces:
software.amazon.jsii.JsiiSerializable
All Known Subinterfaces:
UserPoolGroupProps
All Known Implementing Classes:
UserPoolGroupOptions.Jsii$Proxy, UserPoolGroupProps.Jsii$Proxy

@Generated(value="jsii-pacmak/1.109.0 (build c221850)", date="2025-03-14T03:24:55.709Z") @Stability(Stable) public interface UserPoolGroupOptions extends software.amazon.jsii.JsiiSerializable
Options to create a UserPoolGroup.

Example:

 UserPool userPool;
 Role role;
 UserPoolGroup.Builder.create(this, "UserPoolGroup")
         .userPool(userPool)
         .groupName("my-group-name")
         .precedence(1)
         .role(role)
         .build();
 // You can also add a group by using addGroup method.
 userPool.addGroup("AnotherUserPoolGroup", UserPoolGroupOptions.builder()
         .groupName("another-group-name")
         .build());
 
  • Method Details

    • getDescription

      @Stability(Stable) @Nullable default String getDescription()
      A string containing the description of the group.

      Default: - no description

    • getGroupName

      @Stability(Stable) @Nullable default String getGroupName()
      The name of the group.

      Must be unique.

      Default: - auto generate a name

    • getPrecedence

      @Stability(Stable) @Nullable default Number getPrecedence()
      A non-negative integer value that specifies the precedence of this group relative to the other groups that a user can belong to in the user pool.

      Zero is the highest precedence value.

      Groups with lower Precedence values take precedence over groups with higher or null Precedence values. If a user belongs to two or more groups, it is the group with the lowest precedence value whose role ARN is given in the user's tokens for the cognito:roles and cognito:preferred_role claims.

      Two groups can have the same Precedence value. If this happens, neither group takes precedence over the other. If two groups with the same Precedence have the same role ARN, that role is used in the cognito:preferred_role claim in tokens for users in each group. If the two groups have different role ARNs, the cognito:preferred_role claim isn't set in users' tokens.

      Default: - null

    • getRole

      @Stability(Stable) @Nullable default IRole getRole()
      The role for the group.

      Default: - no description

    • builder

      @Stability(Stable) static UserPoolGroupOptions.Builder builder()
      Returns:
      a UserPoolGroupOptions.Builder of UserPoolGroupOptions