Class: AWSCDK::Cognito::CfnUserPoolGroupProps
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::Cognito::CfnUserPoolGroupProps
- Defined in:
- cognito/cfn_user_pool_group_props.rb
Overview
Properties for defining a CfnUserPoolGroup.
Instance Attribute Summary collapse
-
#description ⇒ String?
readonly
A description of the group that you're creating.
-
#group_name ⇒ String?
readonly
A name for 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_arn ⇒ String, ...
readonly
The Amazon Resource Name (ARN) for the IAM role that you want to associate with the group.
-
#user_pool_id ⇒ String, AWSCDK::Interfaces::AWSCognito::IUserPoolRef
readonly
The ID of the user pool where you want to create a user group.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(user_pool_id:, description: nil, group_name: nil, precedence: nil, role_arn: nil) ⇒ CfnUserPoolGroupProps
constructor
A new instance of CfnUserPoolGroupProps.
- #to_jsii ⇒ Object
Constructor Details
#initialize(user_pool_id:, description: nil, group_name: nil, precedence: nil, role_arn: nil) ⇒ CfnUserPoolGroupProps
Returns a new instance of CfnUserPoolGroupProps.
14 15 16 17 18 19 20 21 22 23 24 25 |
# File 'cognito/cfn_user_pool_group_props.rb', line 14 def initialize(user_pool_id:, description: nil, group_name: nil, precedence: nil, role_arn: nil) @user_pool_id = user_pool_id Jsii::Type.check_type(@user_pool_id, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3sicHJpbWl0aXZlIjoic3RyaW5nIn0seyJmcW4iOiJhd3MtY2RrLWxpYi5pbnRlcmZhY2VzLmF3c19jb2duaXRvLklVc2VyUG9vbFJlZiJ9XX19")), "userPoolId") @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_arn = role_arn Jsii::Type.check_type(@role_arn, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3sicHJpbWl0aXZlIjoic3RyaW5nIn0seyJmcW4iOiJhd3MtY2RrLWxpYi5pbnRlcmZhY2VzLmF3c19pYW0uSVJvbGVSZWYifV19fQ==")), "roleArn") unless @role_arn.nil? end |
Instance Attribute Details
#description ⇒ String? (readonly)
A description of the group that you're creating.
36 37 38 |
# File 'cognito/cfn_user_pool_group_props.rb', line 36 def description @description end |
#group_name ⇒ String? (readonly)
A name for the group.
This name must be unique in your user pool.
43 44 45 |
# File 'cognito/cfn_user_pool_group_props.rb', line 43 def group_name @group_name end |
#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.
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.
The default Precedence value is null. The maximum Precedence value is 2^31-1 .
54 55 56 |
# File 'cognito/cfn_user_pool_group_props.rb', line 54 def precedence @precedence end |
#role_arn ⇒ String, ... (readonly)
The Amazon Resource Name (ARN) for the IAM role that you want to associate with the group.
A group role primarily declares a preferred role for the credentials that you get from an identity pool. Amazon Cognito ID tokens have a cognito:preferred_role claim that presents the highest-precedence group that a user belongs to. Both ID and access tokens also contain a cognito:groups claim that list all the groups that a user is a member of.
61 62 63 |
# File 'cognito/cfn_user_pool_group_props.rb', line 61 def role_arn @role_arn end |
#user_pool_id ⇒ String, AWSCDK::Interfaces::AWSCognito::IUserPoolRef (readonly)
The ID of the user pool where you want to create a user group.
31 32 33 |
# File 'cognito/cfn_user_pool_group_props.rb', line 31 def user_pool_id @user_pool_id end |
Class Method Details
.jsii_properties ⇒ Object
63 64 65 66 67 68 69 70 71 |
# File 'cognito/cfn_user_pool_group_props.rb', line 63 def self.jsii_properties { :user_pool_id => "userPoolId", :description => "description", :group_name => "groupName", :precedence => "precedence", :role_arn => "roleArn", } end |
Instance Method Details
#to_jsii ⇒ Object
73 74 75 76 77 78 79 80 81 82 83 |
# File 'cognito/cfn_user_pool_group_props.rb', line 73 def to_jsii result = {} result.merge!({ "userPoolId" => @user_pool_id, "description" => @description, "groupName" => @group_name, "precedence" => @precedence, "roleArn" => @role_arn, }) result.compact end |