/*
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
* You may not use this file except in compliance with the License.
* A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" file accompanying this file. This file is distributed
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
* express or implied. See the License for the specific language governing
* permissions and limitations under the License.
*/
/*
* Do not modify this file. This file is generated from the cognito-idp-2016-04-18.normal.json service model.
*/
using System;
using System.Collections.Generic;
using System.Xml.Serialization;
using System.Text;
using System.IO;
using System.Net;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
namespace Amazon.CognitoIdentityProvider.Model
{
///
/// Container for the parameters to the CreateUserPool operation.
/// Creates a new Amazon Cognito user pool and sets the password policy for the pool.
///
///
///
/// This action might generate an SMS text message. Starting June 1, 2021, US telecom
/// carriers require you to register an origination phone number before you can send SMS
/// messages to US phone numbers. If you use SMS text messages in Amazon Cognito, you
/// must register a phone number with Amazon
/// Pinpoint. Amazon Cognito uses the registered number automatically. Otherwise,
/// Amazon Cognito users who must receive SMS messages might not be able to sign up, activate
/// their accounts, or sign in.
///
///
///
/// If you have never used SMS text messages with Amazon Cognito or any other Amazon Web
/// Service, Amazon Simple Notification Service might place your account in the SMS sandbox.
/// In sandbox
/// mode , you can send messages only to verified phone numbers. After you test
/// your app while in the sandbox environment, you can move out of the sandbox and into
/// production. For more information, see
/// SMS message settings for Amazon Cognito user pools in the Amazon Cognito Developer
/// Guide.
///
///
///
public partial class CreateUserPoolRequest : AmazonCognitoIdentityProviderRequest
{
private AccountRecoverySettingType _accountRecoverySetting;
private AdminCreateUserConfigType _adminCreateUserConfig;
private List _aliasAttributes = new List();
private List _autoVerifiedAttributes = new List();
private DeletionProtectionType _deletionProtection;
private DeviceConfigurationType _deviceConfiguration;
private EmailConfigurationType _emailConfiguration;
private string _emailVerificationMessage;
private string _emailVerificationSubject;
private LambdaConfigType _lambdaConfig;
private UserPoolMfaType _mfaConfiguration;
private UserPoolPolicyType _policies;
private string _poolName;
private List _schema = new List();
private string _smsAuthenticationMessage;
private SmsConfigurationType _smsConfiguration;
private string _smsVerificationMessage;
private UserAttributeUpdateSettingsType _userAttributeUpdateSettings;
private List _usernameAttributes = new List();
private UsernameConfigurationType _usernameConfiguration;
private UserPoolAddOnsType _userPoolAddOns;
private Dictionary _userPoolTags = new Dictionary();
private VerificationMessageTemplateType _verificationMessageTemplate;
///
/// Gets and sets the property AccountRecoverySetting.
///
/// The available verified method a user can use to recover their password when they call
/// ForgotPassword
. You can use this setting to define a preferred method
/// when a user has more than one method available. With this setting, SMS doesn't qualify
/// for a valid password recovery mechanism if the user also has SMS multi-factor authentication
/// (MFA) activated. In the absence of this setting, Amazon Cognito uses the legacy behavior
/// to determine the recovery method where SMS is preferred through email.
///
///
public AccountRecoverySettingType AccountRecoverySetting
{
get { return this._accountRecoverySetting; }
set { this._accountRecoverySetting = value; }
}
// Check to see if AccountRecoverySetting property is set
internal bool IsSetAccountRecoverySetting()
{
return this._accountRecoverySetting != null;
}
///
/// Gets and sets the property AdminCreateUserConfig.
///
/// The configuration for AdminCreateUser
requests.
///
///
public AdminCreateUserConfigType AdminCreateUserConfig
{
get { return this._adminCreateUserConfig; }
set { this._adminCreateUserConfig = value; }
}
// Check to see if AdminCreateUserConfig property is set
internal bool IsSetAdminCreateUserConfig()
{
return this._adminCreateUserConfig != null;
}
///
/// Gets and sets the property AliasAttributes.
///
/// Attributes supported as an alias for this user pool. Possible values: phone_number,
/// email, or preferred_username.
///
///
public List AliasAttributes
{
get { return this._aliasAttributes; }
set { this._aliasAttributes = value; }
}
// Check to see if AliasAttributes property is set
internal bool IsSetAliasAttributes()
{
return this._aliasAttributes != null && this._aliasAttributes.Count > 0;
}
///
/// Gets and sets the property AutoVerifiedAttributes.
///
/// The attributes to be auto-verified. Possible values: email, phone_number.
///
///
public List AutoVerifiedAttributes
{
get { return this._autoVerifiedAttributes; }
set { this._autoVerifiedAttributes = value; }
}
// Check to see if AutoVerifiedAttributes property is set
internal bool IsSetAutoVerifiedAttributes()
{
return this._autoVerifiedAttributes != null && this._autoVerifiedAttributes.Count > 0;
}
///
/// Gets and sets the property DeletionProtection.
///
/// When active, DeletionProtection
prevents accidental deletion of your
/// user pool. Before you can delete a user pool that you have protected against deletion,
/// you must deactivate this feature.
///
///
///
/// When you try to delete a protected user pool in a DeleteUserPool
API
/// request, Amazon Cognito returns an InvalidParameterException
error. To
/// delete a protected user pool, send a new DeleteUserPool
request after
/// you deactivate deletion protection in an UpdateUserPool
API request.
///
///
public DeletionProtectionType DeletionProtection
{
get { return this._deletionProtection; }
set { this._deletionProtection = value; }
}
// Check to see if DeletionProtection property is set
internal bool IsSetDeletionProtection()
{
return this._deletionProtection != null;
}
///
/// Gets and sets the property DeviceConfiguration.
///
/// The device-remembering configuration for a user pool. A null value indicates that
/// you have deactivated device remembering in your user pool.
///
///
///
/// When you provide a value for any DeviceConfiguration
field, you activate
/// the Amazon Cognito device-remembering feature.
///
///
///
public DeviceConfigurationType DeviceConfiguration
{
get { return this._deviceConfiguration; }
set { this._deviceConfiguration = value; }
}
// Check to see if DeviceConfiguration property is set
internal bool IsSetDeviceConfiguration()
{
return this._deviceConfiguration != null;
}
///
/// Gets and sets the property EmailConfiguration.
///
/// The email configuration of your user pool. The email configuration type sets your
/// preferred sending method, Amazon Web Services Region, and sender for messages from
/// your user pool.
///
///
public EmailConfigurationType EmailConfiguration
{
get { return this._emailConfiguration; }
set { this._emailConfiguration = value; }
}
// Check to see if EmailConfiguration property is set
internal bool IsSetEmailConfiguration()
{
return this._emailConfiguration != null;
}
///
/// Gets and sets the property EmailVerificationMessage.
///
/// This parameter is no longer used. See VerificationMessageTemplateType.
///
///
[AWSProperty(Min=6, Max=20000)]
public string EmailVerificationMessage
{
get { return this._emailVerificationMessage; }
set { this._emailVerificationMessage = value; }
}
// Check to see if EmailVerificationMessage property is set
internal bool IsSetEmailVerificationMessage()
{
return this._emailVerificationMessage != null;
}
///
/// Gets and sets the property EmailVerificationSubject.
///
/// This parameter is no longer used. See VerificationMessageTemplateType.
///
///
[AWSProperty(Min=1, Max=140)]
public string EmailVerificationSubject
{
get { return this._emailVerificationSubject; }
set { this._emailVerificationSubject = value; }
}
// Check to see if EmailVerificationSubject property is set
internal bool IsSetEmailVerificationSubject()
{
return this._emailVerificationSubject != null;
}
///
/// Gets and sets the property LambdaConfig.
///
/// The Lambda trigger configuration information for the new user pool.
///
///
///
/// In a push model, event sources (such as Amazon S3 and custom applications) need permission
/// to invoke a function. So you must make an extra call to add permission for these event
/// sources to invoke your Lambda function.
///
///
///
/// For more information on using the Lambda API to add permission, see
/// AddPermission .
///
///
///
/// For adding permission using the CLI, see
/// add-permission .
///
///
///
public LambdaConfigType LambdaConfig
{
get { return this._lambdaConfig; }
set { this._lambdaConfig = value; }
}
// Check to see if LambdaConfig property is set
internal bool IsSetLambdaConfig()
{
return this._lambdaConfig != null;
}
///
/// Gets and sets the property MfaConfiguration.
///
/// Specifies MFA configuration details.
///
///
public UserPoolMfaType MfaConfiguration
{
get { return this._mfaConfiguration; }
set { this._mfaConfiguration = value; }
}
// Check to see if MfaConfiguration property is set
internal bool IsSetMfaConfiguration()
{
return this._mfaConfiguration != null;
}
///
/// Gets and sets the property Policies.
///
/// The policies associated with the new user pool.
///
///
public UserPoolPolicyType Policies
{
get { return this._policies; }
set { this._policies = value; }
}
// Check to see if Policies property is set
internal bool IsSetPolicies()
{
return this._policies != null;
}
///
/// Gets and sets the property PoolName.
///
/// A string used to name the user pool.
///
///
[AWSProperty(Required=true, Min=1, Max=128)]
public string PoolName
{
get { return this._poolName; }
set { this._poolName = value; }
}
// Check to see if PoolName property is set
internal bool IsSetPoolName()
{
return this._poolName != null;
}
///
/// Gets and sets the property Schema.
///
/// An array of schema attributes for the new user pool. These attributes can be standard
/// or custom attributes.
///
///
[AWSProperty(Min=1, Max=50)]
public List Schema
{
get { return this._schema; }
set { this._schema = value; }
}
// Check to see if Schema property is set
internal bool IsSetSchema()
{
return this._schema != null && this._schema.Count > 0;
}
///
/// Gets and sets the property SmsAuthenticationMessage.
///
/// A string representing the SMS authentication message.
///
///
[AWSProperty(Min=6, Max=140)]
public string SmsAuthenticationMessage
{
get { return this._smsAuthenticationMessage; }
set { this._smsAuthenticationMessage = value; }
}
// Check to see if SmsAuthenticationMessage property is set
internal bool IsSetSmsAuthenticationMessage()
{
return this._smsAuthenticationMessage != null;
}
///
/// Gets and sets the property SmsConfiguration.
///
/// The SMS configuration with the settings that your Amazon Cognito user pool must use
/// to send an SMS message from your Amazon Web Services account through Amazon Simple
/// Notification Service. To send SMS messages with Amazon SNS in the Amazon Web Services
/// Region that you want, the Amazon Cognito user pool uses an Identity and Access Management
/// (IAM) role in your Amazon Web Services account.
///
///
public SmsConfigurationType SmsConfiguration
{
get { return this._smsConfiguration; }
set { this._smsConfiguration = value; }
}
// Check to see if SmsConfiguration property is set
internal bool IsSetSmsConfiguration()
{
return this._smsConfiguration != null;
}
///
/// Gets and sets the property SmsVerificationMessage.
///
/// This parameter is no longer used. See VerificationMessageTemplateType.
///
///
[AWSProperty(Min=6, Max=140)]
public string SmsVerificationMessage
{
get { return this._smsVerificationMessage; }
set { this._smsVerificationMessage = value; }
}
// Check to see if SmsVerificationMessage property is set
internal bool IsSetSmsVerificationMessage()
{
return this._smsVerificationMessage != null;
}
///
/// Gets and sets the property UserAttributeUpdateSettings.
///
/// The settings for updates to user attributes. These settings include the property AttributesRequireVerificationBeforeUpdate
,
/// a user-pool setting that tells Amazon Cognito how to handle changes to the value of
/// your users' email address and phone number attributes. For more information, see
/// Verifying updates to email addresses and phone numbers.
///
///
public UserAttributeUpdateSettingsType UserAttributeUpdateSettings
{
get { return this._userAttributeUpdateSettings; }
set { this._userAttributeUpdateSettings = value; }
}
// Check to see if UserAttributeUpdateSettings property is set
internal bool IsSetUserAttributeUpdateSettings()
{
return this._userAttributeUpdateSettings != null;
}
///
/// Gets and sets the property UsernameAttributes.
///
/// Specifies whether a user can use an email address or phone number as a username when
/// they sign up.
///
///
public List UsernameAttributes
{
get { return this._usernameAttributes; }
set { this._usernameAttributes = value; }
}
// Check to see if UsernameAttributes property is set
internal bool IsSetUsernameAttributes()
{
return this._usernameAttributes != null && this._usernameAttributes.Count > 0;
}
///
/// Gets and sets the property UsernameConfiguration.
///
/// Case sensitivity on the username input for the selected sign-in option. For example,
/// when case sensitivity is set to False
, users can sign in using either
/// "username" or "Username". This configuration is immutable once it has been set. For
/// more information, see UsernameConfigurationType.
///
///
public UsernameConfigurationType UsernameConfiguration
{
get { return this._usernameConfiguration; }
set { this._usernameConfiguration = value; }
}
// Check to see if UsernameConfiguration property is set
internal bool IsSetUsernameConfiguration()
{
return this._usernameConfiguration != null;
}
///
/// Gets and sets the property UserPoolAddOns.
///
/// Enables advanced security risk detection. Set the key AdvancedSecurityMode
/// to the value "AUDIT".
///
///
public UserPoolAddOnsType UserPoolAddOns
{
get { return this._userPoolAddOns; }
set { this._userPoolAddOns = value; }
}
// Check to see if UserPoolAddOns property is set
internal bool IsSetUserPoolAddOns()
{
return this._userPoolAddOns != null;
}
///
/// Gets and sets the property UserPoolTags.
///
/// The tag keys and values to assign to the user pool. A tag is a label that you can
/// use to categorize and manage user pools in different ways, such as by purpose, owner,
/// environment, or other criteria.
///
///
public Dictionary UserPoolTags
{
get { return this._userPoolTags; }
set { this._userPoolTags = value; }
}
// Check to see if UserPoolTags property is set
internal bool IsSetUserPoolTags()
{
return this._userPoolTags != null && this._userPoolTags.Count > 0;
}
///
/// Gets and sets the property VerificationMessageTemplate.
///
/// The template for the verification message that the user sees when the app requests
/// permission to access the user's information.
///
///
public VerificationMessageTemplateType VerificationMessageTemplate
{
get { return this._verificationMessageTemplate; }
set { this._verificationMessageTemplate = value; }
}
// Check to see if VerificationMessageTemplate property is set
internal bool IsSetVerificationMessageTemplate()
{
return this._verificationMessageTemplate != null;
}
}
}