UserPoolTriggers
- class aws_cdk.aws_cognito.UserPoolTriggers(*, create_auth_challenge=None, custom_email_sender=None, custom_message=None, custom_sms_sender=None, define_auth_challenge=None, post_authentication=None, post_confirmation=None, pre_authentication=None, pre_sign_up=None, pre_token_generation=None, user_migration=None, verify_auth_challenge_response=None)
Bases:
object
Triggers for a user pool.
- Parameters:
create_auth_challenge (
Optional
[IFunction
]) – Creates an authentication challenge. Default: - no trigger configuredcustom_email_sender (
Optional
[IFunction
]) – Amazon Cognito invokes this trigger to send email notifications to users. Default: - no trigger configuredcustom_message (
Optional
[IFunction
]) – A custom Message AWS Lambda trigger. Default: - no trigger configuredcustom_sms_sender (
Optional
[IFunction
]) – Amazon Cognito invokes this trigger to send SMS notifications to users. Default: - no trigger configureddefine_auth_challenge (
Optional
[IFunction
]) – Defines the authentication challenge. Default: - no trigger configuredpost_authentication (
Optional
[IFunction
]) – A post-authentication AWS Lambda trigger. Default: - no trigger configuredpost_confirmation (
Optional
[IFunction
]) – A post-confirmation AWS Lambda trigger. Default: - no trigger configuredpre_authentication (
Optional
[IFunction
]) – A pre-authentication AWS Lambda trigger. Default: - no trigger configuredpre_sign_up (
Optional
[IFunction
]) – A pre-registration AWS Lambda trigger. Default: - no trigger configuredpre_token_generation (
Optional
[IFunction
]) – A pre-token-generation AWS Lambda trigger. Default: - no trigger configureduser_migration (
Optional
[IFunction
]) – A user-migration AWS Lambda trigger. Default: - no trigger configuredverify_auth_challenge_response (
Optional
[IFunction
]) – Verifies the authentication challenge response. Default: - no trigger configured
- See:
- ExampleMetadata:
infused
Example:
auth_challenge_fn = lambda_.Function(self, "authChallengeFn", runtime=lambda_.Runtime.NODEJS_14_X, handler="index.handler", code=lambda_.Code.from_asset(path.join(__dirname, "path/to/asset")) ) userpool = cognito.UserPool(self, "myuserpool", # ... lambda_triggers=cognito.UserPoolTriggers( create_auth_challenge=auth_challenge_fn ) ) userpool.add_trigger(cognito.UserPoolOperation.USER_MIGRATION, lambda_.Function(self, "userMigrationFn", runtime=lambda_.Runtime.NODEJS_14_X, handler="index.handler", code=lambda_.Code.from_asset(path.join(__dirname, "path/to/asset")) ))
Attributes
- create_auth_challenge
Creates an authentication challenge.
- Default:
no trigger configured
- See:
- custom_email_sender
Amazon Cognito invokes this trigger to send email notifications to users.
- Default:
no trigger configured
- See:
- custom_message
A custom Message AWS Lambda trigger.
- Default:
no trigger configured
- See:
- custom_sms_sender
Amazon Cognito invokes this trigger to send SMS notifications to users.
- Default:
no trigger configured
- See:
- define_auth_challenge
Defines the authentication challenge.
- Default:
no trigger configured
- See:
- post_authentication
A post-authentication AWS Lambda trigger.
- Default:
no trigger configured
- See:
- post_confirmation
A post-confirmation AWS Lambda trigger.
- Default:
no trigger configured
- See:
- pre_authentication
A pre-authentication AWS Lambda trigger.
- Default:
no trigger configured
- See:
- pre_sign_up
A pre-registration AWS Lambda trigger.
- Default:
no trigger configured
- See:
- pre_token_generation
A pre-token-generation AWS Lambda trigger.
- Default:
no trigger configured
- See:
- user_migration
A user-migration AWS Lambda trigger.
- Default:
no trigger configured
- See:
- verify_auth_challenge_response
Verifies the authentication challenge response.
- Default:
no trigger configured
- See: