UserNotifications / Client / list_notification_events

list_notification_events#

UserNotifications.Client.list_notification_events(**kwargs)#

Returns a list of NotificationEvents according to specified filters, in reverse chronological order (newest first).

Warning

User Notifications stores notifications in the individual Regions you register as notification hubs and the Region of the source event rule. ListNotificationEvents only returns notifications stored in the same Region in which the action is called. User Notifications doesn’t backfill notifications to new Regions selected as notification hubs. For this reason, we recommend that you make calls in your oldest registered notification hub. For more information, see Notification hubs in the Amazon Web Services User Notifications User Guide.

See also: AWS API Documentation

Request Syntax

response = client.list_notification_events(
    startTime=datetime(2015, 1, 1),
    endTime=datetime(2015, 1, 1),
    locale='de_DE'|'en_CA'|'en_US'|'en_UK'|'es_ES'|'fr_CA'|'fr_FR'|'id_ID'|'it_IT'|'ja_JP'|'ko_KR'|'pt_BR'|'tr_TR'|'zh_CN'|'zh_TW',
    source='string',
    includeChildEvents=True|False,
    aggregateNotificationEventArn='string',
    maxResults=123,
    nextToken='string'
)
Parameters:
  • startTime (datetime) – The earliest time of events to return from this call.

  • endTime (datetime) – Latest time of events to return from this call.

  • locale (string) – The locale code of the language used for the retrieved NotificationEvent. The default locale is English (en_US).

  • source (string) –

    The matched event source.

    Must match one of the valid EventBridge sources. Only Amazon Web Services service sourced events are supported. For example, aws.ec2 and aws.cloudwatch. For more information, see Event delivery from Amazon Web Services services in the Amazon EventBridge User Guide.

  • includeChildEvents (boolean) – Include aggregated child events in the result.

  • aggregateNotificationEventArn (string) – The Amazon Resource Name (ARN) of the aggregatedNotificationEventArn to match.

  • maxResults (integer) – The maximum number of results to be returned in this call. Defaults to 20.

  • nextToken (string) – The start token for paginated calls. Retrieved from the response of a previous ListEventRules call. Next token uses Base64 encoding.

Return type:

dict

Returns:

Response Syntax

{
    'nextToken': 'string',
    'notificationEvents': [
        {
            'arn': 'string',
            'notificationConfigurationArn': 'string',
            'relatedAccount': 'string',
            'creationTime': datetime(2015, 1, 1),
            'notificationEvent': {
                'schemaVersion': 'v1.0',
                'sourceEventMetadata': {
                    'eventOriginRegion': 'string',
                    'source': 'string',
                    'eventType': 'string'
                },
                'messageComponents': {
                    'headline': 'string'
                },
                'eventStatus': 'HEALTHY'|'UNHEALTHY',
                'notificationType': 'ALERT'|'WARNING'|'ANNOUNCEMENT'|'INFORMATIONAL'
            },
            'aggregationEventType': 'AGGREGATE'|'CHILD'|'NONE',
            'aggregateNotificationEventArn': 'string',
            'aggregationSummary': {
                'eventCount': 123,
                'aggregatedBy': [
                    {
                        'name': 'string',
                        'value': 'string'
                    },
                ],
                'aggregatedAccounts': {
                    'name': 'string',
                    'count': 123,
                    'sampleValues': [
                        'string',
                    ]
                },
                'aggregatedRegions': {
                    'name': 'string',
                    'count': 123,
                    'sampleValues': [
                        'string',
                    ]
                },
                'aggregatedOrganizationalUnits': {
                    'name': 'string',
                    'count': 123,
                    'sampleValues': [
                        'string',
                    ]
                },
                'additionalSummarizationDimensions': [
                    {
                        'name': 'string',
                        'count': 123,
                        'sampleValues': [
                            'string',
                        ]
                    },
                ]
            }
        },
    ]
}

