API Reference

PREVIEW DOCUMENTATION - This is a preview of a new format for the AWS SDK for Go API Reference documentation. For the current AWS SDK for Go API Reference, see

We welcome your feedback on this new version of the documentation. Send your comments to


import ""

type AdminCreateUserInput struct { DesiredDeliveryMediums []*string `type:"list"` ForceAliasCreation *bool `type:"boolean"` MessageAction *string `type:"string" enum:"MessageActionType"` TemporaryPassword *string `min:"6" type:"string" sensitive:"true"` UserAttributes []*AttributeType `type:"list"` UserPoolId *string `min:"1" type:"string" required:"true"` Username *string `min:"1" type:"string" required:"true" sensitive:"true"` ValidationData []*AttributeType `type:"list"` }

Represents the request to create a user in the specified user pool.


Type: []*string

Specify "EMAIL" if email will be used to send the welcome message. Specify "SMS" if the phone number will be used. The default value is "SMS". More than one value can be specified.


Type: *bool

This parameter is only used if the phone_number_verified or email_verified attribute is set to True. Otherwise, it is ignored.

If this parameter is set to True and the phone number or email address specified in the UserAttributes parameter already exists as an alias with a different user, the API call will migrate the alias from the previous user to the newly created user. The previous user will no longer be able to log in using that alias.

If this parameter is set to False, the API throws an AliasExistsException error if the alias already exists. The default value is False.


Type: *string

Set to "RESEND" to resend the invitation message to a user that already exists and reset the expiration limit on the user's account. Set to "SUPPRESS" to suppress sending the message. Only one value can be specified.


Type: *string

The user's temporary password. This password must conform to the password policy that you specified when you created the user pool.

The temporary password is valid only once. To complete the Admin Create User flow, the user must enter the temporary password in the sign-in page along with a new password to be used in all future sign-ins.

This parameter is not required. If you do not specify a value, Amazon Cognito generates one for you.

The temporary password can only be used until the user account expiration limit that you specified when you created the user pool. To reset the account after that time limit, you must call AdminCreateUser again, specifying "RESEND" for the MessageAction parameter.


Specifies whether the attribute is standard or custom.


Type: *string

The user pool ID for the user pool where the user will be created.

UserPoolId is a required field


Type: *string

The username for the user. Must be unique within the user pool. Must be a UTF-8 string between 1 and 128 characters. After the user is created, the username cannot be changed.

Username is a required field


Specifies whether the attribute is standard or custom.



func (s AdminCreateUserInput) GoString() string

GoString returns the string representation


func (s *AdminCreateUserInput) SetDesiredDeliveryMediums(v []*string) *AdminCreateUserInput

SetDesiredDeliveryMediums sets the DesiredDeliveryMediums field's value.


func (s *AdminCreateUserInput) SetForceAliasCreation(v bool) *AdminCreateUserInput

SetForceAliasCreation sets the ForceAliasCreation field's value.


func (s *AdminCreateUserInput) SetMessageAction(v string) *AdminCreateUserInput

SetMessageAction sets the MessageAction field's value.


func (s *AdminCreateUserInput) SetTemporaryPassword(v string) *AdminCreateUserInput

SetTemporaryPassword sets the TemporaryPassword field's value.


func (s *AdminCreateUserInput) SetUserAttributes(v []*AttributeType) *AdminCreateUserInput

SetUserAttributes sets the UserAttributes field's value.


func (s *AdminCreateUserInput) SetUserPoolId(v string) *AdminCreateUserInput

SetUserPoolId sets the UserPoolId field's value.


func (s *AdminCreateUserInput) SetUsername(v string) *AdminCreateUserInput

SetUsername sets the Username field's value.


func (s *AdminCreateUserInput) SetValidationData(v []*AttributeType) *AdminCreateUserInput

SetValidationData sets the ValidationData field's value.


func (s AdminCreateUserInput) String() string

String returns the string representation


func (s *AdminCreateUserInput) Validate() error

Validate inspects the fields of the type to determine if they are valid.

On this page: