Class: AWSCDK::Cognito::UserPoolDomainProps

Inherits:
UserPoolDomainOptions
  • Object
show all
Defined in:
cognito/user_pool_domain_props.rb

Overview

Props for UserPoolDomain construct.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(cognito_domain: nil, custom_domain: nil, managed_login_version: nil, user_pool:) ⇒ UserPoolDomainProps

Returns a new instance of UserPoolDomainProps.

Parameters:



11
12
13
14
15
16
17
18
19
20
# File 'cognito/user_pool_domain_props.rb', line 11

def initialize(cognito_domain: nil, custom_domain: nil, managed_login_version: nil, user_pool:)
  @cognito_domain = cognito_domain.is_a?(Hash) ? ::AWSCDK::Cognito::CognitoDomainOptions.new(**cognito_domain.transform_keys(&:to_sym)) : cognito_domain
  Jsii::Type.check_type(@cognito_domain, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfY29nbml0by5Db2duaXRvRG9tYWluT3B0aW9ucyJ9")), "cognitoDomain") unless @cognito_domain.nil?
  @custom_domain = custom_domain.is_a?(Hash) ? ::AWSCDK::Cognito::CustomDomainOptions.new(**custom_domain.transform_keys(&:to_sym)) : custom_domain
  Jsii::Type.check_type(@custom_domain, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfY29nbml0by5DdXN0b21Eb21haW5PcHRpb25zIn0=")), "customDomain") unless @custom_domain.nil?
  @managed_login_version = 
  Jsii::Type.check_type(@managed_login_version, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfY29nbml0by5NYW5hZ2VkTG9naW5WZXJzaW9uIn0=")), "managedLoginVersion") unless @managed_login_version.nil?
  @user_pool = user_pool
  Jsii::Type.check_type(@user_pool, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5pbnRlcmZhY2VzLmF3c19jb2duaXRvLklVc2VyUG9vbFJlZiJ9")), "userPool")
end

Instance Attribute Details

#cognito_domainAWSCDK::Cognito::CognitoDomainOptions? (readonly)

Note:

Default: - not set if customDomain is specified, otherwise, throws an error.

Associate a cognito prefix domain with your user pool Either customDomain or cognitoDomain must be specified.



27
28
29
# File 'cognito/user_pool_domain_props.rb', line 27

def cognito_domain
  @cognito_domain
end

#custom_domainAWSCDK::Cognito::CustomDomainOptions? (readonly)

Note:

Default: - not set if cognitoDomain is specified, otherwise, throws an error.

Associate a custom domain with your user pool Either customDomain or cognitoDomain must be specified.



33
34
35
# File 'cognito/user_pool_domain_props.rb', line 33

def custom_domain
  @custom_domain
end

#managed_login_versionAWSCDK::Cognito::ManagedLoginVersion? (readonly)

Note:

Default: undefined - Cognito default setting is ManagedLoginVersion.CLASSIC_HOSTED_UI

A version that indicates the state of managed login.

This choice applies to all app clients that host services at the domain.



41
42
43
# File 'cognito/user_pool_domain_props.rb', line 41

def 
  @managed_login_version
end

#user_poolAWSCDK::Interfaces::AWSCognito::IUserPoolRef (readonly)

The user pool to which this domain should be associated.



45
46
47
# File 'cognito/user_pool_domain_props.rb', line 45

def user_pool
  @user_pool
end

Class Method Details

.jsii_propertiesObject



47
48
49
50
51
52
53
54
# File 'cognito/user_pool_domain_props.rb', line 47

def self.jsii_properties
  {
    :cognito_domain => "cognitoDomain",
    :custom_domain => "customDomain",
    :managed_login_version => "managedLoginVersion",
    :user_pool => "userPool",
  }
end

Instance Method Details

#to_jsiiObject



56
57
58
59
60
61
62
63
64
65
66
# File 'cognito/user_pool_domain_props.rb', line 56

def to_jsii
  result = {}
  result.merge!(super)
  result.merge!({
    "cognitoDomain" => @cognito_domain,
    "customDomain" => @custom_domain,
    "managedLoginVersion" => @managed_login_version,
    "userPool" => @user_pool,
  })
  result.compact
end