user_notifications
Creates, updates, deletes, gets or lists a user_notifications resource.
Overview
| Name | user_notifications |
| Type | Resource |
| Id | aws.connect.user_notifications |
Fields
The following fields are returned by SELECT queries:
- list_user_notifications
| Name | Datatype | Description |
|---|---|---|
next_token | string | The token for the next set of results. If present, there are more results available. |
user_notifications | array | A list of notifications sent to the specified user. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
list_user_notifications | select | instance_id, user_id, region | nextToken, maxResults | Retrieves a paginated list of notifications for a specific user, including the notification status for that user. |
update_user_notification_status | update | instance_id, notification_id, user_id, region, Status | x-amz-last-modified-time, x-amz-last-modified-region | 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. |
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.
| Name | Datatype | Description |
|---|---|---|
instance_id | string | The identifier of the Amazon Connect instance. You can find the instance ID in the Amazon Resource Name (ARN) of the instance. |
notification_id | string | The unique identifier for the notification. |
region | string | AWS region (default: us-east-1) |
user_id | string | The identifier of the user whose notification status is being updated. |
maxResults | integer | The maximum number of results to return per page. Valid range is 1-1000. |
nextToken | string | The 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-region | string | The AWS Region where the notification status was last modified. Used for cross-region replication. |
x-amz-last-modified-time | string (date-time) | The timestamp when the notification status was last modified. Used for cross-region replication and optimistic locking. |
SELECT examples
- list_user_notifications
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
- update_user_notification_status
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}}';