Connect / Client / create_notification
create_notification¶
- Connect.Client.create_notification(**kwargs)¶
Creates a new notification to be delivered to specified recipients. Notifications can include localized content with embedded links, and an optional expiration time. Recipients can be specified as individual user ARNs or instance ARNs to target all users in an instance.
See also: AWS API Documentation
Request Syntax
response = client.create_notification( InstanceId='string', ExpiresAt=datetime(2015, 1, 1), Recipients=[ 'string', ], Priority='HIGH'|'LOW', Content={ 'string': 'string' }, Tags={ 'string': 'string' }, PredefinedNotificationId='string', ClientToken='string' )
- Parameters:
InstanceId (string) –
[REQUIRED]
The identifier of the Amazon Connect instance. You can find the instance ID in the Amazon Resource Name (ARN) of the instance.
ExpiresAt (datetime) – The timestamp when the notification should expire and no longer be displayed to users. If not specified, defaults to one week from creation.
Recipients (list) –
[REQUIRED]
A list of Amazon Resource Names (ARNs) identifying the recipients of the notification. Can include user ARNs or instance ARNs to target all users in an instance. Maximum of 200 recipients.
(string) –
Priority (string) – The priority level of the notification. Valid values are HIGH and LOW. High priority notifications are displayed above low priority notifications.
Content (dict) –
[REQUIRED]
The localized content of the notification. A map where keys are locale codes and values are the notification text in that locale. Content supports markdown formatting and embedded links. Maximum 250 characters per locale.
(string) –
The locale code for localized content. Supported values include en_US, de_DE, es_ES, fr_FR, id_ID, it_IT, ja_JP, ko_KR, pt_BR, zh_CN, and zh_TW.
(string) –
A localized string value. Maximum length is 500 characters.
Tags (dict) –
The tags used to organize, track, or control access for this resource. For example,
{ "Tags": {"key1":"value1", "key2":"value2"} }.(string) –
(string) –
PredefinedNotificationId (string) – The unique identifier for a notification.
ClientToken (string) –
A unique, case-sensitive identifier that you provide to ensure the idempotency of the request. If not provided, the Amazon Web Services SDK populates this field. For more information about idempotency, see Making retries safe with idempotent APIs.
This field is autopopulated if not provided.
- Return type:
dict
- Returns:
Response Syntax
{ 'NotificationId': 'string', 'NotificationArn': 'string' }
Response Structure
(dict) –
NotificationId (string) –
The unique identifier assigned to the created notification.
NotificationArn (string) –
The Amazon Resource Name (ARN) of the created notification.
Exceptions
Connect.Client.exceptions.InvalidRequestExceptionConnect.Client.exceptions.DuplicateResourceExceptionConnect.Client.exceptions.ResourceNotFoundExceptionConnect.Client.exceptions.InternalServiceExceptionConnect.Client.exceptions.ThrottlingExceptionConnect.Client.exceptions.AccessDeniedExceptionConnect.Client.exceptions.InvalidParameterException