EC2 / Client / describe_client_vpn_connections

describe_client_vpn_connections#

EC2.Client.describe_client_vpn_connections(**kwargs)#

Describes active client connections and connections that have been terminated within the last 60 minutes for the specified Client VPN endpoint.

See also: AWS API Documentation

Request Syntax

response = client.describe_client_vpn_connections(
    ClientVpnEndpointId='string',
    Filters=[
        {
            'Name': 'string',
            'Values': [
                'string',
            ]
        },
    ],
    NextToken='string',
    MaxResults=123,
    DryRun=True|False
)
Parameters:
  • ClientVpnEndpointId (string) –

    [REQUIRED]

    The ID of the Client VPN endpoint.

  • Filters (list) –

    One or more filters. Filter names and values are case-sensitive.

    • connection-id - The ID of the connection.

    • username - For Active Directory client authentication, the user name of the client who established the client connection.

    • (dict) –

      A filter name and value pair that is used to return a more specific list of results from a describe operation. Filters can be used to match a set of resources by specific criteria, such as tags, attributes, or IDs.

      If you specify multiple filters, the filters are joined with an AND, and the request returns only results that match all of the specified filters.

      • Name (string) –

        The name of the filter. Filter names are case-sensitive.

      • Values (list) –

        The filter values. Filter values are case-sensitive. If you specify multiple values for a filter, the values are joined with an OR, and the request returns all results that match any of the specified values.

        • (string) –

  • NextToken (string) – The token to retrieve the next page of results.

  • MaxResults (integer) – The maximum number of results to return for the request in a single page. The remaining results can be seen by sending another request with the nextToken value.

  • 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

{
    'Connections': [
        {
            'ClientVpnEndpointId': 'string',
            'Timestamp': 'string',
            'ConnectionId': 'string',
            'Username': 'string',
            'ConnectionEstablishedTime': 'string',
            'IngressBytes': 'string',
            'EgressBytes': 'string',
            'IngressPackets': 'string',
            'EgressPackets': 'string',
            'ClientIp': 'string',
            'CommonName': 'string',
            'Status': {
                'Code': 'active'|'failed-to-terminate'|'terminating'|'terminated',
                'Message': 'string'
            },
            'ConnectionEndTime': 'string',
            'PostureComplianceStatuses': [
                'string',
            ]
        },
    ],
    'NextToken': 'string'
}

Response Structure

  • (dict) –

    • Connections (list) –

      Information about the active and terminated client connections.

      • (dict) –

        Describes a client connection.

        • ClientVpnEndpointId (string) –

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

        • Timestamp (string) –

          The current date and time.

        • ConnectionId (string) –

          The ID of the client connection.

        • Username (string) –

          The username of the client who established the client connection. This information is only provided if Active Directory client authentication is used.

        • ConnectionEstablishedTime (string) –

          The date and time the client connection was established.

        • IngressBytes (string) –

          The number of bytes sent by the client.

        • EgressBytes (string) –

          The number of bytes received by the client.

        • IngressPackets (string) –

          The number of packets sent by the client.

        • EgressPackets (string) –

          The number of packets received by the client.

        • ClientIp (string) –

          The IP address of the client.

        • CommonName (string) –

          The common name associated with the client. This is either the name of the client certificate, or the Active Directory user name.

        • Status (dict) –

          The current 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.

        • ConnectionEndTime (string) –

          The date and time the client connection was terminated.

        • PostureComplianceStatuses (list) –

          The statuses returned by the client connect handler for posture compliance, if applicable.

          • (string) –

    • NextToken (string) –

      The token to use to retrieve the next page of results. This value is null when there are no more results to return.