AWS Tools for Windows PowerShell
Command Reference

AWS services or capabilities described in AWS Documentation may vary by region/location. Click Getting Started with Amazon AWS to see specific differences applicable to the China (Beijing) Region.

Synopsis

Calls the Amazon Cognito Identity Provider CreateUserPool API operation.

Syntax

New-CGIPUserPool
-PoolName <String>
-UserPoolAddOns_AdvancedSecurityMode <AdvancedSecurityModeType>
-AliasAttribute <String[]>
-AdminCreateUserConfig_AllowAdminCreateUserOnly <Boolean>
-AutoVerifiedAttribute <String[]>
-DeviceConfiguration_ChallengeRequiredOnNewDevice <Boolean>
-LambdaConfig_CreateAuthChallenge <String>
-LambdaConfig_CustomMessage <String>
-VerificationMessageTemplate_DefaultEmailOption <DefaultEmailOptionType>
-LambdaConfig_DefineAuthChallenge <String>
-DeviceConfiguration_DeviceOnlyRememberedOnUserPrompt <Boolean>
-InviteMessageTemplate_EmailMessage <String>
-VerificationMessageTemplate_EmailMessage <String>
-VerificationMessageTemplate_EmailMessageByLink <String>
-EmailConfiguration_EmailSendingAccount <EmailSendingAccountType>
-InviteMessageTemplate_EmailSubject <String>
-VerificationMessageTemplate_EmailSubject <String>
-VerificationMessageTemplate_EmailSubjectByLink <String>
-EmailVerificationMessage <String>
-EmailVerificationSubject <String>
-SmsConfiguration_ExternalId <String>
-MfaConfiguration <UserPoolMfaType>
-PasswordPolicy_MinimumLength <Int32>
-LambdaConfig_PostAuthentication <String>
-LambdaConfig_PostConfirmation <String>
-LambdaConfig_PreAuthentication <String>
-LambdaConfig_PreSignUp <String>
-LambdaConfig_PreTokenGeneration <String>
-EmailConfiguration_ReplyToEmailAddress <String>
-PasswordPolicy_RequireLowercase <Boolean>
-PasswordPolicy_RequireNumber <Boolean>
-PasswordPolicy_RequireSymbol <Boolean>
-PasswordPolicy_RequireUppercase <Boolean>
-Schema <SchemaAttributeType[]>
-SmsAuthenticationMessage <String>
-VerificationMessageTemplate_SmsMessage <String>
-InviteMessageTemplate_SMSMessage <String>
-SmsVerificationMessage <String>
-SmsConfiguration_SnsCallerArn <String>
-EmailConfiguration_SourceArn <String>
-PasswordPolicy_TemporaryPasswordValidityDay <Int32>
-AdminCreateUserConfig_UnusedAccountValidityDay <Int32>
-LambdaConfig_UserMigration <String>
-UsernameAttribute <String[]>
-UserPoolTag <Hashtable>
-LambdaConfig_VerifyAuthChallengeResponse <String>
-Force <SwitchParameter>

Description

Creates a new Amazon Cognito user pool and sets the password policy for the pool.

Parameters

