libZSservicesZSamazonka-cognito-idpZSamazonka-cognito-idp
Copyright(c) 2013-2021 Brendan Hay
LicenseMozilla Public License, v. 2.0.
MaintainerBrendan Hay <brendan.g.hay+amazonka@gmail.com>
Stabilityauto-generated
Portabilitynon-portable (GHC extensions)
Safe HaskellNone

Amazonka.CognitoIdentityProvider.SignUp

Description

Registers the user in the specified user pool and creates a user name, password, and user attributes.

This action might generate an SMS text message. Starting June 1, 2021, U.S. telecom carriers require that you register an origination phone number before you can send SMS messages to U.S. phone numbers. If you use SMS text messages in Amazon Cognito, you must register a phone number with Amazon Pinpoint. Cognito will use the the registered number automatically. Otherwise, Cognito users that must receive SMS messages might be unable 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 SNS might place your account in SMS sandbox. In <https:docs.aws.amazon.comsnslatestdgsns-sms-sandbox.html sandbox mode> , you’ll have limitations, such as sending messages to only verified phone numbers. After testing in the sandbox environment, you can move out of the SMS sandbox and into production. For more information, see SMS message settings for Cognito User Pools in the Amazon Cognito Developer Guide.

Synopsis

Creating a Request

data SignUp Source #

Represents the request to register a user.

See: newSignUp smart constructor.

Constructors

SignUp' 

Fields

  • clientMetadata :: Maybe (HashMap Text Text)

    A map of custom key-value pairs that you can provide as input for any custom workflows that this action triggers.

    You create custom workflows by assigning Lambda functions to user pool triggers. When you use the SignUp API action, Amazon Cognito invokes any functions that are assigned to the following triggers: pre sign-up, custom message, and post confirmation. When Amazon Cognito invokes any of these functions, it passes a JSON payload, which the function receives as input. This payload contains a clientMetadata attribute, which provides the data that you assigned to the ClientMetadata parameter in your SignUp request. In your function code in Lambda, you can process the clientMetadata value to enhance your workflow for your specific needs.

    For more information, see Customizing User Pool Workflows with Lambda Triggers in the Amazon Cognito Developer Guide.

    Take the following limitations into consideration when you use the ClientMetadata parameter:

    • Amazon Cognito does not store the ClientMetadata value. This data is available only to Lambda triggers that are assigned to a user pool to support custom workflows. If your user pool configuration does not include triggers, the ClientMetadata parameter serves no purpose.
    • Amazon Cognito does not validate the ClientMetadata value.
    • Amazon Cognito does not encrypt the the ClientMetadata value, so don't use it to provide sensitive information.
  • analyticsMetadata :: Maybe AnalyticsMetadataType

    The Amazon Pinpoint analytics metadata for collecting metrics for SignUp calls.

  • userContextData :: Maybe UserContextDataType

    Contextual data such as the user's device fingerprint, IP address, or location used for evaluating the risk of an unexpected event by Amazon Cognito advanced security.

  • userAttributes :: Maybe [AttributeType]

    An array of name-value pairs representing user attributes.

    For custom attributes, you must prepend the custom: prefix to the attribute name.

  • secretHash :: Maybe (Sensitive Text)

    A keyed-hash message authentication code (HMAC) calculated using the secret key of a user pool client and username plus the client ID in the message.

  • validationData :: Maybe [AttributeType]

    The validation data in the request to register a user.

  • clientId :: Sensitive Text

    The ID of the client associated with the user pool.

  • username :: Sensitive Text

    The user name of the user you wish to register.

  • password :: Sensitive Text

    The password of the user you wish to register.

Instances

Instances details
Eq SignUp Source # 
Instance details

Defined in Amazonka.CognitoIdentityProvider.SignUp

Methods

(==) :: SignUp -> SignUp -> Bool #

(/=) :: SignUp -> SignUp -> Bool #

Show SignUp Source # 
Instance details

Defined in Amazonka.CognitoIdentityProvider.SignUp

Generic SignUp Source # 
Instance details

Defined in Amazonka.CognitoIdentityProvider.SignUp

Associated Types

type Rep SignUp :: Type -> Type #

Methods

from :: SignUp -> Rep SignUp x #

to :: Rep SignUp x -> SignUp #

NFData SignUp Source # 
Instance details

Defined in Amazonka.CognitoIdentityProvider.SignUp

Methods

rnf :: SignUp -> () #

Hashable SignUp Source # 
Instance details

