Class: AWSCDK::Cognito::UserPoolGroupOptions
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::Cognito::UserPoolGroupOptions
- Defined in:
- cognito/user_pool_group_options.rb
Overview
Options to create a UserPoolGroup.
Direct Known Subclasses
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.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(description: nil, group_name: nil, precedence: nil, role: nil) ⇒ UserPoolGroupOptions
constructor
A new instance of UserPoolGroupOptions.
- #to_jsii ⇒ Object
Constructor Details
#initialize(description: nil, group_name: nil, precedence: nil, role: nil) ⇒ UserPoolGroupOptions
Returns a new instance of UserPoolGroupOptions.
11 12 13 14 15 16 17 18 19 20 |
# File 'cognito/user_pool_group_options.rb', line 11 def initialize(description: nil, group_name: nil, precedence: nil, role: nil) @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? end |
Instance Attribute Details
#description ⇒ String? (readonly)
Default: - no description
A string containing the description of the group.
26 27 28 |
# File 'cognito/user_pool_group_options.rb', line 26 def description @description end |
#group_name ⇒ String? (readonly)
Default: - auto generate a name
The name of the group.
Must be unique.
33 34 35 |
# File 'cognito/user_pool_group_options.rb', line 33 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.
49 50 51 |
# File 'cognito/user_pool_group_options.rb', line 49 def precedence @precedence end |
#role ⇒ AWSCDK::Interfaces::AWSIAM::IRoleRef? (readonly)
Default: - no description
The role for the group.
54 55 56 |
# File 'cognito/user_pool_group_options.rb', line 54 def role @role end |
Class Method Details
.jsii_properties ⇒ Object
56 57 58 59 60 61 62 63 |
# File 'cognito/user_pool_group_options.rb', line 56 def self.jsii_properties { :description => "description", :group_name => "groupName", :precedence => "precedence", :role => "role", } end |
Instance Method Details
#to_jsii ⇒ Object
65 66 67 68 69 70 71 72 73 74 |
# File 'cognito/user_pool_group_options.rb', line 65 def to_jsii result = {} result.merge!({ "description" => @description, "groupName" => @group_name, "precedence" => @precedence, "role" => @role, }) result.compact end |