-AdminCreateUserConfig_AllowAdminCreateUserOnly <Boolean>
Set to True if only the administrator is allowed to create user profiles. Set to False if users can sign themselves up via an app.
Required?False
Position?Named
Accept pipeline input?False
-AdminCreateUserConfig_UnusedAccountValidityDay <Int32>
The user account expiration limit, in days, after which the account is no longer usable. To reset the account after that time limit, you must call AdminCreateUser again, specifying "RESEND" for the MessageAction parameter. The default value for this parameter is 7. If you set a value for TemporaryPasswordValidityDays in PasswordPolicy, that value will be used and UnusedAccountValidityDays will be deprecated for that user pool.
Required?False
Position?Named
Accept pipeline input?False
AliasesAdminCreateUserConfig_UnusedAccountValidityDays
-AliasAttribute <String[]>
Attributes supported as an alias for this user pool. Possible values: phone_number, email, or preferred_username.
Required?False
Position?Named
Accept pipeline input?False
AliasesAliasAttributes
-AutoVerifiedAttribute <String[]>
The attributes to be auto-verified. Possible values: email, phone_number.
Required?False
Position?Named
Accept pipeline input?False
AliasesAutoVerifiedAttributes
-DeviceConfiguration_ChallengeRequiredOnNewDevice <Boolean>
Indicates whether a challenge is required on a new device. Only applicable to a new device.
Required?False
Position?Named
Accept pipeline input?False
-DeviceConfiguration_DeviceOnlyRememberedOnUserPrompt <Boolean>
If true, a device is only remembered on user prompt.
Required?False
Position?Named
Accept pipeline input?False
-EmailConfiguration_EmailSendingAccount <EmailSendingAccountType>
Specifies whether Amazon Cognito emails your users by using its built-in email functionality or your Amazon SES email configuration. Specify one of the following values:
COGNITO_DEFAULT
When Amazon Cognito emails your users, it uses its built-in email functionality. When you use the default option, Amazon Cognito allows only a limited number of emails each day for your user pool. For typical production environments, the default email limit is below the required delivery volume. To achieve a higher delivery volume, specify DEVELOPER to use your Amazon SES email configuration.To look up the email delivery limit for the default option, see Limits in Amazon Cognito in the Amazon Cognito Developer Guide.The default FROM address is no-reply@verificationemail.com. To customize the FROM address, provide the ARN of an Amazon SES verified email address for the SourceArn parameter.
DEVELOPER
When Amazon Cognito emails your users, it uses your Amazon SES configuration. Amazon Cognito calls Amazon SES on your behalf to send email from your verified email address. When you use this option, the email delivery limits are the same limits that apply to your Amazon SES verified email address in your AWS account.If you use this option, you must provide the ARN of an Amazon SES verified email address for the SourceArn parameter.Before Amazon Cognito can email your users, it requires additional permissions to call Amazon SES on your behalf. When you update your user pool with this option, Amazon Cognito creates a service-linked role, which is a type of IAM role, in your AWS account. This role contains the permissions that allow Amazon Cognito to access Amazon SES and send email messages with your address. For more information about the service-linked role that Amazon Cognito creates, see Using Service-Linked Roles for Amazon Cognito in the Amazon Cognito Developer Guide.
Required?False
Position?Named
Accept pipeline input?False
-EmailConfiguration_ReplyToEmailAddress <String>
The destination to which the receiver of the email should reply to.
Required?False
Position?Named
Accept pipeline input?False
-EmailConfiguration_SourceArn <String>
The Amazon Resource Name (ARN) of a verified email address in Amazon SES. This email address is used in one of the following ways, depending on the value that you specify for the EmailSendingAccount parameter:
  • If you specify COGNITO_DEFAULT, Amazon Cognito uses this address as the custom FROM address when it emails your users by using its built-in email account.
  • If you specify DEVELOPER, Amazon Cognito emails your users with this address by calling Amazon SES on your behalf.
