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

********************************
terminate_client_vpn_connections
********************************



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

  

  Terminates active Client VPN endpoint connections. This action can be used to terminate a specific client connection, or up to five connections established by a specific user.

  

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


  **Request Syntax**
  ::

    response = client.terminate_client_vpn_connections(
        ClientVpnEndpointId='string',
        ConnectionId='string',
        Username='string',
        DryRun=True|False
    )
    
  :type ClientVpnEndpointId: string
  :param ClientVpnEndpointId: **[REQUIRED]** 

    The ID of the Client VPN endpoint to which the client is connected.

    

  
  :type ConnectionId: string
  :param ConnectionId: 

    The ID of the client connection to be terminated.

    

  
  :type Username: string
  :param Username: 

    The name of the user who initiated the connection. Use this option to terminate all active connections for the specified user. This option can only be used if the user has established up to five connections.

    

  
  :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``.

    

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

    
    ::

      {
          'ClientVpnEndpointId': 'string',
          'Username': 'string',
          'ConnectionStatuses': [
              {
                  'ConnectionId': 'string',
                  'PreviousStatus': {
                      'Code': 'active'|'failed-to-terminate'|'terminating'|'terminated',
                      'Message': 'string'
                  },
                  'CurrentStatus': {
                      'Code': 'active'|'failed-to-terminate'|'terminating'|'terminated',
                      'Message': 'string'
                  }
              },
          ]
      }
      
    **Response Structure**

    

    - *(dict) --* 
      

      - **ClientVpnEndpointId** *(string) --* 

        The ID of the Client VPN endpoint.

        
      

      - **Username** *(string) --* 

        The user who established the terminated client connections.

        
      

      - **ConnectionStatuses** *(list) --* 

        The current state of the client connections.

        
        

        - *(dict) --* 

          Information about a terminated Client VPN endpoint client connection.

          
          

          - **ConnectionId** *(string) --* 

            The ID of the client connection.

            
          

          - **PreviousStatus** *(dict) --* 

            The state of the client connection.

            
            

            - **Code** *(string) --* 

              The state of the client connection.

              
            

            - **Message** *(string) --* 

              A message about the status of the client connection, if applicable.

              
        
          

          - **CurrentStatus** *(dict) --* 

            A message about the status of the client connection, if applicable.

            
            

            - **Code** *(string) --* 

              The state of the client connection.

              
            

            - **Message** *(string) --* 

              A message about the status of the client connection, if applicable.

              
        
      
    
  