Class: AWSCDK::Cognito::CfnIdentityPoolPrincipalTagProps

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

Overview

Properties for defining a CfnIdentityPoolPrincipalTag.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(identity_pool_id:, identity_provider_name:, principal_tags: nil, use_defaults: nil) ⇒ CfnIdentityPoolPrincipalTagProps

Returns a new instance of CfnIdentityPoolPrincipalTagProps.

Parameters:

  • identity_pool_id (String)

    The identity pool that you want to associate with this principal tag map.

  • identity_provider_name (String)

    The identity pool identity provider (IdP) that you want to associate with this principal tag map.

  • principal_tags (Object, nil) (defaults to: nil)

    A JSON-formatted list of user claims and the principal tags that you want to associate with them.

  • use_defaults (Boolean, AWSCDK::IResolvable, nil) (defaults to: nil)

    Use a default set of mappings between claims and tags for this provider, instead of a custom map.



13
14
15
16
17
18
19
20
21
22
# File 'cognito/cfn_identity_pool_principal_tag_props.rb', line 13

def initialize(identity_pool_id:, identity_provider_name:, principal_tags: nil, use_defaults: nil)
  @identity_pool_id = identity_pool_id
  Jsii::Type.check_type(@identity_pool_id, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "identityPoolId")
  @identity_provider_name = identity_provider_name
  Jsii::Type.check_type(@identity_provider_name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "identityProviderName")
  @principal_tags = principal_tags
  Jsii::Type.check_type(@principal_tags, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJhbnkifQ==")), "principalTags") unless @principal_tags.nil?
  @use_defaults = use_defaults
  Jsii::Type.check_type(@use_defaults, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3sicHJpbWl0aXZlIjoiYm9vbGVhbiJ9LHsiZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifV19fQ==")), "useDefaults") unless @use_defaults.nil?
end

Instance Attribute Details

#identity_pool_idString (readonly)

The identity pool that you want to associate with this principal tag map.



28
29
30
# File 'cognito/cfn_identity_pool_principal_tag_props.rb', line 28

def identity_pool_id
  @identity_pool_id
end

#identity_provider_nameString (readonly)

The identity pool identity provider (IdP) that you want to associate with this principal tag map.



33
34
35
# File 'cognito/cfn_identity_pool_principal_tag_props.rb', line 33

def identity_provider_name
  @identity_provider_name
end

#principal_tagsObject? (readonly)

A JSON-formatted list of user claims and the principal tags that you want to associate with them.

When Amazon Cognito requests credentials, it sets the value of the principal tag to the value of the user's claim.



40
41
42
# File 'cognito/cfn_identity_pool_principal_tag_props.rb', line 40

def principal_tags
  @principal_tags
end

#use_defaultsBoolean, ... (readonly)

Use a default set of mappings between claims and tags for this provider, instead of a custom map.



45
46
47
# File 'cognito/cfn_identity_pool_principal_tag_props.rb', line 45

def use_defaults
  @use_defaults
end

Class Method Details

.jsii_propertiesObject



47
48
49
50
51
52
53
54
# File 'cognito/cfn_identity_pool_principal_tag_props.rb', line 47

def self.jsii_properties
  {
    :identity_pool_id => "identityPoolId",
    :identity_provider_name => "identityProviderName",
    :principal_tags => "principalTags",
    :use_defaults => "useDefaults",
  }
end

Instance Method Details

#to_jsiiObject



56
57
58
59
60
61
62
63
64
65
# File 'cognito/cfn_identity_pool_principal_tag_props.rb', line 56

def to_jsii
  result = {}
  result.merge!({
    "identityPoolId" => @identity_pool_id,
    "identityProviderName" => @identity_provider_name,
    "principalTags" => @principal_tags,
    "useDefaults" => @use_defaults,
  })
  result.compact
end