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 Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()Builds the configured instance.Sets the value ofMfaSecondFactor.getEmail()Sets the value ofMfaSecondFactor.getOtp()Sets the value ofMfaSecondFactor.getSms()
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
otp
Sets the value ofMfaSecondFactor.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
Sets the value ofMfaSecondFactor.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
Sets the value ofMfaSecondFactor.getEmail()- Parameters:
email- The MFA token is sent to the user via EMAIL. To enable email-based MFA, setemailproperty to the Amazon SES email-sending configuration and setfeturePlantoFeaturePlan.ESSENTIALSorFeaturePlan.PLUS- Returns:
this
-
build
Builds the configured instance.- Specified by:
buildin interfacesoftware.amazon.jsii.Builder<MfaSecondFactor>- Returns:
- a new instance of
MfaSecondFactor - Throws:
NullPointerException- if any required attribute was not provided
-