Select your cookie preferences

We use cookies and similar tools to enhance your experience, provide our services, deliver relevant advertising, and make improvements. Approved third parties also use these tools to help us deliver advertising and provide certain site features.

terminate_client_vpn_connections

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

Request Syntax

response = client.terminate_client_vpn_connections(
    ClientVpnEndpointId='string',
    ConnectionId='string',
    Username='string',
    DryRun=True|False
)
Parameters
  • ClientVpnEndpointId (string) --

    [REQUIRED]

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

  • ConnectionId (string) -- The ID of the client connection to be terminated.
  • Username (string) -- 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.
  • DryRun (boolean) -- 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 .
Return type

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.