Interface PasswordPolicy

All Superinterfaces:
software.amazon.jsii.JsiiSerializable
All Known Implementing Classes:
PasswordPolicy.Jsii$Proxy

@Generated(value="jsii-pacmak/1.84.0 (build 5404dcf)", date="2023-06-19T16:30:44.030Z") @Stability(Stable) public interface PasswordPolicy extends software.amazon.jsii.JsiiSerializable
Password policy for User Pools.

Example:

 UserPool.Builder.create(this, "myuserpool")
         // ...
         .passwordPolicy(PasswordPolicy.builder()
                 .minLength(12)
                 .requireLowercase(true)
                 .requireUppercase(true)
                 .requireDigits(true)
                 .requireSymbols(true)
                 .tempPasswordValidity(Duration.days(3))
                 .build())
         .build();
 
  • Method Details

    • getMinLength

      @Stability(Stable) @Nullable default Number getMinLength()
      Minimum length required for a user's password.

      Default: 8

    • getRequireDigits

      @Stability(Stable) @Nullable default Boolean getRequireDigits()
      Whether the user is required to have digits in their password.

      Default: true

    • getRequireLowercase

      @Stability(Stable) @Nullable default Boolean getRequireLowercase()
      Whether the user is required to have lowercase characters in their password.

      Default: true

    • getRequireSymbols

      @Stability(Stable) @Nullable default Boolean getRequireSymbols()
      Whether the user is required to have symbols in their password.

      Default: true

    • getRequireUppercase

      @Stability(Stable) @Nullable default Boolean getRequireUppercase()
      Whether the user is required to have uppercase characters in their password.

      Default: true

    • getTempPasswordValidity

      @Stability(Stable) @Nullable default Duration getTempPasswordValidity()
      The length of time the temporary password generated by an admin is valid.

      This must be provided as whole days, like Duration.days(3) or Duration.hours(48). Fractional days, such as Duration.hours(20), will generate an error.

      Default: Duration.days(7)

    • builder

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