create_notification
async
¶
create_notification(
instance_id: InstanceId,
recipients: RecipientList,
content: NotificationContent,
*,
config_overrides: Optional[AsyncConnectClientConfig] = None,
expires_at: Optional[Timestamp] = None,
priority: Optional[ConfigurableNotificationPriority] = None,
tags: Optional[TagMap] = None,
predefined_notification_id: Optional[NotificationId] = None,
client_token: Optional[ClientToken] = None,
) -> CreateNotificationResponse
Creates a new notification to be delivered to specified recipients. Notifications can include localized content with links, and an optional expiration time. Recipients can be specified as individual user ARNs or instance ARNs to target all users in an instance.
Parameters:
-
instance_id(InstanceId) –The identifier of the Amazon Connect instance. You can find the instance ID in the Amazon Resource Name (ARN) of the instance.
-
expires_at(Optional[Timestamp], default:None) –The timestamp when the notification should expire and no longer be displayed to users. If not specified, defaults to one week from creation.
-
recipients(RecipientList) –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.
-
priority(Optional[ConfigurableNotificationPriority], default:None) –The priority level of the notification. Valid values are HIGH and LOW. High priority notifications are displayed above low priority notifications.
-
content(NotificationContent) –The localized content of the notification. A map where keys are locale codes and values are the notification text in that locale. Content supports links. Maximum 250 characters per locale.
-
tags(Optional[TagMap], default:None) –The tags used to organize, track, or control access for this resource. For example,
{ "Tags": {"key1":"value1", "key2":"value2"} }. -
client_token(Optional[ClientToken], default:None) –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.
Raises:
-
AccessDeniedException–You do not have sufficient permissions to perform this action.
-
DuplicateResourceException–A resource with the specified name already exists.
-
InternalServiceException–Request processing failed because of an error or failure with the service.
-
InvalidParameterException–One or more of the specified parameters are not valid.
-
InvalidRequestException–The request is not valid.
-
ResourceNotFoundException–The specified resource was not found.
-
ThrottlingException–The throttling limit has been exceeded.
-
UnknownServiceError–The service returned an error code this client does not model.
Source code in docs_src/capo_connect/_services/async_connect.py
4927 4928 4929 4930 4931 4932 4933 4934 4935 4936 4937 4938 4939 4940 4941 4942 4943 4944 4945 4946 4947 4948 4949 4950 4951 4952 4953 4954 4955 4956 4957 4958 4959 4960 4961 4962 4963 4964 4965 4966 4967 4968 4969 4970 4971 4972 4973 4974 4975 4976 4977 4978 4979 4980 4981 4982 4983 4984 4985 4986 4987 4988 4989 4990 4991 4992 4993 4994 4995 4996 4997 4998 4999 5000 5001 5002 5003 5004 5005 5006 5007 | |