client_vpn_connections
Creates, updates, deletes, gets or lists a client_vpn_connections resource.
Overview
| Name | client_vpn_connections |
| Type | Resource |
| Id | aws.ec2.client_vpn_connections |
Fields
The following fields are returned by SELECT queries:
- describe_client_vpn_connections
| Name | Datatype | Description |
|---|---|---|
client_ip | string | The IP address of the client. |
client_ipv_6_address | string | The 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_id | string | The ID of the Client VPN endpoint to which the client is connected. |
common_name | string | The common name associated with the client. This is either the name of the client certificate, or the Active Directory user name. |
connection_end_time | string | The date and time the client connection was terminated. |
connection_established_time | string | The date and time the client connection was established. |
connection_id | string | The ID of the client connection. |
egress_bytes | string | The number of bytes received by the client. |
egress_packets | string | The number of packets received by the client. |
ingress_bytes | string | The number of bytes sent by the client. |
ingress_packets | string | The number of packets sent by the client. |
posture_compliance_statuses | string | The statuses returned by the client connect handler for posture compliance, if applicable. |
status | string | The current state of the client connection. |
timestamp | string | The current date and time. |
username | string | The 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:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
describe_client_vpn_connections | select | ClientVpnEndpointId, region | Filter, NextToken, MaxResults, DryRun | Describes active client connections and connections that have been terminated within the last 60 minutes for the specified Client VPN endpoint. |
terminate_client_vpn_connections | delete | ClientVpnEndpointId, region | ConnectionId, Username, DryRun | 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. |
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.
| Name | Datatype | Description |
|---|---|---|
ClientVpnEndpointId | string | The ID of the Client VPN endpoint to which the client is connected. |
region | string | AWS region (default: us-east-1) |
ConnectionId | string | The ID of the client connection to be terminated. |
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. |
Filter | array | 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. |
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. |
NextToken | string | The token to retrieve the next page of results. |
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. |
SELECT examples
- describe_client_vpn_connections
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
- terminate_client_vpn_connections
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 }}'
;