aws_sdk_cognitoidentityprovider/client/sign_up.rs
1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2impl super::Client {
3 /// Constructs a fluent builder for the [`SignUp`](crate::operation::sign_up::builders::SignUpFluentBuilder) operation.
4 ///
5 /// - The fluent builder is configurable:
6 /// - [`client_id(impl Into<String>)`](crate::operation::sign_up::builders::SignUpFluentBuilder::client_id) / [`set_client_id(Option<String>)`](crate::operation::sign_up::builders::SignUpFluentBuilder::set_client_id):<br>required: **true**<br><p>The ID of the app client where the user wants to sign up.</p><br>
7 /// - [`secret_hash(impl Into<String>)`](crate::operation::sign_up::builders::SignUpFluentBuilder::secret_hash) / [`set_secret_hash(Option<String>)`](crate::operation::sign_up::builders::SignUpFluentBuilder::set_secret_hash):<br>required: **false**<br><p>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. For more information about <code>SecretHash</code>, see <a href="https://docs.aws.amazon.com/cognito/latest/developerguide/signing-up-users-in-your-app.html#cognito-user-pools-computing-secret-hash">Computing secret hash values</a>.</p><br>
8 /// - [`username(impl Into<String>)`](crate::operation::sign_up::builders::SignUpFluentBuilder::username) / [`set_username(Option<String>)`](crate::operation::sign_up::builders::SignUpFluentBuilder::set_username):<br>required: **true**<br><p>The username of the user that you want to sign up. The value of this parameter is typically a username, but can be any alias attribute in your user pool.</p><br>
9 /// - [`password(impl Into<String>)`](crate::operation::sign_up::builders::SignUpFluentBuilder::password) / [`set_password(Option<String>)`](crate::operation::sign_up::builders::SignUpFluentBuilder::set_password):<br>required: **false**<br><p>The user's proposed password. The password must comply with the <a href="https://docs.aws.amazon.com/cognito/latest/developerguide/managing-users-passwords.html">password requirements</a> of your user pool.</p> <p>Users can sign up without a password when your user pool supports passwordless sign-in with email or SMS OTPs. To create a user with no password, omit this parameter or submit a blank value. You can only create a passwordless user when passwordless sign-in is available.</p><br>
10 /// - [`user_attributes(AttributeType)`](crate::operation::sign_up::builders::SignUpFluentBuilder::user_attributes) / [`set_user_attributes(Option<Vec::<AttributeType>>)`](crate::operation::sign_up::builders::SignUpFluentBuilder::set_user_attributes):<br>required: **false**<br><p>An array of name-value pairs representing user attributes.</p> <p>For custom attributes, include a <code>custom:</code> prefix in the attribute name, for example <code>custom:department</code>.</p><br>
11 /// - [`validation_data(AttributeType)`](crate::operation::sign_up::builders::SignUpFluentBuilder::validation_data) / [`set_validation_data(Option<Vec::<AttributeType>>)`](crate::operation::sign_up::builders::SignUpFluentBuilder::set_validation_data):<br>required: **false**<br><p>Temporary user attributes that contribute to the outcomes of your pre sign-up Lambda trigger. This set of key-value pairs are for custom validation of information that you collect from your users but don't need to retain.</p> <p>Your Lambda function can analyze this additional data and act on it. Your function can automatically confirm and verify select users or perform external API operations like logging user attributes and validation data to Amazon CloudWatch Logs.</p> <p>For more information about the pre sign-up Lambda trigger, see <a href="https://docs.aws.amazon.com/cognito/latest/developerguide/user-pool-lambda-pre-sign-up.html">Pre sign-up Lambda trigger</a>.</p><br>
12 /// - [`analytics_metadata(AnalyticsMetadataType)`](crate::operation::sign_up::builders::SignUpFluentBuilder::analytics_metadata) / [`set_analytics_metadata(Option<AnalyticsMetadataType>)`](crate::operation::sign_up::builders::SignUpFluentBuilder::set_analytics_metadata):<br>required: **false**<br><p>Information that supports analytics outcomes with Amazon Pinpoint, including the user's endpoint ID. The endpoint ID is a destination for Amazon Pinpoint push notifications, for example a device identifier, email address, or phone number.</p><br>
13 /// - [`user_context_data(UserContextDataType)`](crate::operation::sign_up::builders::SignUpFluentBuilder::user_context_data) / [`set_user_context_data(Option<UserContextDataType>)`](crate::operation::sign_up::builders::SignUpFluentBuilder::set_user_context_data):<br>required: **false**<br><p>Contextual data about your user session like the device fingerprint, IP address, or location. Amazon Cognito threat protection 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.</p> <p>For more information, see <a href="https://docs.aws.amazon.com/cognito/latest/developerguide/user-pool-settings-viewing-threat-protection-app.html">Collecting data for threat protection in applications</a>.</p><br>
14 /// - [`client_metadata(impl Into<String>, impl Into<String>)`](crate::operation::sign_up::builders::SignUpFluentBuilder::client_metadata) / [`set_client_metadata(Option<HashMap::<String, String>>)`](crate::operation::sign_up::builders::SignUpFluentBuilder::set_client_metadata):<br>required: **false**<br><p>A map of custom key-value pairs that you can provide as input for any custom workflows that this action triggers.</p> <p>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: <i>pre sign-up</i>, <i>custom message</i>, and <i>post confirmation</i>. When Amazon Cognito invokes any of these functions, it passes a JSON payload, which the function receives as input. This payload contains a <code>clientMetadata</code> 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 <code>clientMetadata</code> value to enhance your workflow for your specific needs.</p> <p>For more information, see <a href="https://docs.aws.amazon.com/cognito/latest/developerguide/cognito-user-identity-pools-working-with-aws-lambda-triggers.html"> Using Lambda triggers</a> in the <i>Amazon Cognito Developer Guide</i>.</p><note> <p>When you use the <code>ClientMetadata</code> parameter, note that Amazon Cognito won't do the following:</p> <ul> <li> <p>Store the <code>ClientMetadata</code> 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 <code>ClientMetadata</code> parameter serves no purpose.</p></li> <li> <p>Validate the <code>ClientMetadata</code> value.</p></li> <li> <p>Encrypt the <code>ClientMetadata</code> value. Don't send sensitive information in this parameter.</p></li> </ul> </note><br>
15 /// - On success, responds with [`SignUpOutput`](crate::operation::sign_up::SignUpOutput) with field(s):
16 /// - [`user_confirmed(bool)`](crate::operation::sign_up::SignUpOutput::user_confirmed): <p>Indicates whether the user was automatically confirmed. You can auto-confirm users with a <a href="https://docs.aws.amazon.com/cognito/latest/developerguide/user-pool-lambda-pre-sign-up.html">pre sign-up Lambda trigger</a>.</p>
17 /// - [`code_delivery_details(Option<CodeDeliveryDetailsType>)`](crate::operation::sign_up::SignUpOutput::code_delivery_details): <p>In user pools that automatically verify and confirm new users, Amazon Cognito sends users a message with a code or link that confirms ownership of the phone number or email address that they entered. The <code>CodeDeliveryDetails</code> object is information about the delivery destination for that link or code.</p>
18 /// - [`user_sub(String)`](crate::operation::sign_up::SignUpOutput::user_sub): <p>The unique identifier of the new user, for example <code>a1b2c3d4-5678-90ab-cdef-EXAMPLE11111</code>.</p>
19 /// - [`session(Option<String>)`](crate::operation::sign_up::SignUpOutput::session): <p>A session Id that you can pass to <code>ConfirmSignUp</code> when you want to immediately sign in your user with the <code>USER_AUTH</code> flow after they complete sign-up.</p>
20 /// - On failure, responds with [`SdkError<SignUpError>`](crate::operation::sign_up::SignUpError)
21 pub fn sign_up(&self) -> crate::operation::sign_up::builders::SignUpFluentBuilder {
22 crate::operation::sign_up::builders::SignUpFluentBuilder::new(self.handle.clone())
23 }
24}