Class AnalyticsConfiguration
The settings for Amazon Pinpoint analytics configuration.
Implements
Inherited Members
Namespace: Amazon.CDK.AWS.Cognito
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public class AnalyticsConfiguration : IAnalyticsConfiguration
Syntax (vb)
Public Class AnalyticsConfiguration Implements IAnalyticsConfiguration
Remarks
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.
ExampleMetadata: infused
Examples
using Amazon.CDK.AWS.Pinpoint;
UserPool userPool;
CfnApp pinpointApp;
Role pinpointRole;
new UserPoolClient(this, "Client", new UserPoolClientProps {
UserPool = userPool,
Analytics = new AnalyticsConfiguration {
// Your Pinpoint project
Application = pinpointApp,
// Whether to include user data in analytics events
ShareUserData = true
}
});
Synopsis
Constructors
| AnalyticsConfiguration() | The settings for Amazon Pinpoint analytics configuration. |
Properties
| Application | The Amazon Pinpoint project that you want to connect to your user pool app client. |
| ApplicationId | Your Amazon Pinpoint project ID. |
| ExternalId | The external ID of the role that Amazon Cognito assumes to send analytics data to Amazon Pinpoint. |
| Role | The IAM role that has the permissions required for Amazon Cognito to publish events to Amazon Pinpoint analytics. |
| ShareUserData | If |
Constructors
AnalyticsConfiguration()
The settings for Amazon Pinpoint analytics configuration.
public AnalyticsConfiguration()
Remarks
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.
ExampleMetadata: infused
Examples
using Amazon.CDK.AWS.Pinpoint;
UserPool userPool;
CfnApp pinpointApp;
Role pinpointRole;
new UserPoolClient(this, "Client", new UserPoolClientProps {
UserPool = userPool,
Analytics = new AnalyticsConfiguration {
// Your Pinpoint project
Application = pinpointApp,
// Whether to include user data in analytics events
ShareUserData = true
}
});
Properties
Application
The Amazon Pinpoint project that you want to connect to your user pool app client.
public CfnApp? Application { get; set; }
Property Value
Remarks
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.
ApplicationId
Your Amazon Pinpoint project ID.
public string? ApplicationId { get; set; }
Property Value
Remarks
Default: - no configuration, you need to specify either this property along with externalId and role or application.
ExternalId
The external ID of the role that Amazon Cognito assumes to send analytics data to Amazon Pinpoint.
public string? ExternalId { get; set; }
Property Value
Remarks
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.
Role
The IAM role that has the permissions required for Amazon Cognito to publish events to Amazon Pinpoint analytics.
public IRoleRef? Role { get; set; }
Property Value
Remarks
Default: - no configuration, you need to specify either this property along with applicationId and externalId or application.
ShareUserData
If true, Amazon Cognito includes user data in the events that it publishes to Amazon Pinpoint analytics.
public bool? ShareUserData { get; set; }
Property Value
bool?
Remarks
Default: - false