Class: AWSCDK::Cognito::CfnIdentityPoolRoleAttachmentProps

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
cognito/cfn_identity_pool_role_attachment_props.rb

Overview

Properties for defining a CfnIdentityPoolRoleAttachment.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(identity_pool_id:, role_mappings: nil, roles: nil) ⇒ CfnIdentityPoolRoleAttachmentProps

Returns a new instance of CfnIdentityPoolRoleAttachmentProps.

Parameters:



12
13
14
15
16
17
18
19
# File 'cognito/cfn_identity_pool_role_attachment_props.rb', line 12

def initialize(identity_pool_id:, role_mappings: nil, roles: nil)
  @identity_pool_id = identity_pool_id
  Jsii::Type.check_type(@identity_pool_id, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3sicHJpbWl0aXZlIjoic3RyaW5nIn0seyJmcW4iOiJhd3MtY2RrLWxpYi5pbnRlcmZhY2VzLmF3c19jb2duaXRvLklJZGVudGl0eVBvb2xSZWYifV19fQ==")), "identityPoolId")
  @role_mappings = role_mappings
  Jsii::Type.check_type(@role_mappings, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImNvbGxlY3Rpb24iOnsiZWxlbWVudHR5cGUiOnsidW5pb24iOnsidHlwZXMiOlt7ImZxbiI6ImF3cy1jZGstbGliLklSZXNvbHZhYmxlIn0seyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfY29nbml0by5DZm5JZGVudGl0eVBvb2xSb2xlQXR0YWNobWVudC5Sb2xlTWFwcGluZ1Byb3BlcnR5In1dfX0sImtpbmQiOiJtYXAifX1dfX0=")), "roleMappings") unless @role_mappings.nil?
  @roles = roles
  Jsii::Type.check_type(@roles, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJhbnkifQ==")), "roles") unless @roles.nil?
end

Instance Attribute Details

#identity_pool_idString, AWSCDK::Interfaces::AWSCognito::IIdentityPoolRef (readonly)

An identity pool ID in the format REGION:GUID .



25
26
27
# File 'cognito/cfn_identity_pool_role_attachment_props.rb', line 25

def identity_pool_id
  @identity_pool_id
end

#role_mappingsAWSCDK::IResolvable, ... (readonly)

How users for a specific identity provider are mapped to roles.

This is a string to the RoleMapping object map. The string identifies the identity provider. For example: graph.facebook.com or cognito-idp.us-east-1.amazonaws.com/us-east-1_abcdefghi:app_client_id .

If the IdentityProvider field isn't provided in this object, the string is used as the identity provider name.

For more information, see the RoleMapping property .



36
37
38
# File 'cognito/cfn_identity_pool_role_attachment_props.rb', line 36

def role_mappings
  @role_mappings
end

#rolesObject? (readonly)

The map of the roles associated with this pool.

For a given role, the key is either "authenticated" or "unauthenticated". The value is the role ARN.



43
44
45
# File 'cognito/cfn_identity_pool_role_attachment_props.rb', line 43

def roles
  @roles
end

Class Method Details

.jsii_propertiesObject



45
46
47
48
49
50
51
# File 'cognito/cfn_identity_pool_role_attachment_props.rb', line 45

def self.jsii_properties
  {
    :identity_pool_id => "identityPoolId",
    :role_mappings => "roleMappings",
    :roles => "roles",
  }
end

Instance Method Details

#to_jsiiObject



53
54
55
56
57
58
59
60
61
# File 'cognito/cfn_identity_pool_role_attachment_props.rb', line 53

def to_jsii
  result = {}
  result.merge!({
    "identityPoolId" => @identity_pool_id,
    "roleMappings" => @role_mappings,
    "roles" => @roles,
  })
  result.compact
end