Copyright | (c) 2013-2023 Brendan Hay |
---|---|
License | Mozilla Public License, v. 2.0. |
Maintainer | Brendan Hay |
Stability | auto-generated |
Portability | non-portable (GHC extensions) |
Safe Haskell | Safe-Inferred |
Language | Haskell2010 |
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, 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 <https:docs.aws.amazon.comsnslatestdgsns-sms-sandbox.html 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.
Synopsis
- data SignUp = SignUp' {
- analyticsMetadata :: Maybe AnalyticsMetadataType
- clientMetadata :: Maybe (HashMap Text Text)
- secretHash :: Maybe (Sensitive Text)
- userAttributes :: Maybe [AttributeType]
- userContextData :: Maybe UserContextDataType
- validationData :: Maybe [AttributeType]
- clientId :: Sensitive Text
- username :: Sensitive Text
- password :: Sensitive Text
- newSignUp :: Text -> Text -> Text -> SignUp
- signUp_analyticsMetadata :: Lens' SignUp (Maybe AnalyticsMetadataType)
- signUp_clientMetadata :: Lens' SignUp (Maybe (HashMap Text Text))
- signUp_secretHash :: Lens' SignUp (Maybe Text)
- signUp_userAttributes :: Lens' SignUp (Maybe [AttributeType])
- signUp_userContextData :: Lens' SignUp (Maybe UserContextDataType)
- 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:analyticsMetadata:SignUp'
, signUp_analyticsMetadata
- The Amazon Pinpoint analytics metadata that contributes to your metrics
for SignUp
calls.
$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.
When you use the ClientMetadata parameter, remember that Amazon Cognito won't do the following:
- 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 doesn't include triggers, the ClientMetadata parameter serves no purpose.
- Validate the ClientMetadata value.
- Encrypt the ClientMetadata value. Don't use Amazon Cognito to provide sensitive information.
$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: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:userContextData:SignUp'
, signUp_userContextData
- Contextual data about your user session, such as the device fingerprint,
IP address, or location. Amazon Cognito advanced security evaluates the
risk of an authentication event based on the context that your app
generates and passes to Amazon Cognito when it makes API requests.
$sel:validationData:SignUp'
, signUp_validationData
- The validation data in the request to register a user.
SignUp
, signUp_clientId
- The ID of the client associated with the user pool.
SignUp
, signUp_username
- The user name of the user you want to register.
$sel:password:SignUp'
, signUp_password
- The password of the user you want to register.
Request Lenses
signUp_analyticsMetadata :: Lens' SignUp (Maybe AnalyticsMetadataType) Source #
The Amazon Pinpoint analytics metadata that contributes to your metrics
for SignUp
calls.
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.
When you use the ClientMetadata parameter, remember that Amazon Cognito won't do the following:
- 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 doesn't include triggers, the ClientMetadata parameter serves no purpose.
- Validate the ClientMetadata value.
- Encrypt the ClientMetadata value. Don't use Amazon Cognito to provide sensitive information.
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_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_userContextData :: Lens' SignUp (Maybe UserContextDataType) Source #
Contextual data about your user session, such as the device fingerprint, IP address, or location. Amazon Cognito advanced security evaluates the risk of an authentication event based on the context that your app generates and passes to Amazon Cognito when it makes API requests.
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 isn't 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 isn't the same as username
.