Response Structure

  • (dict) –

    • nextToken (string) –

      A pagination token. If a non-null pagination token is returned in a result, pass its value in another request to retrieve more entries.

    • notificationEvents (list) –

      The list of notification events.

      • (dict) –

        Describes a short summary of a NotificationEvent. This is only used when listing notification events.

        • arn (string) –

          The Amazon Resource Name (ARN) of the resource.

        • notificationConfigurationArn (string) –

          The ARN of the NotificationConfiguration.

        • relatedAccount (string) –

          The account name containing the NotificationHub.

        • creationTime (datetime) –

          The creation time of the NotificationEvent.

        • notificationEvent (dict) –

          Refers to a NotificationEventSummary object.

          Similar in structure to content in the GetNotificationEvent response.

          • schemaVersion (string) –

            The schema version of the Notification Event.

          • sourceEventMetadata (dict) –

            The source event metadata.

            • eventOriginRegion (string) –

              The Region where the notification originated.

              Unavailable for aggregated notifications.

            • source (string) –

              The matched event source.

              Must match one of the valid EventBridge sources. Only Amazon Web Services service sourced events are supported. For example, aws.ec2 and aws.cloudwatch. For more information, see Event delivery from Amazon Web Services services in the Amazon EventBridge User Guide.

            • eventType (string) –

              The event type to match.

              Must match one of the valid Amazon EventBridge event types. For example, EC2 Instance State-change Notification and Amazon CloudWatch Alarm State Change. For more information, see Event delivery from Amazon Web Services services in the Amazon EventBridge User Guide.

          • messageComponents (dict) –

            The message components of a notification event.

            • headline (string) –

              A sentence long summary. For example, titles or an email subject line.

          • eventStatus (string) –

            Provides additional information about the current status of the NotificationEvent.

            • Values:

              • HEALTHY

                • All EventRules are ACTIVE.

              • UNHEALTHY

                • Some EventRules are ACTIVE and some are INACTIVE.

          • notificationType (string) –

            The type of event causing the notification.

            • Values:

              • ALERT

                • A notification about an event where something was triggered, initiated, reopened, deployed, or a threshold was breached.

              • WARNING

                • A notification about an event where an issue is about to arise. For example, something is approaching a threshold.

              • ANNOUNCEMENT

                • A notification about an important event. For example, a step in a workflow or escalation path or that a workflow was updated.

              • INFORMATIONAL

                • A notification about informational messages. For example, recommendations, service announcements, or reminders.

        • aggregationEventType (string) –

          The NotificationConfiguration’s aggregation type.

          • Values:

            • AGGREGATE

              • The notification event is an aggregate notification. Aggregate notifications summarize grouped events over a specified time period.

            • CHILD

              • Some EventRules are ACTIVE and some are INACTIVE. Any call can be run.

            • NONE

              • The notification isn’t aggregated.

        • aggregateNotificationEventArn (string) –

          The ARN of the aggregatedNotificationEventArn to match.

        • aggregationSummary (dict) –

          Provides an aggregated summary data for notification events.

          • eventCount (integer) –

            Indicates the number of events associated with the aggregation key.

          • aggregatedBy (list) –

            Indicates the criteria or rules by which notifications have been grouped together.

            • (dict) –

              Key-value collection that indicate how notifications are grouped.

              • name (string) –

                Indicates the type of aggregation key.

              • value (string) –

                Indicates the value associated with the aggregation key name.

          • aggregatedAccounts (dict) –

            Indicates the Amazon Web Services accounts in the aggregation key.

            • name (string) –

              Name of the summarization dimension.

            • count (integer) –

              Total number of occurrences for this dimension.

            • sampleValues (list) –

              Indicates the sample values found within the dimension.

              • (string) –

          • aggregatedRegions (dict) –

            Indicates the Amazon Web Services Regions in the aggregation key.

            • name (string) –

              Name of the summarization dimension.

            • count (integer) –

              Total number of occurrences for this dimension.

            • sampleValues (list) –

              Indicates the sample values found within the dimension.

              • (string) –

          • aggregatedOrganizationalUnits (dict) –

            Indicates the collection of organizational units that are involved in the aggregation key.

            • name (string) –

              Name of the summarization dimension.

            • count (integer) –

              Total number of occurrences for this dimension.

            • sampleValues (list) –

              Indicates the sample values found within the dimension.

              • (string) –

          • additionalSummarizationDimensions (list) –

            List of additional dimensions used to group and summarize data.

            • (dict) –

              Provides an overview of how data is summarized across different dimensions.

              • name (string) –

                Name of the summarization dimension.

              • count (integer) –

                Total number of occurrences for this dimension.

              • sampleValues (list) –

                Indicates the sample values found within the dimension.

                • (string) –

Exceptions