UserNotifications / Client / get_notification_event
get_notification_event#
- UserNotifications.Client.get_notification_event(**kwargs)#
Returns a specified NotificationEvent.
Warning
User Notifications stores notifications in the individual Regions you register as notification hubs and the Region of the source event rule. GetNotificationEvent 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 AWS User Notifications User Guide.
See also: AWS API Documentation
Request Syntax
response = client.get_notification_event( arn='string', 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' )
- Parameters:
arn (string) –
[REQUIRED]
The Amazon Resource Name (ARN) of the NotificationEvent to return.
locale (string) – The locale code of the language used for the retrieved NotificationEvent. The default locale is English
en_US
.
- Return type:
dict
- Returns:
Response Syntax
{ 'arn': 'string', 'notificationConfigurationArn': 'string', 'creationTime': datetime(2015, 1, 1), 'content': { 'schemaVersion': 'v1.0', 'id': 'string', 'sourceEventMetadata': { 'eventTypeVersion': 'string', 'sourceEventId': 'string', 'eventOriginRegion': 'string', 'relatedAccount': 'string', 'source': 'string', 'eventOccurrenceTime': datetime(2015, 1, 1), 'eventType': 'string', 'relatedResources': [ { 'id': 'string', 'arn': 'string', 'detailUrl': 'string', 'tags': [ 'string', ] }, ] }, 'messageComponents': { 'headline': 'string', 'paragraphSummary': 'string', 'completeDescription': 'string', 'dimensions': [ { 'name': 'string', 'value': 'string' }, ] }, 'sourceEventDetailUrl': 'string', 'sourceEventDetailUrlDisplayText': 'string', 'notificationType': 'ALERT'|'WARNING'|'ANNOUNCEMENT'|'INFORMATIONAL', 'eventStatus': 'HEALTHY'|'UNHEALTHY', 'aggregationEventType': 'AGGREGATE'|'CHILD'|'NONE', 'aggregateNotificationEventArn': 'string', 'startTime': datetime(2015, 1, 1), 'endTime': datetime(2015, 1, 1), 'textParts': { 'string': { 'type': 'LOCALIZED_TEXT'|'PLAIN_TEXT'|'URL', 'displayText': 'string', 'textByLocale': { 'string': 'string' }, 'url': 'string' } }, 'media': [ { 'mediaId': 'string', 'type': 'IMAGE', 'url': 'string', 'caption': 'string' }, ] } }
Response Structure
(dict) –
arn (string) –
The ARN of the resource.
notificationConfigurationArn (string) –
The ARN of the NotificationConfiguration.
creationTime (datetime) –
The creation time of the NotificationEvent.
content (dict) –
The content of the NotificationEvent.
schemaVersion (string) –
The schema version of the Notification Event.
id (string) –
The unique identifier for a NotificationEvent.
sourceEventMetadata (dict) –
The source event metadata.
eventTypeVersion (string) –
The version of the type of event.
sourceEventId (string) –
The source event id.
eventOriginRegion (string) –
The Region the event originated from.
relatedAccount (string) –
The Primary AWS account of Source Event
source (string) –
The AWS servvice the event originates from. For example
aws.cloudwatch
.eventOccurrenceTime (datetime) –
The date and time the source event occurred. This is based on the Source Event.
eventType (string) –
The type of event. For example, an AWS CloudWatch state change.
relatedResources (list) –
A list of resources related to this NotificationEvent.
(dict) –
A resource affected by or closely linked to an event.
id (string) –
The unique identifier for the resource.
At least one id or ARN is required.
arn (string) –
The Amazon Resource Name (ARN) of the resource. At least one id or ARN is required.
detailUrl (string) –
The URL to the resource’s detail page. If a detail page URL is unavailable, it is the URL to an informational page that describes the resource’s type.
tags (list) –
A map of tags assigned to a resource. A tag is a string-to-string map of key-value pairs.
(string) –
messageComponents (dict) –
Describes the components of a notification message.
headline (string) –
A sentence long summary. For example, titles or an email subject line.
paragraphSummary (string) –
A paragraph long or multiple sentence summary. For example, AWS Chatbot notifications.
completeDescription (string) –
A complete summary with all possible relevant information.
dimensions (list) –
A list of properties in key-value pairs. Pairs are shown in order of importance from most important to least important. Channels may limit the number of dimensions shown to the notification viewer.
Note
Included dimensions, keys, and values are subject to change.
(dict) –
The key-value pair of properties for an event.
name (string) –
The name of the dimension
value (string) –
The value of the dimension.
sourceEventDetailUrl (string) –
The source event URL.
sourceEventDetailUrlDisplayText (string) –
The detailed URL for the source event.
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.
eventStatus (string) –
The assesed nature of the event.
Values:
HEALTHY
All EventRules are
ACTIVE
and any call can be run.
UNHEALTHY
Some EventRules are
ACTIVE
and some areINACTIVE
. Any call can be run.
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 areINACTIVE
. Any call can be run.
NONE
The notification isn’t aggregated.
aggregateNotificationEventArn (string) –
If the value of aggregationEventType is not
NONE
, this is the Amazon Resource Event (ARN) of the parent aggregate notification.This is omitted if notification isn’t aggregated.
startTime (datetime) –
The notification event start time.
endTime (datetime) –
The end time of the event.
textParts (dict) –
A list of text values.
(string) –
(dict) –
Describes text information objects containing fields that determine how text part objects are composed.
type (string) –
The type of text part. Determines the usage of all other fields and whether or not they’re required.
displayText (string) –
A short single line description of the link. Must be hyperlinked with the URL itself.
Used for text parts with the type
URL
.textByLocale (dict) –
A map of locales to the text in that locale.
(string) –
(string) –
url (string) –
The URL itself.
media (list) –
A list of media elements.
(dict) –
Describes a media element.
mediaId (string) –
The unique ID for the media.
type (string) –
The type of media.
url (string) –
The url of the media.
caption (string) –
The caption of the media.
Exceptions