public class AdminSetUserMFAPreferenceRequest
extends com.amazonaws.AmazonWebServiceRequest
implements java.io.Serializable
The user's multi-factor authentication (MFA) preference, including which MFA options are activated, and if any are preferred. Only one factor can be set as preferred. The preferred MFA factor will be used to authenticate a user if multiple factors are activated. If multiple options are activated and no preference is set, a challenge to choose an MFA option will be returned during sign-in.
Amazon Cognito evaluates Identity and Access Management (IAM) policies in requests for this API operation. For this operation, you must use IAM credentials to authorize requests, and you must grant yourself the corresponding IAM permission in a policy.
Learn more
| Constructor and Description |
|---|
AdminSetUserMFAPreferenceRequest() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(java.lang.Object obj) |
SMSMfaSettingsType |
getSMSMfaSettings()
The SMS text message MFA settings.
|
SoftwareTokenMfaSettingsType |
getSoftwareTokenMfaSettings()
The time-based one-time password software token MFA settings.
|
java.lang.String |
getUsername()
The user pool username or alias.
|
java.lang.String |
getUserPoolId()
The user pool ID.
|
int |
hashCode() |
void |
setSMSMfaSettings(SMSMfaSettingsType sMSMfaSettings)
The SMS text message MFA settings.
|
void |
setSoftwareTokenMfaSettings(SoftwareTokenMfaSettingsType softwareTokenMfaSettings)
The time-based one-time password software token MFA settings.
|
void |
setUsername(java.lang.String username)
The user pool username or alias.
|
void |
setUserPoolId(java.lang.String userPoolId)
The user pool ID.
|
java.lang.String |
toString()
Returns a string representation of this object; useful for testing and
debugging.
|
AdminSetUserMFAPreferenceRequest |
withSMSMfaSettings(SMSMfaSettingsType sMSMfaSettings)
The SMS text message MFA settings.
|
AdminSetUserMFAPreferenceRequest |
withSoftwareTokenMfaSettings(SoftwareTokenMfaSettingsType softwareTokenMfaSettings)
The time-based one-time password software token MFA settings.
|
AdminSetUserMFAPreferenceRequest |
withUsername(java.lang.String username)
The user pool username or alias.
|
AdminSetUserMFAPreferenceRequest |
withUserPoolId(java.lang.String userPoolId)
The user pool ID.
|
clone, copyBaseTo, getCloneRoot, getCloneSource, getGeneralProgressListener, getRequestClientOptions, getRequestCredentials, getRequestMetricCollector, setGeneralProgressListener, setRequestCredentials, setRequestMetricCollector, withGeneralProgressListener, withRequestMetricCollectorpublic SMSMfaSettingsType getSMSMfaSettings()
The SMS text message MFA settings.
The SMS text message MFA settings.
public void setSMSMfaSettings(SMSMfaSettingsType sMSMfaSettings)
The SMS text message MFA settings.
sMSMfaSettings - The SMS text message MFA settings.
public AdminSetUserMFAPreferenceRequest withSMSMfaSettings(SMSMfaSettingsType sMSMfaSettings)
The SMS text message MFA settings.
Returns a reference to this object so that method calls can be chained together.
sMSMfaSettings - The SMS text message MFA settings.
public SoftwareTokenMfaSettingsType getSoftwareTokenMfaSettings()
The time-based one-time password software token MFA settings.
The time-based one-time password software token MFA settings.
public void setSoftwareTokenMfaSettings(SoftwareTokenMfaSettingsType softwareTokenMfaSettings)
The time-based one-time password software token MFA settings.
softwareTokenMfaSettings - The time-based one-time password software token MFA settings.
public AdminSetUserMFAPreferenceRequest withSoftwareTokenMfaSettings(SoftwareTokenMfaSettingsType softwareTokenMfaSettings)
The time-based one-time password software token MFA settings.
Returns a reference to this object so that method calls can be chained together.
softwareTokenMfaSettings - The time-based one-time password software token MFA settings.
public java.lang.String getUsername()
The user pool username or alias.
Constraints:
Length: 1 - 128
Pattern: [\p{L}\p{M}\p{S}\p{N}\p{P}]+
The user pool username or alias.
public void setUsername(java.lang.String username)
The user pool username or alias.
Constraints:
Length: 1 - 128
Pattern: [\p{L}\p{M}\p{S}\p{N}\p{P}]+
username - The user pool username or alias.
public AdminSetUserMFAPreferenceRequest withUsername(java.lang.String username)
The user pool username or alias.
Returns a reference to this object so that method calls can be chained together.
Constraints:
Length: 1 - 128
Pattern: [\p{L}\p{M}\p{S}\p{N}\p{P}]+
username - The user pool username or alias.
public java.lang.String getUserPoolId()
The user pool ID.
Constraints:
Length: 1 - 55
Pattern: [\w-]+_[0-9a-zA-Z]+
The user pool ID.
public void setUserPoolId(java.lang.String userPoolId)
The user pool ID.
Constraints:
Length: 1 - 55
Pattern: [\w-]+_[0-9a-zA-Z]+
userPoolId - The user pool ID.
public AdminSetUserMFAPreferenceRequest withUserPoolId(java.lang.String userPoolId)
The user pool ID.
Returns a reference to this object so that method calls can be chained together.
Constraints:
Length: 1 - 55
Pattern: [\w-]+_[0-9a-zA-Z]+
userPoolId - The user pool ID.
public java.lang.String toString()
toString in class java.lang.ObjectObject.toString()public int hashCode()
hashCode in class java.lang.Objectpublic boolean equals(java.lang.Object obj)
equals in class java.lang.Object