Class: AWSCDK::OpenSearchService::CognitoOptions

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
open_search_service/cognito_options.rb

Overview

Configures Amazon OpenSearch Service to use Amazon Cognito authentication for OpenSearch Dashboards.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(identity_pool_id:, role:, user_pool_id:) ⇒ CognitoOptions

Returns a new instance of CognitoOptions.

Parameters:

  • identity_pool_id (String)

    The Amazon Cognito identity pool ID that you want Amazon OpenSearch Service to use for OpenSearch Dashboards authentication.

  • role (AWSCDK::Interfaces::AWSIAM::IRoleRef)

    A role that allows Amazon OpenSearch Service to configure your user pool and identity pool.

  • user_pool_id (String)

    The Amazon Cognito user pool ID that you want Amazon OpenSearch Service to use for OpenSearch Dashboards authentication.



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

def initialize(identity_pool_id:, role:, user_pool_id:)
  @identity_pool_id = identity_pool_id
  Jsii::Type.check_type(@identity_pool_id, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "identityPoolId")
  @role = role
  Jsii::Type.check_type(@role, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5pbnRlcmZhY2VzLmF3c19pYW0uSVJvbGVSZWYifQ==")), "role")
  @user_pool_id = user_pool_id
  Jsii::Type.check_type(@user_pool_id, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "userPoolId")
end

Instance Attribute Details

#identity_pool_idString (readonly)

The Amazon Cognito identity pool ID that you want Amazon OpenSearch Service to use for OpenSearch Dashboards authentication.

Returns:

  • (String)


24
25
26
# File 'open_search_service/cognito_options.rb', line 24

def identity_pool_id
  @identity_pool_id
end

#roleAWSCDK::Interfaces::AWSIAM::IRoleRef (readonly)

A role that allows Amazon OpenSearch Service to configure your user pool and identity pool.

It must have the AmazonESCognitoAccess policy attached to it.



31
32
33
# File 'open_search_service/cognito_options.rb', line 31

def role
  @role
end

#user_pool_idString (readonly)

The Amazon Cognito user pool ID that you want Amazon OpenSearch Service to use for OpenSearch Dashboards authentication.

Returns:

  • (String)


35
36
37
# File 'open_search_service/cognito_options.rb', line 35

def user_pool_id
  @user_pool_id
end

Class Method Details

.jsii_propertiesObject



37
38
39
40
41
42
43
# File 'open_search_service/cognito_options.rb', line 37

def self.jsii_properties
  {
    :identity_pool_id => "identityPoolId",
    :role => "role",
    :user_pool_id => "userPoolId",
  }
end

Instance Method Details

#to_jsiiObject



45
46
47
48
49
50
51
52
53
# File 'open_search_service/cognito_options.rb', line 45

def to_jsii
  result = {}
  result.merge!({
    "identityPoolId" => @identity_pool_id,
    "role" => @role,
    "userPoolId" => @user_pool_id,
  })
  result.compact
end