Defined in Amazonka.CognitoIdentityProvider.SignUp

Methods

hashWithSalt :: Int -> SignUp -> Int #

hash :: SignUp -> Int #

ToJSON SignUp Source # 
Instance details

Defined in Amazonka.CognitoIdentityProvider.SignUp

AWSRequest SignUp Source # 
Instance details

Defined in Amazonka.CognitoIdentityProvider.SignUp

Associated Types

type AWSResponse SignUp #

ToHeaders SignUp Source # 
Instance details

Defined in Amazonka.CognitoIdentityProvider.SignUp

Methods

toHeaders :: SignUp -> [Header] #

ToPath SignUp Source # 
Instance details

Defined in Amazonka.CognitoIdentityProvider.SignUp

Methods

toPath :: SignUp -> ByteString #

ToQuery SignUp Source # 
Instance details

Defined in Amazonka.CognitoIdentityProvider.SignUp

type Rep SignUp Source # 
Instance details

Defined in Amazonka.CognitoIdentityProvider.SignUp

type AWSResponse SignUp Source # 
Instance details

Defined in Amazonka.CognitoIdentityProvider.SignUp

newSignUp Source #

Create a value of SignUp with all optional fields omitted.

Use generic-lens or optics to modify other optional fields.

The following record fields are available, with the corresponding lenses provided for backwards compatibility:

$sel:clientMetadata:SignUp', signUp_clientMetadata - A map of custom key-value pairs that you can provide as input for any custom workflows that this action triggers.

You create custom workflows by assigning Lambda functions to user pool triggers. When you use the SignUp API action, Amazon Cognito invokes any functions that are assigned to the following triggers: pre sign-up, custom message, and post confirmation. When Amazon Cognito invokes any of these functions, it passes a JSON payload, which the function receives as input. This payload contains a clientMetadata attribute, which provides the data that you assigned to the ClientMetadata parameter in your SignUp request. In your function code in Lambda, you can process the clientMetadata value to enhance your workflow for your specific needs.

For more information, see Customizing User Pool Workflows with Lambda Triggers in the Amazon Cognito Developer Guide.

Take the following limitations into consideration when you use the ClientMetadata parameter:

  • Amazon Cognito does not store the ClientMetadata value. This data is available only to Lambda triggers that are assigned to a user pool to support custom workflows. If your user pool configuration does not include triggers, the ClientMetadata parameter serves no purpose.
  • Amazon Cognito does not validate the ClientMetadata value.
  • Amazon Cognito does not encrypt the the ClientMetadata value, so don't use it to provide sensitive information.

$sel:analyticsMetadata:SignUp', signUp_analyticsMetadata - The Amazon Pinpoint analytics metadata for collecting metrics for SignUp calls.

$sel:userContextData:SignUp', signUp_userContextData - Contextual data such as the user's device fingerprint, IP address, or location used for evaluating the risk of an unexpected event by Amazon Cognito advanced security.

$sel:userAttributes:SignUp', signUp_userAttributes - An array of name-value pairs representing user attributes.

For custom attributes, you must prepend the custom: prefix to the attribute name.

$sel:secretHash:SignUp', signUp_secretHash - A keyed-hash message authentication code (HMAC) calculated using the secret key of a user pool client and username plus the client ID in the message.

$sel:validationData:SignUp', signUp_validationData - The validation data in the request to register a user.

$sel:clientId:SignUp', signUp_clientId - The ID of the client associated with the user pool.

$sel:username:SignUp', signUp_username - The user name of the user you wish to register.

$sel:password:SignUp', signUp_password - The password of the user you wish to register.

Request Lenses

signUp_clientMetadata :: Lens' SignUp (Maybe (HashMap Text Text)) Source #

A map of custom key-value pairs that you can provide as input for any custom workflows that this action triggers.

You create custom workflows by assigning Lambda functions to user pool triggers. When you use the SignUp API action, Amazon Cognito invokes any functions that are assigned to the following triggers: pre sign-up, custom message, and post confirmation. When Amazon Cognito invokes any of these functions, it passes a JSON payload, which the function receives as input. This payload contains a clientMetadata attribute, which provides the data that you assigned to the ClientMetadata parameter in your SignUp request. In your function code in Lambda, you can process the clientMetadata value to enhance your workflow for your specific needs.

For more information, see Customizing User Pool Workflows with Lambda Triggers in the Amazon Cognito Developer Guide.

