:doc:`Connect <../../connect>` / Client / create_notification

*******************
create_notification
*******************



.. py:method:: 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 <https://docs.aws.amazon.com/goto/WebAPI/connect-2017-08-08/CreateNotification>`_  


  **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'
    )
    
  :type InstanceId: string
  :param InstanceId: **[REQUIRED]** 

    The identifier of the Amazon Connect instance. You can `find the instance ID <https://docs.aws.amazon.com/connect/latest/adminguide/find-instance-arn.html>`__ in the Amazon Resource Name (ARN) of the instance.

    

  
  :type ExpiresAt: datetime
  :param ExpiresAt: 

    The timestamp when the notification should expire and no longer be displayed to users. If not specified, defaults to one week from creation.

    

  
  :type Recipients: list
  :param Recipients: **[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) --* 

    

  :type Priority: string
  :param Priority: 

    The priority level of the notification. Valid values are HIGH and LOW. High priority notifications are displayed above low priority notifications.

    

  
  :type Content: dict
  :param Content: **[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.

        

      


  :type Tags: dict
  :param Tags: 

    The tags used to organize, track, or control access for this resource. For example, ``{ "Tags": {"key1":"value1", "key2":"value2"} }``.

    

  
    - *(string) --* 

    
      - *(string) --* 

      


  :type PredefinedNotificationId: string
  :param PredefinedNotificationId: 

    The unique identifier for a notification.

    

  
  :type ClientToken: string
  :param ClientToken: 

    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 <https://aws.amazon.com/builders-library/making-retries-safe-with-idempotent-APIs/>`__.

    This field is autopopulated if not provided.

  
  
  :rtype: 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**
  
  *   :py:class:`Connect.Client.exceptions.InvalidRequestException`

  
  *   :py:class:`Connect.Client.exceptions.DuplicateResourceException`

  
  *   :py:class:`Connect.Client.exceptions.ResourceNotFoundException`

  
  *   :py:class:`Connect.Client.exceptions.InternalServiceException`

  
  *   :py:class:`Connect.Client.exceptions.ThrottlingException`

  
  *   :py:class:`Connect.Client.exceptions.AccessDeniedException`

  
  *   :py:class:`Connect.Client.exceptions.InvalidParameterException`

  