Class: AWSCDK::Cognito::CfnUserPool::AdminCreateUserConfigProperty

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

Overview

The settings for administrator creation of users in a user pool.

Contains settings for allowing user sign-up, customizing invitation messages to new users, and the amount of time before temporary passwords expire.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(allow_admin_create_user_only: nil, invite_message_template: nil, unused_account_validity_days: nil) ⇒ AdminCreateUserConfigProperty

Returns a new instance of AdminCreateUserConfigProperty.

Parameters:



993
994
995
996
997
998
999
1000
# File 'cognito/cfn_user_pool.rb', line 993

def initialize(allow_admin_create_user_only: nil, invite_message_template: nil, unused_account_validity_days: nil)
  @allow_admin_create_user_only = allow_admin_create_user_only
  Jsii::Type.check_type(@allow_admin_create_user_only, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3sicHJpbWl0aXZlIjoiYm9vbGVhbiJ9LHsiZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifV19fQ==")), "allowAdminCreateUserOnly") unless @allow_admin_create_user_only.nil?
  @invite_message_template = invite_message_template.is_a?(Hash) ? ::AWSCDK::Cognito::CfnUserPool::InviteMessageTemplateProperty.new(**invite_message_template.transform_keys(&:to_sym)) : invite_message_template
  Jsii::Type.check_type(@invite_message_template, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19jb2duaXRvLkNmblVzZXJQb29sLkludml0ZU1lc3NhZ2VUZW1wbGF0ZVByb3BlcnR5In1dfX0=")), "inviteMessageTemplate") unless @invite_message_template.nil?
  @unused_account_validity_days = 
  Jsii::Type.check_type(@unused_account_validity_days, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "unusedAccountValidityDays") unless @unused_account_validity_days.nil?
end

Instance Attribute Details

#allow_admin_create_user_onlyBoolean, ... (readonly)

The setting for allowing self-service sign-up.

When true , only administrators can create new user profiles. When false , users can register themselves and create a new user profile with the SignUp operation.



1008
1009
1010
# File 'cognito/cfn_user_pool.rb', line 1008

def allow_admin_create_user_only
  @allow_admin_create_user_only
end

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

The template for the welcome message to new users.

This template must include the {####} temporary password placeholder if you are creating users with passwords. If your users don't have passwords, you can omit the placeholder.

See also Customizing User Invitation Messages .



1017
1018
1019
# File 'cognito/cfn_user_pool.rb', line 1017

def invite_message_template
  @invite_message_template
end

#unused_account_validity_daysNumeric? (readonly)

This parameter is no longer in use.

The password expiration limit in days for administrator-created users. When this time expires, the user can't sign in with their temporary password. To reset the account after that time limit, you must call AdminCreateUser again, specifying RESEND for the MessageAction parameter.

The default value for this parameter is 7.



1026
1027
1028
# File 'cognito/cfn_user_pool.rb', line 1026

def 
  @unused_account_validity_days
end

Class Method Details

.jsii_propertiesObject



1028
1029
1030
1031
1032
1033
1034
# File 'cognito/cfn_user_pool.rb', line 1028

def self.jsii_properties
  {
    :allow_admin_create_user_only => "allowAdminCreateUserOnly",
    :invite_message_template => "inviteMessageTemplate",
    :unused_account_validity_days => "unusedAccountValidityDays",
  }
end

Instance Method Details

#to_jsiiObject



1036
1037
1038
1039
1040
1041
1042
1043
1044
# File 'cognito/cfn_user_pool.rb', line 1036

def to_jsii
  result = {}
  result.merge!({
    "allowAdminCreateUserOnly" => @allow_admin_create_user_only,
    "inviteMessageTemplate" => @invite_message_template,
    "unusedAccountValidityDays" => @unused_account_validity_days,
  })
  result.compact
end