Take the following limitations into consideration when you use the ClientMetadata parameter:

  • Amazon Cognito does not store the ClientMetadata value. This data is available only to Lambda triggers that are assigned to a user pool to support custom workflows. If your user pool configuration does not include triggers, the ClientMetadata parameter serves no purpose.
  • Amazon Cognito does not validate the ClientMetadata value.
  • Amazon Cognito does not encrypt the the ClientMetadata value, so don't use it to provide sensitive information.

signUp_analyticsMetadata :: Lens' SignUp (Maybe AnalyticsMetadataType) Source #

The Amazon Pinpoint analytics metadata for collecting metrics for SignUp calls.

signUp_userContextData :: Lens' SignUp (Maybe UserContextDataType) Source #

Contextual data such as the user's device fingerprint, IP address, or location used for evaluating the risk of an unexpected event by Amazon Cognito advanced security.

signUp_userAttributes :: Lens' SignUp (Maybe [AttributeType]) Source #

An array of name-value pairs representing user attributes.

For custom attributes, you must prepend the custom: prefix to the attribute name.

signUp_secretHash :: Lens' SignUp (Maybe Text) Source #

A keyed-hash message authentication code (HMAC) calculated using the secret key of a user pool client and username plus the client ID in the message.

signUp_validationData :: Lens' SignUp (Maybe [AttributeType]) Source #

The validation data in the request to register a user.

signUp_clientId :: Lens' SignUp Text Source #

The ID of the client associated with the user pool.

signUp_username :: Lens' SignUp Text Source #

The user name of the user you wish to register.

signUp_password :: Lens' SignUp Text Source #

The password of the user you wish to register.

Destructuring the Response

data SignUpResponse Source #

The response from the server for a registration request.

See: newSignUpResponse smart constructor.

Constructors

SignUpResponse' 

Fields

Instances

Instances details
Eq SignUpResponse Source # 
Instance details

Defined in Amazonka.CognitoIdentityProvider.SignUp

Read SignUpResponse Source # 
Instance details

Defined in Amazonka.CognitoIdentityProvider.SignUp

Show SignUpResponse Source # 
Instance details

Defined in Amazonka.CognitoIdentityProvider.SignUp

Generic SignUpResponse Source # 
Instance details

Defined in Amazonka.CognitoIdentityProvider.SignUp

Associated Types

type Rep SignUpResponse :: Type -> Type #

NFData SignUpResponse Source # 
Instance details

Defined in Amazonka.CognitoIdentityProvider.SignUp

Methods

rnf :: SignUpResponse -> () #

type Rep SignUpResponse Source # 
Instance details

Defined in Amazonka.CognitoIdentityProvider.SignUp

type Rep SignUpResponse = D1 ('MetaData "SignUpResponse" "Amazonka.CognitoIdentityProvider.SignUp" "libZSservicesZSamazonka-cognito-idpZSamazonka-cognito-idp" 'False) (C1 ('MetaCons "SignUpResponse'" 'PrefixI 'True) ((S1 ('MetaSel ('Just "codeDeliveryDetails") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe CodeDeliveryDetailsType)) :*: S1 ('MetaSel ('Just "httpStatus") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Int)) :*: (S1 ('MetaSel ('Just "userConfirmed") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Bool) :*: S1 ('MetaSel ('Just "userSub") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Text))))

newSignUpResponse Source #

Create a value of SignUpResponse with all optional fields omitted.

Use generic-lens or optics to modify other optional fields.

The following record fields are available, with the corresponding lenses provided for backwards compatibility:

$sel:codeDeliveryDetails:SignUpResponse', signUpResponse_codeDeliveryDetails - The code delivery details returned by the server response to the user registration request.

$sel:httpStatus:SignUpResponse', signUpResponse_httpStatus - The response's http status code.

$sel:userConfirmed:SignUpResponse', signUpResponse_userConfirmed - A response from the server indicating that a user registration has been confirmed.

$sel:userSub:SignUpResponse', signUpResponse_userSub - The UUID of the authenticated user. This is not the same as username.

Response Lenses

signUpResponse_codeDeliveryDetails :: Lens' SignUpResponse (Maybe CodeDeliveryDetailsType) Source #

The code delivery details returned by the server response to the user registration request.

signUpResponse_httpStatus :: Lens' SignUpResponse Int Source #

The response's http status code.

signUpResponse_userConfirmed :: Lens' SignUpResponse Bool Source #

A response from the server indicating that a user registration has been confirmed.

signUpResponse_userSub :: Lens' SignUpResponse Text Source #

The UUID of the authenticated user. This is not the same as username.