Skip to main content

client_vpn_connections

Creates, updates, deletes, gets or lists a client_vpn_connections resource.

Overview

Nameclient_vpn_connections
TypeResource
Idaws.ec2.client_vpn_connections

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
client_ipstringThe IP address of the client.
client_ipv_6_addressstringThe IPv6 address assigned to the client connection when using a dual-stack Client VPN endpoint. This field is only populated when the endpoint is configured for dual-stack addressing, and the client is using IPv6 for connectivity.
client_vpn_endpoint_idstringThe ID of the Client VPN endpoint to which the client is connected.
common_namestringThe common name associated with the client. This is either the name of the client certificate, or the Active Directory user name.
connection_end_timestringThe date and time the client connection was terminated.
connection_established_timestringThe date and time the client connection was established.
connection_idstringThe ID of the client connection.
egress_bytesstringThe number of bytes received by the client.
egress_packetsstringThe number of packets received by the client.
ingress_bytesstringThe number of bytes sent by the client.
ingress_packetsstringThe number of packets sent by the client.
posture_compliance_statusesstringThe statuses returned by the client connect handler for posture compliance, if applicable.
statusstringThe current state of the client connection.
timestampstringThe current date and time.
usernamestringThe username of the client who established the client connection. This information is only provided if Active Directory client authentication is used.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
describe_client_vpn_connectionsselectClientVpnEndpointId, regionFilter, NextToken, MaxResults, DryRunDescribes active client connections and connections that have been terminated within the last 60 minutes for the specified Client VPN endpoint.
terminate_client_vpn_connectionsdeleteClientVpnEndpointId, regionConnectionId, Username, DryRunTerminates 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.

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
ClientVpnEndpointIdstringThe ID of the Client VPN endpoint to which the client is connected.
regionstringAWS region (default: us-east-1)
ConnectionIdstringThe ID of the client connection to be terminated.
DryRunbooleanChecks 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.
FilterarrayOne 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.
MaxResultsintegerThe 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.
NextTokenstringThe token to retrieve the next page of results.
UsernamestringThe 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.

SELECT examples

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

SELECT
client_ip,
client_ipv_6_address,
client_vpn_endpoint_id,
common_name,
connection_end_time,
connection_established_time,
connection_id,
egress_bytes,
egress_packets,
ingress_bytes,
ingress_packets,
posture_compliance_statuses,
status,
timestamp,
username
FROM aws.ec2.client_vpn_connections
WHERE ClientVpnEndpointId = '{{ ClientVpnEndpointId }}' -- required
AND region = '{{ region }}' -- required
AND Filter = '{{ Filter }}'
AND NextToken = '{{ NextToken }}'
AND MaxResults = '{{ MaxResults }}'
AND DryRun = '{{ DryRun }}'
;

DELETE examples

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.

DELETE FROM aws.ec2.client_vpn_connections
WHERE ClientVpnEndpointId = '{{ ClientVpnEndpointId }}' --required
AND region = '{{ region }}' --required
AND ConnectionId = '{{ ConnectionId }}'
AND Username = '{{ Username }}'
AND DryRun = '{{ DryRun }}'
;