Copyright | (c) 2013-2021 Brendan Hay |
---|---|
License | Mozilla Public License, v. 2.0. |
Maintainer | Brendan Hay <brendan.g.hay+amazonka@gmail.com> |
Stability | auto-generated |
Portability | non-portable (GHC extensions) |
Safe Haskell | None |
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
- data SignUp = SignUp' {
- clientMetadata :: Maybe (HashMap Text Text)
- analyticsMetadata :: Maybe AnalyticsMetadataType
- userContextData :: Maybe UserContextDataType
- userAttributes :: Maybe [AttributeType]
- secretHash :: Maybe (Sensitive Text)
- validationData :: Maybe [AttributeType]
- clientId :: Sensitive Text
- username :: Sensitive Text
- password :: Sensitive Text
- newSignUp :: Text -> Text -> Text -> SignUp
- signUp_clientMetadata :: Lens' SignUp (Maybe (HashMap Text Text))
- signUp_analyticsMetadata :: Lens' SignUp (Maybe AnalyticsMetadataType)
- signUp_userContextData :: Lens' SignUp (Maybe UserContextDataType)
- signUp_userAttributes :: Lens' SignUp (Maybe [AttributeType])
- signUp_secretHash :: Lens' SignUp (Maybe Text)
- signUp_validationData :: Lens' SignUp (Maybe [AttributeType])
- signUp_clientId :: Lens' SignUp Text
- signUp_username :: Lens' SignUp Text
- signUp_password :: Lens' SignUp Text
- data SignUpResponse = SignUpResponse' {}
- newSignUpResponse :: Int -> Bool -> Text -> SignUpResponse
- signUpResponse_codeDeliveryDetails :: Lens' SignUpResponse (Maybe CodeDeliveryDetailsType)
- signUpResponse_httpStatus :: Lens' SignUpResponse Int
- signUpResponse_userConfirmed :: Lens' SignUpResponse Bool
- signUpResponse_userSub :: Lens' SignUpResponse Text
Creating a Request
Represents the request to register a user.
See: newSignUp
smart constructor.
SignUp' | |
|
Instances
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.
Destructuring the Response
data SignUpResponse Source #
The response from the server for a registration request.
See: newSignUpResponse
smart constructor.
SignUpResponse' | |
|
Instances
:: Int | |
-> Bool | |
-> Text | |
-> SignUpResponse |
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
.