Class: AWSCDK::CognitoIdentitypool::IdentityPoolProps
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::CognitoIdentitypool::IdentityPoolProps
- Defined in:
- cognito_identitypool/identity_pool_props.rb
Overview
Props for the Identity Pool construct.
Instance Attribute Summary collapse
-
#allow_classic_flow ⇒ Boolean?
readonly
Enables the Basic (Classic) authentication flow.
-
#allow_unauthenticated_identities ⇒ Boolean?
readonly
Whether the Identity Pool supports unauthenticated logins.
-
#authenticated_role ⇒ AWSCDK::IAM::IRole?
readonly
The default Role to be assumed by authenticated users.
-
#authentication_providers ⇒ AWSCDK::CognitoIdentitypool::IdentityPoolAuthenticationProviders?
readonly
Authentication Providers for using in Identity Pool.
-
#identity_pool_name ⇒ String?
readonly
The name of the Identity Pool.
-
#role_mappings ⇒ Array<AWSCDK::CognitoIdentitypool::IdentityPoolRoleMapping>?
readonly
Rules for mapping roles to users.
-
#unauthenticated_role ⇒ AWSCDK::IAM::IRole?
readonly
The default Role to be assumed by unauthenticated users.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(allow_classic_flow: nil, allow_unauthenticated_identities: nil, authenticated_role: nil, authentication_providers: nil, identity_pool_name: nil, role_mappings: nil, unauthenticated_role: nil) ⇒ IdentityPoolProps
constructor
A new instance of IdentityPoolProps.
- #to_jsii ⇒ Object
Constructor Details
#initialize(allow_classic_flow: nil, allow_unauthenticated_identities: nil, authenticated_role: nil, authentication_providers: nil, identity_pool_name: nil, role_mappings: nil, unauthenticated_role: nil) ⇒ IdentityPoolProps
Returns a new instance of IdentityPoolProps.
14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 |
# File 'cognito_identitypool/identity_pool_props.rb', line 14 def initialize(allow_classic_flow: nil, allow_unauthenticated_identities: nil, authenticated_role: nil, authentication_providers: nil, identity_pool_name: nil, role_mappings: nil, unauthenticated_role: nil) @allow_classic_flow = allow_classic_flow Jsii::Type.check_type(@allow_classic_flow, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJib29sZWFuIn0=")), "allowClassicFlow") unless @allow_classic_flow.nil? @allow_unauthenticated_identities = allow_unauthenticated_identities Jsii::Type.check_type(@allow_unauthenticated_identities, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJib29sZWFuIn0=")), "allowUnauthenticatedIdentities") unless @allow_unauthenticated_identities.nil? @authenticated_role = authenticated_role Jsii::Type.check_type(@authenticated_role, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfaWFtLklSb2xlIn0=")), "authenticatedRole") unless @authenticated_role.nil? @authentication_providers = authentication_providers.is_a?(Hash) ? ::AWSCDK::CognitoIdentitypool::IdentityPoolAuthenticationProviders.new(**authentication_providers.transform_keys(&:to_sym)) : authentication_providers Jsii::Type.check_type(@authentication_providers, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfY29nbml0b19pZGVudGl0eXBvb2wuSWRlbnRpdHlQb29sQXV0aGVudGljYXRpb25Qcm92aWRlcnMifQ==")), "authenticationProviders") unless @authentication_providers.nil? @identity_pool_name = identity_pool_name Jsii::Type.check_type(@identity_pool_name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "identityPoolName") unless @identity_pool_name.nil? @role_mappings = role_mappings.is_a?(Array) ? role_mappings.map { |jsii_v0| jsii_v0.is_a?(Hash) ? ::AWSCDK::CognitoIdentitypool::IdentityPoolRoleMapping.new(**jsii_v0.transform_keys(&:to_sym)) : jsii_v0 } : role_mappings Jsii::Type.check_type(@role_mappings, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7ImZxbiI6ImF3cy1jZGstbGliLmF3c19jb2duaXRvX2lkZW50aXR5cG9vbC5JZGVudGl0eVBvb2xSb2xlTWFwcGluZyJ9LCJraW5kIjoiYXJyYXkifX0=")), "roleMappings") unless @role_mappings.nil? @unauthenticated_role = unauthenticated_role Jsii::Type.check_type(@unauthenticated_role, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfaWFtLklSb2xlIn0=")), "unauthenticatedRole") unless @unauthenticated_role.nil? end |
Instance Attribute Details
#allow_classic_flow ⇒ Boolean? (readonly)
Default: - Classic Flow not allowed
Enables the Basic (Classic) authentication flow.
35 36 37 |
# File 'cognito_identitypool/identity_pool_props.rb', line 35 def allow_classic_flow @allow_classic_flow end |
#allow_unauthenticated_identities ⇒ Boolean? (readonly)
Default: - false
Whether the Identity Pool supports unauthenticated logins.
40 41 42 |
# File 'cognito_identitypool/identity_pool_props.rb', line 40 def allow_unauthenticated_identities @allow_unauthenticated_identities end |
#authenticated_role ⇒ AWSCDK::IAM::IRole? (readonly)
Default: - A default authenticated Role will be added
The default Role to be assumed by authenticated users.
45 46 47 |
# File 'cognito_identitypool/identity_pool_props.rb', line 45 def authenticated_role @authenticated_role end |
#authentication_providers ⇒ AWSCDK::CognitoIdentitypool::IdentityPoolAuthenticationProviders? (readonly)
Default: - No Authentication Providers passed directly to Identity Pool
Authentication Providers for using in Identity Pool.
50 51 52 |
# File 'cognito_identitypool/identity_pool_props.rb', line 50 def authentication_providers @authentication_providers end |
#identity_pool_name ⇒ String? (readonly)
Default: - Automatically generated name by CloudFormation at deploy time
The name of the Identity Pool.
55 56 57 |
# File 'cognito_identitypool/identity_pool_props.rb', line 55 def identity_pool_name @identity_pool_name end |
#role_mappings ⇒ Array<AWSCDK::CognitoIdentitypool::IdentityPoolRoleMapping>? (readonly)
Default: - no role mappings
Rules for mapping roles to users.
60 61 62 |
# File 'cognito_identitypool/identity_pool_props.rb', line 60 def role_mappings @role_mappings end |
#unauthenticated_role ⇒ AWSCDK::IAM::IRole? (readonly)
Default: - A default unauthenticated Role will be added
The default Role to be assumed by unauthenticated users.
65 66 67 |
# File 'cognito_identitypool/identity_pool_props.rb', line 65 def unauthenticated_role @unauthenticated_role end |
Class Method Details
.jsii_properties ⇒ Object
67 68 69 70 71 72 73 74 75 76 77 |
# File 'cognito_identitypool/identity_pool_props.rb', line 67 def self.jsii_properties { :allow_classic_flow => "allowClassicFlow", :allow_unauthenticated_identities => "allowUnauthenticatedIdentities", :authenticated_role => "authenticatedRole", :authentication_providers => "authenticationProviders", :identity_pool_name => "identityPoolName", :role_mappings => "roleMappings", :unauthenticated_role => "unauthenticatedRole", } end |
Instance Method Details
#to_jsii ⇒ Object
79 80 81 82 83 84 85 86 87 88 89 90 91 |
# File 'cognito_identitypool/identity_pool_props.rb', line 79 def to_jsii result = {} result.merge!({ "allowClassicFlow" => @allow_classic_flow, "allowUnauthenticatedIdentities" => @allow_unauthenticated_identities, "authenticatedRole" => @authenticated_role, "authenticationProviders" => @authentication_providers, "identityPoolName" => @identity_pool_name, "roleMappings" => @role_mappings, "unauthenticatedRole" => @unauthenticated_role, }) result.compact end |