Skip to main content

user_notifications

Creates, updates, deletes, gets or lists a user_notifications resource.

Overview

Nameuser_notifications
TypeResource
Idaws.connect.user_notifications

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
next_tokenstringThe token for the next set of results. If present, there are more results available.
user_notificationsarrayA list of notifications sent to the specified user.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
list_user_notificationsselectinstance_id, user_id, regionnextToken, maxResultsRetrieves a paginated list of notifications for a specific user, including the notification status for that user.
update_user_notification_statusupdateinstance_id, notification_id, user_id, region, Statusx-amz-last-modified-time, x-amz-last-modified-regionUpdates the status of a notification for a specific user, such as marking it as read or hidden. Users can only update notification status for notifications that have been sent to them. READ status deprioritizes the notification and greys it out, while HIDDEN status removes it from the notification widget.

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
instance_idstringThe identifier of the Amazon Connect instance. You can find the instance ID in the Amazon Resource Name (ARN) of the instance.
notification_idstringThe unique identifier for the notification.
regionstringAWS region (default: us-east-1)
user_idstringThe identifier of the user whose notification status is being updated.
maxResultsintegerThe maximum number of results to return per page. Valid range is 1-1000.
nextTokenstringThe token for the next set of results. Use the value returned in the previous response to retrieve the next page of results.
x-amz-last-modified-regionstringThe AWS Region where the notification status was last modified. Used for cross-region replication.
x-amz-last-modified-timestring (date-time)The timestamp when the notification status was last modified. Used for cross-region replication and optimistic locking.

SELECT examples

Retrieves a paginated list of notifications for a specific user, including the notification status for that user.

SELECT
next_token,
user_notifications
FROM aws.connect.user_notifications
WHERE instance_id = '{{ instance_id }}' -- required
AND user_id = '{{ user_id }}' -- required
AND region = '{{ region }}' -- required
AND nextToken = '{{ nextToken }}'
AND maxResults = '{{ maxResults }}'
;

UPDATE examples

Updates the status of a notification for a specific user, such as marking it as read or hidden. Users can only update notification status for notifications that have been sent to them. READ status deprioritizes the notification and greys it out, while HIDDEN status removes it from the notification widget.

UPDATE aws.connect.user_notifications
SET
Status = '{{ Status }}'
WHERE
instance_id = '{{ instance_id }}' --required
AND notification_id = '{{ notification_id }}' --required
AND user_id = '{{ user_id }}' --required
AND region = '{{ region }}' --required
AND Status = '{{ Status }}' --required
AND `x-amz-last-modified-time` = '{{ x-amz-last-modified-time}}'
AND `x-amz-last-modified-region` = '{{ x-amz-last-modified-region}}';