Class UserPoolOperation
User pool operations to which lambda triggers can be attached.
Inheritance
Namespace: Amazon.CDK.AWS.Cognito
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public class UserPoolOperation : DeputyBase
Syntax (vb)
Public Class UserPoolOperation
Inherits DeputyBase
Remarks
ExampleMetadata: infused
Examples
var authChallengeFn = new Function(this, "authChallengeFn", new FunctionProps {
Runtime = Runtime.NODEJS_LATEST,
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_LATEST,
Handler = "index.handler",
Code = Code.FromAsset(Join(__dirname, "path/to/asset"))
}));
Synopsis
Constructors
UserPoolOperation(ByRefValue) | Used by jsii to construct an instance of this class from a Javascript-owned object reference |
UserPoolOperation(DeputyBase.DeputyProps) | Used by jsii to construct an instance of this class from DeputyProps |
Properties
CREATE_AUTH_CHALLENGE | Creates a challenge in a custom auth flow. |
CUSTOM_EMAIL_SENDER | Amazon Cognito invokes this trigger to send email notifications to users. |
CUSTOM_MESSAGE | Advanced customization and localization of messages. |
CUSTOM_SMS_SENDER | Amazon Cognito invokes this trigger to send email notifications to users. |
DEFINE_AUTH_CHALLENGE | Determines the next challenge in a custom auth flow. |
OperationName | The key to use in |
POST_AUTHENTICATION | Event logging for custom analytics. |
POST_CONFIRMATION | Custom welcome messages or event logging for custom analytics. |
PRE_AUTHENTICATION | Custom validation to accept or deny the sign-in request. |
PRE_SIGN_UP | Custom validation to accept or deny the sign-up request. |
PRE_TOKEN_GENERATION | Add or remove attributes in Id tokens. |
PRE_TOKEN_GENERATION_CONFIG | Add or remove attributes in Id tokens. |
USER_MIGRATION | Migrate a user from an existing user directory to user pools. |
VERIFY_AUTH_CHALLENGE_RESPONSE | Determines if a response is correct in a custom auth flow. |
Methods
Of(String) | A custom user pool operation. |
Constructors
UserPoolOperation(ByRefValue)
Used by jsii to construct an instance of this class from a Javascript-owned object reference
protected UserPoolOperation(ByRefValue reference)
Parameters
- reference Amazon.JSII.Runtime.Deputy.ByRefValue
The Javascript-owned object reference
UserPoolOperation(DeputyBase.DeputyProps)
Used by jsii to construct an instance of this class from DeputyProps
protected UserPoolOperation(DeputyBase.DeputyProps props)
Parameters
- props Amazon.JSII.Runtime.Deputy.DeputyBase.DeputyProps
The deputy props
Properties
CREATE_AUTH_CHALLENGE
Creates a challenge in a custom auth flow.
public static UserPoolOperation CREATE_AUTH_CHALLENGE { get; }
Property Value
Remarks
CUSTOM_EMAIL_SENDER
Amazon Cognito invokes this trigger to send email notifications to users.
public static UserPoolOperation CUSTOM_EMAIL_SENDER { get; }
Property Value
Remarks
CUSTOM_MESSAGE
Advanced customization and localization of messages.
public static UserPoolOperation CUSTOM_MESSAGE { get; }
Property Value
Remarks
CUSTOM_SMS_SENDER
Amazon Cognito invokes this trigger to send email notifications to users.
public static UserPoolOperation CUSTOM_SMS_SENDER { get; }
Property Value
Remarks
DEFINE_AUTH_CHALLENGE
Determines the next challenge in a custom auth flow.
public static UserPoolOperation DEFINE_AUTH_CHALLENGE { get; }
Property Value
Remarks
OperationName
The key to use in CfnUserPool.LambdaConfigProperty
.
public virtual string OperationName { get; }
Property Value
System.String
POST_AUTHENTICATION
Event logging for custom analytics.
public static UserPoolOperation POST_AUTHENTICATION { get; }
Property Value
Remarks
POST_CONFIRMATION
Custom welcome messages or event logging for custom analytics.
public static UserPoolOperation POST_CONFIRMATION { get; }
Property Value
Remarks
PRE_AUTHENTICATION
Custom validation to accept or deny the sign-in request.
public static UserPoolOperation PRE_AUTHENTICATION { get; }
Property Value
Remarks
PRE_SIGN_UP
Custom validation to accept or deny the sign-up request.
public static UserPoolOperation PRE_SIGN_UP { get; }
Property Value
Remarks
PRE_TOKEN_GENERATION
Add or remove attributes in Id tokens.
public static UserPoolOperation PRE_TOKEN_GENERATION { get; }
Property Value
Remarks
Set this parameter for legacy purposes. If you also set an ARN in PreTokenGenerationConfig, its value must be identical to PreTokenGeneration. For new instances of pre token generation triggers, set the LambdaArn of PreTokenGenerationConfig.
See: https://docs.aws.amazon.com/cognito/latest/developerguide/user-pool-lambda-pre-token-generation.html
PRE_TOKEN_GENERATION_CONFIG
Add or remove attributes in Id tokens.
public static UserPoolOperation PRE_TOKEN_GENERATION_CONFIG { get; }
Property Value
Remarks
USER_MIGRATION
Migrate a user from an existing user directory to user pools.
public static UserPoolOperation USER_MIGRATION { get; }
Property Value
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
Remarks
Methods
Of(String)
A custom user pool operation.
public static UserPoolOperation Of(string name)
Parameters
- name System.String
Returns