:doc:`EC2 <../../ec2>` / Client / create_vpc_endpoint_connection_notification

*******************************************
create_vpc_endpoint_connection_notification
*******************************************



.. py:method:: EC2.Client.create_vpc_endpoint_connection_notification(**kwargs)

  

  Creates a connection notification for a specified VPC endpoint or VPC endpoint service. A connection notification notifies you of specific endpoint events. You must create an SNS topic to receive notifications. For more information, see `Creating an Amazon SNS topic <https://docs.aws.amazon.com/sns/latest/dg/CreateTopic.html>`__ in the *Amazon SNS Developer Guide*.

   

  You can create a connection notification for interface endpoints only.

  

  See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateVpcEndpointConnectionNotification>`_  


  **Request Syntax**
  ::

    response = client.create_vpc_endpoint_connection_notification(
        DryRun=True|False,
        ServiceId='string',
        VpcEndpointId='string',
        ConnectionNotificationArn='string',
        ConnectionEvents=[
            'string',
        ],
        ClientToken='string'
    )
    
  :type DryRun: boolean
  :param DryRun: 

    Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is ``DryRunOperation``. Otherwise, it is ``UnauthorizedOperation``.

    

  
  :type ServiceId: string
  :param ServiceId: 

    The ID of the endpoint service.

    

  
  :type VpcEndpointId: string
  :param VpcEndpointId: 

    The ID of the endpoint.

    

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

    The ARN of the SNS topic for the notifications.

    

  
  :type ConnectionEvents: list
  :param ConnectionEvents: **[REQUIRED]** 

    The endpoint events for which to receive notifications. Valid values are ``Accept``, ``Connect``, ``Delete``, and ``Reject``.

    

  
    - *(string) --* 

    

  :type ClientToken: string
  :param ClientToken: 

    Unique, case-sensitive identifier that you provide to ensure the idempotency of the request. For more information, see `How to ensure idempotency <https://docs.aws.amazon.com/ec2/latest/devguide/ec2-api-idempotency.html>`__.

    

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

    
    ::

      {
          'ConnectionNotification': {
              'ConnectionNotificationId': 'string',
              'ServiceId': 'string',
              'VpcEndpointId': 'string',
              'ConnectionNotificationType': 'Topic',
              'ConnectionNotificationArn': 'string',
              'ConnectionEvents': [
                  'string',
              ],
              'ConnectionNotificationState': 'Enabled'|'Disabled',
              'ServiceRegion': 'string'
          },
          'ClientToken': 'string'
      }
      
    **Response Structure**

    

    - *(dict) --* 
      

      - **ConnectionNotification** *(dict) --* 

        Information about the notification.

        
        

        - **ConnectionNotificationId** *(string) --* 

          The ID of the notification.

          
        

        - **ServiceId** *(string) --* 

          The ID of the endpoint service.

          
        

        - **VpcEndpointId** *(string) --* 

          The ID of the VPC endpoint.

          
        

        - **ConnectionNotificationType** *(string) --* 

          The type of notification.

          
        

        - **ConnectionNotificationArn** *(string) --* 

          The ARN of the SNS topic for the notification.

          
        

        - **ConnectionEvents** *(list) --* 

          The events for the notification. Valid values are ``Accept``, ``Connect``, ``Delete``, and ``Reject``.

          
          

          - *(string) --* 
      
        

        - **ConnectionNotificationState** *(string) --* 

          The state of the notification.

          
        

        - **ServiceRegion** *(string) --* 

          The Region for the endpoint service.

          
    
      

      - **ClientToken** *(string) --* 

        Unique, case-sensitive identifier that you provide to ensure the idempotency of the request.

        
  