Class MfaSecondFactor.Builder

java.lang.Object
software.amazon.awscdk.services.cognito.MfaSecondFactor.Builder
All Implemented Interfaces:
software.amazon.jsii.Builder<MfaSecondFactor>
Enclosing interface:
MfaSecondFactor

@Stability(Stable) public static final class MfaSecondFactor.Builder extends Object implements software.amazon.jsii.Builder<MfaSecondFactor>
A builder for MfaSecondFactor
  • Constructor Details

    • Builder

      public Builder()
  • Method Details

    • otp

      @Stability(Stable) public MfaSecondFactor.Builder otp(Boolean otp)
      Sets the value of MfaSecondFactor.getOtp()
      Parameters:
      otp - The MFA token is a time-based one time password that is generated by a hardware or software token. This parameter is required.
      Returns:
      this
    • sms

      @Stability(Stable) public MfaSecondFactor.Builder sms(Boolean sms)
      Sets the value of MfaSecondFactor.getSms()
      Parameters:
      sms - The MFA token is sent to the user via SMS to their verified phone numbers. This parameter is required.
      Returns:
      this
    • email

      @Stability(Stable) public MfaSecondFactor.Builder email(Boolean email)
      Sets the value of MfaSecondFactor.getEmail()
      Parameters:
      email - The MFA token is sent to the user via EMAIL. To enable email-based MFA, set email property to the Amazon SES email-sending configuration and set advancedSecurityMode to AdvancedSecurity.ENFORCED or AdvancedSecurity.AUDIT
      Returns:
      this
    • build

      @Stability(Stable) public MfaSecondFactor build()
      Builds the configured instance.
      Specified by:
      build in interface software.amazon.jsii.Builder<MfaSecondFactor>
      Returns:
      a new instance of MfaSecondFactor
      Throws:
      NullPointerException - if any required attribute was not provided