:doc:`WorkDocs <../../workdocs>` / Client / create_notification_subscription

********************************
create_notification_subscription
********************************



.. py:method:: WorkDocs.Client.create_notification_subscription(**kwargs)

  

  Configure Amazon WorkDocs to use Amazon SNS notifications. The endpoint receives a confirmation message, and must confirm the subscription.

   

  For more information, see `Setting up notifications for an IAM user or role <https://docs.aws.amazon.com/workdocs/latest/developerguide/manage-notifications.html>`__ in the *Amazon WorkDocs Developer Guide*.

  

  See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/workdocs-2016-05-01/CreateNotificationSubscription>`_  


  **Request Syntax**
  ::

    response = client.create_notification_subscription(
        OrganizationId='string',
        Endpoint='string',
        Protocol='HTTPS'|'SQS',
        SubscriptionType='ALL'
    )
    
  :type OrganizationId: string
  :param OrganizationId: **[REQUIRED]** 

    The ID of the organization.

    

  
  :type Endpoint: string
  :param Endpoint: **[REQUIRED]** 

    The endpoint to receive the notifications. If the protocol is HTTPS, the endpoint is a URL that begins with ``https``.

    

  
  :type Protocol: string
  :param Protocol: **[REQUIRED]** 

    The protocol to use. The supported value is https, which delivers JSON-encoded messages using HTTPS POST.

    

  
  :type SubscriptionType: string
  :param SubscriptionType: **[REQUIRED]** 

    The notification type.

    

  
  
  :rtype: dict
  :returns: 
    
    **Response Syntax**

    
    ::

      {
          'Subscription': {
              'SubscriptionId': 'string',
              'EndPoint': 'string',
              'Protocol': 'HTTPS'|'SQS'
          }
      }
      
    **Response Structure**

    

    - *(dict) --* 
      

      - **Subscription** *(dict) --* 

        The subscription.

        
        

        - **SubscriptionId** *(string) --* 

          The ID of the subscription.

          
        

        - **EndPoint** *(string) --* 

          The endpoint of the subscription.

          
        

        - **Protocol** *(string) --* 

          The protocol of the subscription.

          
    
  
  **Exceptions**
  
  *   :py:class:`WorkDocs.Client.exceptions.UnauthorizedResourceAccessException`

  
  *   :py:class:`WorkDocs.Client.exceptions.TooManySubscriptionsException`

  
  *   :py:class:`WorkDocs.Client.exceptions.ServiceUnavailableException`

  
  *   :py:class:`WorkDocs.Client.exceptions.InvalidArgumentException`

  