Interface AnalyticsConfiguration

All Superinterfaces:
software.amazon.jsii.JsiiSerializable
All Known Implementing Classes:
AnalyticsConfiguration.Jsii$Proxy

@Generated(value="jsii-pacmak/1.112.0 (build de1bc80)", date="2025-06-13T09:19:34.620Z") @Stability(Stable) public interface AnalyticsConfiguration extends software.amazon.jsii.JsiiSerializable
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.

Example:

 import software.amazon.awscdk.services.pinpoint.*;
 UserPool userPool;
 CfnApp pinpointApp;
 Role pinpointRole;
 UserPoolClient.Builder.create(this, "Client")
         .userPool(userPool)
         .analytics(AnalyticsConfiguration.builder()
                 // Your Pinpoint project
                 .application(pinpointApp)
                 // Whether to include user data in analytics events
                 .shareUserData(true)
                 .build())
         .build();
 
  • Method Details

    • getApplication

      @Stability(Stable) @Nullable default CfnApp getApplication()
      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.

      Default: - no configuration, you need to specify either `application` or all of `applicationId`, `externalId`, and `role`.

    • getApplicationId

      @Stability(Stable) @Nullable default String getApplicationId()
      Your Amazon Pinpoint project ID.

      Default: - no configuration, you need to specify either this property along with `externalId` and `role` or `application`.

    • getExternalId

      @Stability(Stable) @Nullable default String getExternalId()
      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

      Default: - no configuration, you need to specify either this property along with `applicationId` and `role` or `application`.

    • getRole

      @Stability(Stable) @Nullable default IRole getRole()
      The IAM role that has the permissions required for Amazon Cognito to publish events to Amazon Pinpoint analytics.

      Default: - no configuration, you need to specify either this property along with `applicationId` and `externalId` or `application`.

    • getShareUserData

      @Stability(Stable) @Nullable default Boolean getShareUserData()
      If true, Amazon Cognito includes user data in the events that it publishes to Amazon Pinpoint analytics.

      Default: - false

    • builder

      @Stability(Stable) static AnalyticsConfiguration.Builder builder()
      Returns:
      a AnalyticsConfiguration.Builder of AnalyticsConfiguration