Required?False
Position?Named
Accept pipeline input?False
-EmailVerificationMessage <String>
A string representing the email verification message.
Required?False
Position?Named
Accept pipeline input?False
-EmailVerificationSubject <String>
A string representing the email verification subject.
Required?False
Position?Named
Accept pipeline input?False
-Force <SwitchParameter>
This parameter overrides confirmation prompts to force the cmdlet to continue its operation. This parameter should always be used with caution.
Required?False
Position?Named
Accept pipeline input?False
-InviteMessageTemplate_EmailMessage <String>
The message template for email messages.
Required?False
Position?Named
Accept pipeline input?False
AliasesAdminCreateUserConfig_InviteMessageTemplate_EmailMessage
-InviteMessageTemplate_EmailSubject <String>
The subject line for email messages.
Required?False
Position?Named
Accept pipeline input?False
AliasesAdminCreateUserConfig_InviteMessageTemplate_EmailSubject
-InviteMessageTemplate_SMSMessage <String>
The message template for SMS messages.
Required?False
Position?Named
Accept pipeline input?False
AliasesAdminCreateUserConfig_InviteMessageTemplate_SMSMessage
-LambdaConfig_CreateAuthChallenge <String>
Creates an authentication challenge.
Required?False
Position?Named
Accept pipeline input?False
-LambdaConfig_CustomMessage <String>
A custom Message AWS Lambda trigger.
Required?False
Position?Named
Accept pipeline input?False
-LambdaConfig_DefineAuthChallenge <String>
Defines the authentication challenge.
Required?False
Position?Named
Accept pipeline input?False
-LambdaConfig_PostAuthentication <String>
A post-authentication AWS Lambda trigger.
Required?False
Position?Named
Accept pipeline input?False
-LambdaConfig_PostConfirmation <String>
A post-confirmation AWS Lambda trigger.
Required?False
Position?Named
Accept pipeline input?False
-LambdaConfig_PreAuthentication <String>
A pre-authentication AWS Lambda trigger.
Required?False
Position?Named
Accept pipeline input?False
-LambdaConfig_PreSignUp <String>
A pre-registration AWS Lambda trigger.
Required?False
Position?Named
Accept pipeline input?False
-LambdaConfig_PreTokenGeneration <String>
A Lambda trigger that is invoked before token generation.
Required?False
Position?Named
Accept pipeline input?False
-LambdaConfig_UserMigration <String>
The user migration Lambda config type.
Required?False
Position?Named
Accept pipeline input?False
-LambdaConfig_VerifyAuthChallengeResponse <String>
Verifies the authentication challenge response.
Required?False
Position?Named
Accept pipeline input?False
-MfaConfiguration <UserPoolMfaType>
Specifies MFA configuration details.
Required?False
Position?Named
Accept pipeline input?False
-PasswordPolicy_MinimumLength <Int32>
The minimum length of the password policy that you have set. Cannot be less than 6.
Required?False
Position?Named
Accept pipeline input?False
AliasesPolicies_PasswordPolicy_MinimumLength
-PasswordPolicy_RequireLowercase <Boolean>
In the password policy that you have set, refers to whether you have required users to use at least one lowercase letter in their password.
Required?False
Position?Named
Accept pipeline input?False
AliasesPolicies_PasswordPolicy_RequireLowercase
-PasswordPolicy_RequireNumber <Boolean>
In the password policy that you have set, refers to whether you have required users to use at least one number in their password.
Required?False
Position?Named
Accept pipeline input?False
AliasesPolicies_PasswordPolicy_RequireNumbers
-PasswordPolicy_RequireSymbol <Boolean>
In the password policy that you have set, refers to whether you have required users to use at least one symbol in their password.
Required?False
Position?Named
Accept pipeline input?False
AliasesPolicies_PasswordPolicy_RequireSymbols
-PasswordPolicy_RequireUppercase <Boolean>
In the password policy that you have set, refers to whether you have required users to use at least one uppercase letter in their password.
Required?False
Position?Named
Accept pipeline input?False
AliasesPolicies_PasswordPolicy_RequireUppercase
-PasswordPolicy_TemporaryPasswordValidityDay <Int32>
In the password policy you have set, refers to the number of days a temporary password is valid. If the user does not sign-in during this time, their password will need to be reset by an administrator.When you set TemporaryPasswordValidityDays for a user pool, you will no longer be able to set the deprecated UnusedAccountValidityDays value for that user pool.
Required?False
Position?Named
Accept pipeline input?False
AliasesPolicies_PasswordPolicy_TemporaryPasswordValidityDays
-PoolName <String>
A string used to name the user pool.
Required?False
Position?1
Accept pipeline input?True (ByValue, ByPropertyName)
An array of schema attributes for the new user pool. These attributes can be standard or custom attributes.
Required?False
Position?Named
Accept pipeline input?False
-SmsAuthenticationMessage <String>
A string representing the SMS authentication message.
Required?False
Position?Named
Accept pipeline input?False
-SmsConfiguration_ExternalId <String>
The external ID is a value that we recommend you use to add security to your IAM role which is used to call Amazon SNS to send SMS messages for your user pool. If you provide an ExternalId, the Cognito User Pool will include it when attempting to assume your IAM role, so that you can set your roles trust policy to require the ExternalID. If you use the Cognito Management Console to create a role for SMS MFA, Cognito will create a role with the required permissions and a trust policy that demonstrates use of the ExternalId.
Required?False
Position?Named
Accept pipeline input?False
-SmsConfiguration_SnsCallerArn <String>
The Amazon Resource Name (ARN) of the Amazon Simple Notification Service (SNS) caller. This is the ARN of the IAM role in your AWS account which Cognito will use to send SMS messages.
Required?False
Position?Named
Accept pipeline input?False
-SmsVerificationMessage <String>
A string representing the SMS verification message.
Required?False
Position?Named
Accept pipeline input?False
-UsernameAttribute <String[]>
Specifies whether email addresses or phone numbers can be specified as usernames when a user signs up.
Required?False
Position?Named
Accept pipeline input?False
AliasesUsernameAttributes
-UserPoolAddOns_AdvancedSecurityMode <AdvancedSecurityModeType>
The advanced security mode.
Required?False
Position?Named
Accept pipeline input?False
-UserPoolTag <Hashtable>
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.
Required?False
Position?Named
Accept pipeline input?False
AliasesUserPoolTags
-VerificationMessageTemplate_DefaultEmailOption <DefaultEmailOptionType>
The default email option.
Required?False
Position?Named
Accept pipeline input?False
-VerificationMessageTemplate_EmailMessage <String>
The email message template.
Required?False
Position?Named
Accept pipeline input?False
-VerificationMessageTemplate_EmailMessageByLink <String>
The email message template for sending a confirmation link to the user.
Required?False
Position?Named
Accept pipeline input?False
-VerificationMessageTemplate_EmailSubject <String>
The subject line for the email message template.
Required?False
Position?Named
Accept pipeline input?False
-VerificationMessageTemplate_EmailSubjectByLink <String>
The subject line for the email message template for sending a confirmation link to the user.
Required?False
Position?Named
Accept pipeline input?False
-VerificationMessageTemplate_SmsMessage <String>
The SMS message template.
Required?False
Position?Named
Accept pipeline input?False

