Table of Contents

Class UserPoolOperation

Namespace
Amazon.CDK.AWS.Cognito
Assembly
Amazon.CDK.AWS.Cognito.dll

User pool operations to which lambda triggers can be attached.

public class UserPoolOperation : DeputyBase
Inheritance
UserPoolOperation

Examples

var authChallengeFn = new Function(this, "authChallengeFn", new FunctionProps {
                Runtime = Runtime.NODEJS_14_X,
                Handler = "index.handler",
                Code = Code.FromAsset(Join(__dirname, "path/to/asset"))
            });

            var userpool = new UserPool(this, "myuserpool", new UserPoolProps {
                // ...
                LambdaTriggers = new UserPoolTriggers {
                    CreateAuthChallenge = authChallengeFn
                }
            });

            userpool.AddTrigger(UserPoolOperation.USER_MIGRATION, new Function(this, "userMigrationFn", new FunctionProps {
                Runtime = Runtime.NODEJS_14_X,
                Handler = "index.handler",
                Code = Code.FromAsset(Join(__dirname, "path/to/asset"))
            }));

Remarks

ExampleMetadata: infused

Properties

CREATE_AUTH_CHALLENGE

Creates a challenge in a custom auth flow.

public static UserPoolOperation CREATE_AUTH_CHALLENGE { get; }

Property Value

UserPoolOperation

Remarks

CUSTOM_EMAIL_SENDER

Amazon Cognito invokes this trigger to send email notifications to users.

public static UserPoolOperation CUSTOM_EMAIL_SENDER { get; }

Property Value

UserPoolOperation

Remarks

CUSTOM_MESSAGE

Advanced customization and localization of messages.

public static UserPoolOperation CUSTOM_MESSAGE { get; }

Property Value

UserPoolOperation

Remarks

CUSTOM_SMS_SENDER

Amazon Cognito invokes this trigger to send email notifications to users.

public static UserPoolOperation CUSTOM_SMS_SENDER { get; }

Property Value

UserPoolOperation

Remarks

DEFINE_AUTH_CHALLENGE

Determines the next challenge in a custom auth flow.

public static UserPoolOperation DEFINE_AUTH_CHALLENGE { get; }

Property Value

UserPoolOperation

Remarks

OperationName

The key to use in CfnUserPool.LambdaConfigProperty.

public virtual string OperationName { get; }

Property Value

string

POST_AUTHENTICATION

Event logging for custom analytics.

public static UserPoolOperation POST_AUTHENTICATION { get; }

Property Value

UserPoolOperation

Remarks

POST_CONFIRMATION

Custom welcome messages or event logging for custom analytics.

public static UserPoolOperation POST_CONFIRMATION { get; }

Property Value

UserPoolOperation

Remarks

PRE_AUTHENTICATION

Custom validation to accept or deny the sign-in request.

public static UserPoolOperation PRE_AUTHENTICATION { get; }

Property Value

UserPoolOperation

Remarks

PRE_SIGN_UP

Custom validation to accept or deny the sign-up request.

public static UserPoolOperation PRE_SIGN_UP { get; }

Property Value

UserPoolOperation

Remarks

PRE_TOKEN_GENERATION

Add or remove attributes in Id tokens.

public static UserPoolOperation PRE_TOKEN_GENERATION { get; }

Property Value

UserPoolOperation

Remarks

USER_MIGRATION

Migrate a user from an existing user directory to user pools.

public static UserPoolOperation USER_MIGRATION { get; }

Property Value

UserPoolOperation

Remarks

VERIFY_AUTH_CHALLENGE_RESPONSE

Determines if a response is correct in a custom auth flow.

public static UserPoolOperation VERIFY_AUTH_CHALLENGE_RESPONSE { get; }

Property Value

UserPoolOperation

Remarks

Methods

Of(string)

A custom user pool operation.

public static UserPoolOperation Of(string name)

Parameters

name string

Returns

UserPoolOperation