Class: AWSCDK::Cognito::UserPoolGroupProps
- Inherits:
-
UserPoolGroupOptions
- Object
- UserPoolGroupOptions
- AWSCDK::Cognito::UserPoolGroupProps
- Defined in:
- cognito/user_pool_group_props.rb
Overview
Props for UserPoolGroup construct.
Instance Attribute Summary collapse
-
#description ⇒ String?
readonly
A string containing the description of the group.
-
#group_name ⇒ String?
readonly
The name of the group.
-
#precedence ⇒ Numeric?
readonly
A non-negative integer value that specifies the precedence of this group relative to the other groups that a user can belong to in the user pool.
-
#role ⇒ AWSCDK::Interfaces::AWSIAM::IRoleRef?
readonly
The role for the group.
-
#user_pool ⇒ AWSCDK::Interfaces::AWSCognito::IUserPoolRef
readonly
The user pool to which this group is associated.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(description: nil, group_name: nil, precedence: nil, role: nil, user_pool:) ⇒ UserPoolGroupProps
constructor
A new instance of UserPoolGroupProps.
- #to_jsii ⇒ Object
Constructor Details
#initialize(description: nil, group_name: nil, precedence: nil, role: nil, user_pool:) ⇒ UserPoolGroupProps
Returns a new instance of UserPoolGroupProps.
12 13 14 15 16 17 18 19 20 21 22 23 |
# File 'cognito/user_pool_group_props.rb', line 12 def initialize(description: nil, group_name: nil, precedence: nil, role: nil, user_pool:) @description = description Jsii::Type.check_type(@description, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "description") unless @description.nil? @group_name = group_name Jsii::Type.check_type(@group_name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "groupName") unless @group_name.nil? @precedence = precedence Jsii::Type.check_type(@precedence, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "precedence") unless @precedence.nil? @role = role Jsii::Type.check_type(@role, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5pbnRlcmZhY2VzLmF3c19pYW0uSVJvbGVSZWYifQ==")), "role") unless @role.nil? @user_pool = user_pool Jsii::Type.check_type(@user_pool, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5pbnRlcmZhY2VzLmF3c19jb2duaXRvLklVc2VyUG9vbFJlZiJ9")), "userPool") end |
Instance Attribute Details
#description ⇒ String? (readonly)
Default: - no description
A string containing the description of the group.
29 30 31 |
# File 'cognito/user_pool_group_props.rb', line 29 def description @description end |
#group_name ⇒ String? (readonly)
Default: - auto generate a name
The name of the group.
Must be unique.
36 37 38 |
# File 'cognito/user_pool_group_props.rb', line 36 def group_name @group_name end |
#precedence ⇒ Numeric? (readonly)
Default: - null
A non-negative integer value that specifies the precedence of this group relative to the other groups that a user can belong to in the user pool.
Zero is the highest precedence value.
Groups with lower Precedence values take precedence over groups with higher or null Precedence values. If a user belongs to two or more groups, it is the group with the lowest precedence value whose role ARN is given in the user's tokens for the cognito:roles and cognito:preferred_role claims.
Two groups can have the same Precedence value. If this happens, neither group takes precedence over the other. If two groups with the same Precedence have the same role ARN, that role is used in the cognito:preferred_role claim in tokens for users in each group. If the two groups have different role ARNs, the cognito:preferred_role claim isn't set in users' tokens.
52 53 54 |
# File 'cognito/user_pool_group_props.rb', line 52 def precedence @precedence end |
#role ⇒ AWSCDK::Interfaces::AWSIAM::IRoleRef? (readonly)
Default: - no description
The role for the group.
57 58 59 |
# File 'cognito/user_pool_group_props.rb', line 57 def role @role end |
#user_pool ⇒ AWSCDK::Interfaces::AWSCognito::IUserPoolRef (readonly)
The user pool to which this group is associated.
61 62 63 |
# File 'cognito/user_pool_group_props.rb', line 61 def user_pool @user_pool end |
Class Method Details
.jsii_properties ⇒ Object
63 64 65 66 67 68 69 70 71 |
# File 'cognito/user_pool_group_props.rb', line 63 def self.jsii_properties { :description => "description", :group_name => "groupName", :precedence => "precedence", :role => "role", :user_pool => "userPool", } end |
Instance Method Details
#to_jsii ⇒ Object
73 74 75 76 77 78 79 80 81 82 83 84 |
# File 'cognito/user_pool_group_props.rb', line 73 def to_jsii result = {} result.merge!(super) result.merge!({ "description" => @description, "groupName" => @group_name, "precedence" => @precedence, "role" => @role, "userPool" => @user_pool, }) result.compact end |