Class: AWSCDK::Cognito::CfnUserPool::LambdaConfigProperty

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
cognito/cfn_user_pool.rb

Overview

A collection of user pool Lambda triggers.

Amazon Cognito invokes triggers at several possible stages of user pool operations. Triggers can modify the outcome of the operations that invoked them.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(create_auth_challenge: nil, custom_email_sender: nil, custom_message: nil, custom_sms_sender: nil, define_auth_challenge: nil, inbound_federation: nil, kms_key_id: nil, post_authentication: nil, post_confirmation: nil, pre_authentication: nil, pre_sign_up: nil, pre_token_generation: nil, pre_token_generation_config: nil, user_migration: nil, verify_auth_challenge_response: nil) ⇒ LambdaConfigProperty

Returns a new instance of LambdaConfigProperty.

Parameters:



1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
# File 'cognito/cfn_user_pool.rb', line 1451

def initialize(create_auth_challenge: nil, custom_email_sender: nil, custom_message: nil, custom_sms_sender: nil, define_auth_challenge: nil, inbound_federation: nil, kms_key_id: nil, post_authentication: nil, post_confirmation: nil, pre_authentication: nil, pre_sign_up: nil, pre_token_generation: nil, pre_token_generation_config: nil, user_migration: nil, verify_auth_challenge_response: nil)
  @create_auth_challenge = create_auth_challenge
  Jsii::Type.check_type(@create_auth_challenge, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "createAuthChallenge") unless @create_auth_challenge.nil?
  @custom_email_sender = custom_email_sender.is_a?(Hash) ? ::AWSCDK::Cognito::CfnUserPool::CustomEmailSenderProperty.new(**custom_email_sender.transform_keys(&:to_sym)) : custom_email_sender
  Jsii::Type.check_type(@custom_email_sender, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19jb2duaXRvLkNmblVzZXJQb29sLkN1c3RvbUVtYWlsU2VuZGVyUHJvcGVydHkifV19fQ==")), "customEmailSender") unless @custom_email_sender.nil?
  @custom_message = custom_message
  Jsii::Type.check_type(@custom_message, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "customMessage") unless @custom_message.nil?
  @custom_sms_sender = custom_sms_sender.is_a?(Hash) ? ::AWSCDK::Cognito::CfnUserPool::CustomSMSSenderProperty.new(**custom_sms_sender.transform_keys(&:to_sym)) : custom_sms_sender
  Jsii::Type.check_type(@custom_sms_sender, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19jb2duaXRvLkNmblVzZXJQb29sLkN1c3RvbVNNU1NlbmRlclByb3BlcnR5In1dfX0=")), "customSmsSender") unless @custom_sms_sender.nil?
  @define_auth_challenge = define_auth_challenge
  Jsii::Type.check_type(@define_auth_challenge, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "defineAuthChallenge") unless @define_auth_challenge.nil?
  @inbound_federation = inbound_federation.is_a?(Hash) ? ::AWSCDK::Cognito::CfnUserPool::InboundFederationProperty.new(**inbound_federation.transform_keys(&:to_sym)) : inbound_federation
  Jsii::Type.check_type(@inbound_federation, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19jb2duaXRvLkNmblVzZXJQb29sLkluYm91bmRGZWRlcmF0aW9uUHJvcGVydHkifV19fQ==")), "inboundFederation") unless @inbound_federation.nil?
  @kms_key_id = kms_key_id
  Jsii::Type.check_type(@kms_key_id, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "kmsKeyId") unless @kms_key_id.nil?
  @post_authentication = post_authentication
  Jsii::Type.check_type(@post_authentication, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "postAuthentication") unless @post_authentication.nil?
  @post_confirmation = post_confirmation
  Jsii::Type.check_type(@post_confirmation, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "postConfirmation") unless @post_confirmation.nil?
  @pre_authentication = pre_authentication
  Jsii::Type.check_type(@pre_authentication, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "preAuthentication") unless @pre_authentication.nil?
  @pre_sign_up = 
  Jsii::Type.check_type(@pre_sign_up, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "preSignUp") unless @pre_sign_up.nil?
  @pre_token_generation = pre_token_generation
  Jsii::Type.check_type(@pre_token_generation, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "preTokenGeneration") unless @pre_token_generation.nil?
  @pre_token_generation_config = pre_token_generation_config.is_a?(Hash) ? ::AWSCDK::Cognito::CfnUserPool::PreTokenGenerationConfigProperty.new(**pre_token_generation_config.transform_keys(&:to_sym)) : pre_token_generation_config
  Jsii::Type.check_type(@pre_token_generation_config, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19jb2duaXRvLkNmblVzZXJQb29sLlByZVRva2VuR2VuZXJhdGlvbkNvbmZpZ1Byb3BlcnR5In1dfX0=")), "preTokenGenerationConfig") unless @pre_token_generation_config.nil?
  @user_migration = user_migration
  Jsii::Type.check_type(@user_migration, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "userMigration") unless @user_migration.nil?
  @verify_auth_challenge_response = verify_auth_challenge_response
  Jsii::Type.check_type(@verify_auth_challenge_response, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "verifyAuthChallengeResponse") unless @verify_auth_challenge_response.nil?
end

Instance Attribute Details

#create_auth_challengeString? (readonly)

The configuration of a create auth challenge Lambda trigger, one of three triggers in the sequence of the custom authentication challenge triggers .



1488
1489
1490
# File 'cognito/cfn_user_pool.rb', line 1488

def create_auth_challenge
  @create_auth_challenge
end

#custom_email_senderAWSCDK::IResolvable, ... (readonly)

The configuration of a custom email sender Lambda trigger.

This trigger routes all email notifications from a user pool to a Lambda function that delivers the message using custom logic.



1495
1496
1497
# File 'cognito/cfn_user_pool.rb', line 1495

def custom_email_sender
  @custom_email_sender
end

#custom_messageString? (readonly)

A custom message Lambda trigger.

This trigger is an opportunity to customize all SMS and email messages from your user pool. When a custom message trigger is active, your user pool routes all messages to a Lambda function that returns a runtime-customized message subject and body for your user pool to deliver to a user.



1502
1503
1504
# File 'cognito/cfn_user_pool.rb', line 1502

def custom_message
  @custom_message
end

#custom_sms_senderAWSCDK::IResolvable, ... (readonly)

The configuration of a custom SMS sender Lambda trigger.

This trigger routes all SMS notifications from a user pool to a Lambda function that delivers the message using custom logic.



1509
1510
1511
# File 'cognito/cfn_user_pool.rb', line 1509

def custom_sms_sender
  @custom_sms_sender
end

#define_auth_challengeString? (readonly)

The configuration of a define auth challenge Lambda trigger, one of three triggers in the sequence of the custom authentication challenge triggers .



1514
1515
1516
# File 'cognito/cfn_user_pool.rb', line 1514

def define_auth_challenge
  @define_auth_challenge
end

#inbound_federationAWSCDK::IResolvable, ... (readonly)



1517
1518
1519
# File 'cognito/cfn_user_pool.rb', line 1517

def inbound_federation
  @inbound_federation
end

#kms_key_idString? (readonly)

The ARN of an KMS key . Amazon Cognito uses the key to encrypt codes and temporary passwords sent to custom sender Lambda triggers.



1522
1523
1524
# File 'cognito/cfn_user_pool.rb', line 1522

def kms_key_id
  @kms_key_id
end

#post_authenticationString? (readonly)

The configuration of a post authentication Lambda trigger in a user pool. This trigger can take custom actions after a user signs in.



1527
1528
1529
# File 'cognito/cfn_user_pool.rb', line 1527

def post_authentication
  @post_authentication
end

#post_confirmationString? (readonly)

The configuration of a post confirmation Lambda trigger in a user pool. This trigger can take custom actions after a user confirms their user account and their email address or phone number.



1532
1533
1534
# File 'cognito/cfn_user_pool.rb', line 1532

def post_confirmation
  @post_confirmation
end

#pre_authenticationString? (readonly)

The configuration of a pre authentication trigger in a user pool. This trigger can evaluate and modify user sign-in events.



1537
1538
1539
# File 'cognito/cfn_user_pool.rb', line 1537

def pre_authentication
  @pre_authentication
end

#pre_sign_upString? (readonly)

The configuration of a pre sign-up Lambda trigger in a user pool. This trigger evaluates new users and can bypass confirmation, link a federated user profile , or block sign-up requests.



1542
1543
1544
# File 'cognito/cfn_user_pool.rb', line 1542

def 
  @pre_sign_up
end

#pre_token_generationString? (readonly)

The legacy configuration of a pre token generation Lambda trigger in a user pool.

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 .



1549
1550
1551
# File 'cognito/cfn_user_pool.rb', line 1549

def pre_token_generation
  @pre_token_generation
end

#pre_token_generation_configAWSCDK::IResolvable, ... (readonly)

The detailed configuration of a pre token generation Lambda trigger in a user pool. If you also set an ARN in PreTokenGeneration , its value must be identical to PreTokenGenerationConfig .



1554
1555
1556
# File 'cognito/cfn_user_pool.rb', line 1554

def pre_token_generation_config
  @pre_token_generation_config
end

#user_migrationString? (readonly)

The configuration of a migrate user Lambda trigger in a user pool. This trigger can create user profiles when users sign in or attempt to reset their password with credentials that don't exist yet.



1559
1560
1561
# File 'cognito/cfn_user_pool.rb', line 1559

def user_migration
  @user_migration
end

#verify_auth_challenge_responseString? (readonly)

The configuration of a verify auth challenge Lambda trigger, one of three triggers in the sequence of the custom authentication challenge triggers .



1564
1565
1566
# File 'cognito/cfn_user_pool.rb', line 1564

def verify_auth_challenge_response
  @verify_auth_challenge_response
end

Class Method Details

.jsii_propertiesObject



1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
# File 'cognito/cfn_user_pool.rb', line 1566

def self.jsii_properties
  {
    :create_auth_challenge => "createAuthChallenge",
    :custom_email_sender => "customEmailSender",
    :custom_message => "customMessage",
    :custom_sms_sender => "customSmsSender",
    :define_auth_challenge => "defineAuthChallenge",
    :inbound_federation => "inboundFederation",
    :kms_key_id => "kmsKeyId",
    :post_authentication => "postAuthentication",
    :post_confirmation => "postConfirmation",
    :pre_authentication => "preAuthentication",
    :pre_sign_up => "preSignUp",
    :pre_token_generation => "preTokenGeneration",
    :pre_token_generation_config => "preTokenGenerationConfig",
    :user_migration => "userMigration",
    :verify_auth_challenge_response => "verifyAuthChallengeResponse",
  }
end

Instance Method Details

#to_jsiiObject



1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
# File 'cognito/cfn_user_pool.rb', line 1586

def to_jsii
  result = {}
  result.merge!({
    "createAuthChallenge" => @create_auth_challenge,
    "customEmailSender" => @custom_email_sender,
    "customMessage" => @custom_message,
    "customSmsSender" => @custom_sms_sender,
    "defineAuthChallenge" => @define_auth_challenge,
    "inboundFederation" => @inbound_federation,
    "kmsKeyId" => @kms_key_id,
    "postAuthentication" => @post_authentication,
    "postConfirmation" => @post_confirmation,
    "preAuthentication" => @pre_authentication,
    "preSignUp" => @pre_sign_up,
    "preTokenGeneration" => @pre_token_generation,
    "preTokenGenerationConfig" => @pre_token_generation_config,
    "userMigration" => @user_migration,
    "verifyAuthChallengeResponse" => @verify_auth_challenge_response,
  })
  result.compact
end