Class: AWSCDK::AppSync::UserPoolConfig
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::AppSync::UserPoolConfig
- Defined in:
- app_sync/user_pool_config.rb
Overview
Configuration for Cognito user-pools in AppSync.
Instance Attribute Summary collapse
-
#app_id_client_regex ⇒ String?
readonly
the optional app id regex.
-
#default_action ⇒ AWSCDK::AppSync::UserPoolDefaultAction?
readonly
Default auth action.
-
#user_pool ⇒ AWSCDK::Cognito::IUserPool
readonly
The Cognito user pool to use as identity source.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(user_pool:, app_id_client_regex: nil, default_action: nil) ⇒ UserPoolConfig
constructor
A new instance of UserPoolConfig.
- #to_jsii ⇒ Object
Constructor Details
#initialize(user_pool:, app_id_client_regex: nil, default_action: nil) ⇒ UserPoolConfig
Returns a new instance of UserPoolConfig.
10 11 12 13 14 15 16 17 |
# File 'app_sync/user_pool_config.rb', line 10 def initialize(user_pool:, app_id_client_regex: nil, default_action: nil) @user_pool = user_pool Jsii::Type.check_type(@user_pool, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfY29nbml0by5JVXNlclBvb2wifQ==")), "userPool") @app_id_client_regex = app_id_client_regex Jsii::Type.check_type(@app_id_client_regex, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "appIdClientRegex") unless @app_id_client_regex.nil? @default_action = default_action Jsii::Type.check_type(@default_action, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfYXBwc3luYy5Vc2VyUG9vbERlZmF1bHRBY3Rpb24ifQ==")), "defaultAction") unless @default_action.nil? end |
Instance Attribute Details
#app_id_client_regex ⇒ String? (readonly)
Note:
Default: - None
the optional app id regex.
27 28 29 |
# File 'app_sync/user_pool_config.rb', line 27 def app_id_client_regex @app_id_client_regex end |
#default_action ⇒ AWSCDK::AppSync::UserPoolDefaultAction? (readonly)
Note:
Default: ALLOW
Default auth action.
32 33 34 |
# File 'app_sync/user_pool_config.rb', line 32 def default_action @default_action end |
#user_pool ⇒ AWSCDK::Cognito::IUserPool (readonly)
The Cognito user pool to use as identity source.
22 23 24 |
# File 'app_sync/user_pool_config.rb', line 22 def user_pool @user_pool end |
Class Method Details
.jsii_properties ⇒ Object
34 35 36 37 38 39 40 |
# File 'app_sync/user_pool_config.rb', line 34 def self.jsii_properties { :user_pool => "userPool", :app_id_client_regex => "appIdClientRegex", :default_action => "defaultAction", } end |
Instance Method Details
#to_jsii ⇒ Object
42 43 44 45 46 47 48 49 50 |
# File 'app_sync/user_pool_config.rb', line 42 def to_jsii result = {} result.merge!({ "userPool" => @user_pool, "appIdClientRegex" => @app_id_client_regex, "defaultAction" => @default_action, }) result.compact end |