Class: AWSCDK::Cognito::AnalyticsConfiguration
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::Cognito::AnalyticsConfiguration
- Defined in:
- cognito/analytics_configuration.rb
Overview
The settings for Amazon Pinpoint analytics configuration.
With an analytics configuration, your application can collect user-activity metrics for user notifications with an Amazon Pinpoint campaign. Amazon Pinpoint isn't available in all AWS Regions. For a list of available Regions, see Amazon Cognito and Amazon Pinpoint Region availability: https://docs.aws.amazon.com/cognito/latest/developerguide/cognito-user-pools-pinpoint-integration.html#cognito-user-pools-find-region-mappings.
Instance Attribute Summary collapse
-
#application ⇒ AWSCDK::Pinpoint::CfnApp?
readonly
The Amazon Pinpoint project that you want to connect to your user pool app client.
-
#application_id ⇒ String?
readonly
Your Amazon Pinpoint project ID.
-
#external_id ⇒ String?
readonly
The external ID of the role that Amazon Cognito assumes to send analytics data to Amazon Pinpoint.
-
#role ⇒ AWSCDK::Interfaces::AWSIAM::IRoleRef?
readonly
The IAM role that has the permissions required for Amazon Cognito to publish events to Amazon Pinpoint analytics.
-
#share_user_data ⇒ Boolean?
readonly
If
true, Amazon Cognito includes user data in the events that it publishes to Amazon Pinpoint analytics.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(application: nil, application_id: nil, external_id: nil, role: nil, share_user_data: nil) ⇒ AnalyticsConfiguration
constructor
A new instance of AnalyticsConfiguration.
- #to_jsii ⇒ Object
Constructor Details
#initialize(application: nil, application_id: nil, external_id: nil, role: nil, share_user_data: nil) ⇒ AnalyticsConfiguration
Returns a new instance of AnalyticsConfiguration.
16 17 18 19 20 21 22 23 24 25 26 27 |
# File 'cognito/analytics_configuration.rb', line 16 def initialize(application: nil, application_id: nil, external_id: nil, role: nil, share_user_data: nil) @application = application Jsii::Type.check_type(@application, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfcGlucG9pbnQuQ2ZuQXBwIn0=")), "application") unless @application.nil? @application_id = application_id Jsii::Type.check_type(@application_id, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "applicationId") unless @application_id.nil? @external_id = external_id Jsii::Type.check_type(@external_id, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "externalId") unless @external_id.nil? @role = role Jsii::Type.check_type(@role, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5pbnRlcmZhY2VzLmF3c19pYW0uSVJvbGVSZWYifQ==")), "role") unless @role.nil? @share_user_data = share_user_data Jsii::Type.check_type(@share_user_data, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJib29sZWFuIn0=")), "shareUserData") unless @share_user_data.nil? end |
Instance Attribute Details
#application ⇒ AWSCDK::Pinpoint::CfnApp? (readonly)
Default: - no configuration, you need to specify either application or all of applicationId, externalId, and role.
The Amazon Pinpoint project that you want to connect to your user pool app client.
Amazon Cognito publishes events to the Amazon Pinpoint project.
You can also configure your application to pass an endpoint ID in the AnalyticsMetadata parameter of sign-in operations.
The endpoint ID is information about the destination for push notifications.
37 38 39 |
# File 'cognito/analytics_configuration.rb', line 37 def application @application end |
#application_id ⇒ String? (readonly)
Default: - no configuration, you need to specify either this property along with externalId and role or application.
Your Amazon Pinpoint project ID.
42 43 44 |
# File 'cognito/analytics_configuration.rb', line 42 def application_id @application_id end |
#external_id ⇒ String? (readonly)
Default: - no configuration, you need to specify either this property along with applicationId and role or application.
The external ID of the role that Amazon Cognito assumes to send analytics data to Amazon Pinpoint.
More info here: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_create_for-user_externalid.html
49 50 51 |
# File 'cognito/analytics_configuration.rb', line 49 def external_id @external_id end |
#role ⇒ AWSCDK::Interfaces::AWSIAM::IRoleRef? (readonly)
Default: - no configuration, you need to specify either this property along with applicationId and externalId or application.
The IAM role that has the permissions required for Amazon Cognito to publish events to Amazon Pinpoint analytics.
54 55 56 |
# File 'cognito/analytics_configuration.rb', line 54 def role @role end |
#share_user_data ⇒ Boolean? (readonly)
Default: - false
If true, Amazon Cognito includes user data in the events that it publishes to Amazon Pinpoint analytics.
59 60 61 |
# File 'cognito/analytics_configuration.rb', line 59 def share_user_data @share_user_data end |
Class Method Details
.jsii_properties ⇒ Object
61 62 63 64 65 66 67 68 69 |
# File 'cognito/analytics_configuration.rb', line 61 def self.jsii_properties { :application => "application", :application_id => "applicationId", :external_id => "externalId", :role => "role", :share_user_data => "shareUserData", } end |
Instance Method Details
#to_jsii ⇒ Object
71 72 73 74 75 76 77 78 79 80 81 |
# File 'cognito/analytics_configuration.rb', line 71 def to_jsii result = {} result.merge!({ "application" => @application, "applicationId" => @application_id, "externalId" => @external_id, "role" => @role, "shareUserData" => @share_user_data, }) result.compact end |