Common Credential and Region Parameters

-AccessKey <String>
The AWS access key for the user account. This can be a temporary access key if the corresponding session token is supplied to the -SessionToken parameter.
Required? False
Position? Named
Accept pipeline input? False
Aliases AK
-Credential <AWSCredentials>
An AWSCredentials object instance containing access and secret key information, and optionally a token for session-based credentials.
Required? False
Position? Named
Accept pipeline input? False
-ProfileLocation <String>

Used to specify the name and location of the ini-format credential file (shared with the AWS CLI and other AWS SDKs)

If this optional parameter is omitted this cmdlet will search the encrypted credential file used by the AWS SDK for .NET and AWS Toolkit for Visual Studio first. If the profile is not found then the cmdlet will search in the ini-format credential file at the default location: (user's home directory)\.aws\credentials. Note that the encrypted credential file is not supported on all platforms. It will be skipped when searching for profiles on Windows Nano Server, Mac, and Linux platforms.

If this parameter is specified then this cmdlet will only search the ini-format credential file at the location given.

As the current folder can vary in a shell or during script execution it is advised that you use specify a fully qualified path instead of a relative path.

Required? False
Position? Named
Accept pipeline input? False
Aliases AWSProfilesLocation, ProfilesLocation
-ProfileName <String>
The user-defined name of an AWS credentials or SAML-based role profile containing credential information. The profile is expected to be found in the secure credential file shared with the AWS SDK for .NET and AWS Toolkit for Visual Studio. You can also specify the name of a profile stored in the .ini-format credential file used with the AWS CLI and other AWS SDKs.
Required? False
Position? Named
Accept pipeline input? False
Aliases AWSProfileName, StoredCredentials
-NetworkCredential <PSCredential>
Used with SAML-based authentication when ProfileName references a SAML role profile. Contains the network credentials to be supplied during authentication with the configured identity provider's endpoint. This parameter is not required if the user's default network identity can or should be used during authentication.
Required? False
Position? Named
Accept pipeline input? False
-SecretKey <String>
The AWS secret key for the user account. This can be a temporary secret key if the corresponding session token is supplied to the -SessionToken parameter.
Required? False
Position? Named
Accept pipeline input? False
Aliases SecretAccessKey, SK
-SessionToken <String>
The session token if the access and secret keys are temporary session-based credentials.
Required? False
Position? Named
Accept pipeline input? False
Aliases ST
-Region <String>
The system name of the AWS region in which the operation should be invoked. For example, us-east-1, eu-west-1 etc.
Required? False
Position? Named
Accept pipeline input? False
Aliases RegionToCall
-EndpointUrl <String>

The endpoint to make the call against.

Note: This parameter is primarily for internal AWS use and is not required/should not be specified for normal usage. The cmdlets normally determine which endpoint to call based on the region specified to the -Region parameter or set as default in the shell (via Set-DefaultAWSRegion). Only specify this parameter if you must direct the call to a specific custom endpoint.

Required? False
Position? Named
Accept pipeline input? False

Inputs

You can pipe a String object to this cmdlet for the PoolName parameter.

Outputs

This cmdlet returns a Amazon.CognitoIdentityProvider.Model.UserPoolType object. The service call response (type Amazon.CognitoIdentityProvider.Model.CreateUserPoolResponse) can also be referenced from properties attached to the cmdlet entry in the $AWSHistory stack.

Supported Version

AWS Tools for PowerShell: 2.x.y.z