Skip to main content

client_vpn_endpoints

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

Overview

Nameclient_vpn_endpoints
TypeResource
Idaws.ec2.client_vpn_endpoints

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
associated_target_networksstringInformation about the associated target networks. A target network is a subnet in a VPC.
authentication_optionsstringInformation about the authentication method used by the Client VPN endpoint.
client_cidr_blockstringThe IPv4 address range, in CIDR notation, from which client IP addresses are assigned.
client_connect_optionsstringThe options for managing connection authorization for new client connections.
client_login_banner_optionsstringOptions for enabling a customizable text banner that will be displayed on Amazon Web Services provided clients when a VPN session is established.
client_route_enforcement_optionsstringClient route enforcement is a feature of the Client VPN service that helps enforce administrator defined routes on devices connected through the VPN. T his feature helps improve your security posture by ensuring that network traffic originating from a connected client is not inadvertently sent outside the VPN tunnel. Client route enforcement works by monitoring the route table of a connected device for routing policy changes to the VPN connection. If the feature detects any VPN routing policy modifications, it will automatically force an update to the route table, reverting it back to the expected route configurations.
client_vpn_endpoint_idstringThe ID of the Client VPN endpoint.
connection_log_optionsstringInformation about the client connection logging options for the Client VPN endpoint.
creation_timestringThe date and time the Client VPN endpoint was created.
deletion_timestringThe date and time the Client VPN endpoint was deleted, if applicable.
descriptionstringA brief description of the endpoint.
disconnect_on_session_timeoutbooleanIndicates whether the client VPN session is disconnected after the maximum sessionTimeoutHours is reached. If true, users are prompted to reconnect client VPN. If false, client VPN attempts to reconnect automatically. The default value is true.
dns_namestringThe DNS name to be used by clients when connecting to the Client VPN endpoint.
dns_serversstringInformation about the DNS servers to be used for DNS resolution.
endpoint_ip_address_typestringThe IP address type of the Client VPN endpoint. Possible values are ipv4 for IPv4 addressing only, ipv6 for IPv6 addressing only, or dual-stack for both IPv4 and IPv6 addressing.
security_group_idsstringThe IDs of the security groups for the target network.
self_service_portal_urlstringThe URL of the self-service portal.
server_certificate_arnstringThe ARN of the server certificate.
session_timeout_hoursintegerThe maximum VPN session duration time in hours. Valid values: 8 | 10 | 12 | 24 Default value: 24
split_tunnelbooleanIndicates whether split-tunnel is enabled in the Client VPN endpoint. For information about split-tunnel VPN endpoints, see Split-Tunnel Client VPN endpoint in the Client VPN Administrator Guide.
statusstringThe current state of the Client VPN endpoint.
tagsstringAny tags assigned to the Client VPN endpoint.
traffic_ip_address_typestringThe IP address type of the Client VPN endpoint. Possible values are either ipv4 for IPv4 addressing only, ipv6 for IPv6 addressing only, or dual-stack for both IPv4 and IPv6 addressing.
transit_gateway_configurationstringThe Transit Gateway configuration for the Client VPN endpoint.
transport_protocolstringThe transport protocol used by the Client VPN endpoint.
vpc_idstringThe ID of the VPC.
vpn_portintegerThe port number for the Client VPN endpoint.
vpn_protocolstringThe protocol used by the VPN session.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
describe_client_vpn_endpointsselectregionClientVpnEndpointId, MaxResults, NextToken, Filter, DryRunDescribes one or more Client VPN endpoints in the account.
create_client_vpn_endpointinsertServerCertificateArn, Authentication, ConnectionLogOptions, regionClientCidrBlock, DnsServers, TransportProtocol, VpnPort, Description, SplitTunnel, DryRun, ClientToken, TagSpecification, SecurityGroupId, VpcId, SelfServicePortal, ClientConnectOptions, SessionTimeoutHours, ClientLoginBannerOptions, ClientRouteEnforcementOptions, DisconnectOnSessionTimeout, EndpointIpAddressType, TrafficIpAddressType, TransitGatewayConfigurationCreates a Client VPN endpoint. A Client VPN endpoint is the resource you create and configure to enable and manage client VPN sessions. It is the destination endpoint at which all client VPN sessions are terminated.
authorize_client_vpn_ingressupdateClientVpnEndpointId, TargetNetworkCidr, regionAccessGroupId, AuthorizeAllGroups, Description, ClientToken, DryRunAdds an ingress authorization rule to a Client VPN endpoint. Ingress authorization rules act as firewall rules that grant access to networks. You must configure ingress authorization rules to enable clients to access resources in Amazon Web Services or on-premises networks.
modify_client_vpn_endpointupdateClientVpnEndpointId, regionServerCertificateArn, ConnectionLogOptions, DnsServers, VpnPort, Description, SplitTunnel, DryRun, SecurityGroupId, VpcId, SelfServicePortal, ClientConnectOptions, SessionTimeoutHours, ClientLoginBannerOptions, ClientRouteEnforcementOptions, DisconnectOnSessionTimeout, TransitGatewayConfigurationModifies the specified Client VPN endpoint. Modifying the DNS server resets existing client connections.
delete_client_vpn_endpointdeleteClientVpnEndpointId, regionDryRunDeletes the specified Client VPN endpoint. You must disassociate all target networks before you can delete a Client VPN endpoint.
apply_security_groups_to_client_vpn_target_networkexecClientVpnEndpointId, VpcId, SecurityGroupId, regionDryRunApplies a security group to the association between the target network and the Client VPN endpoint. This action replaces the existing security groups with the specified security groups.
export_client_vpn_client_certificate_revocation_listexecClientVpnEndpointId, regionDryRunDownloads the client certificate revocation list for the specified Client VPN endpoint.
export_client_vpn_client_configurationexecClientVpnEndpointId, regionDryRunDownloads the contents of the Client VPN endpoint configuration file for the specified Client VPN endpoint. The Client VPN endpoint configuration file includes the Client VPN endpoint and certificate information clients need to establish a connection with the Client VPN endpoint.
import_client_vpn_client_certificate_revocation_listexecClientVpnEndpointId, CertificateRevocationList, regionDryRunUploads a client certificate revocation list to the specified Client VPN endpoint. Uploading a client certificate revocation list overwrites the existing client certificate revocation list. Uploading a client certificate revocation list resets existing client connections.
revoke_client_vpn_ingressexecClientVpnEndpointId, TargetNetworkCidr, regionAccessGroupId, RevokeAllGroups, DryRunRemoves an ingress authorization rule from a Client VPN endpoint.

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
AuthenticationarrayInformation about the authentication method to be used to authenticate clients.
CertificateRevocationListstringThe client certificate revocation list file. For more information, see Generate a Client Certificate Revocation List in the Client VPN Administrator Guide.
ClientVpnEndpointIdstringThe ID of the Client VPN endpoint with which the authorization rule is associated.
ConnectionLogOptionsobjectInformation about the client connection logging options. If you enable client connection logging, data about client connections is sent to a Cloudwatch Logs log stream. The following information is logged: Client connection requests Client connection results (successful and unsuccessful) Reasons for unsuccessful client connection requests Client connection termination time
SecurityGroupIdarrayThe IDs of the security groups to apply to the associated target network. Up to 5 security groups can be applied to an associated target network.
ServerCertificateArnstringThe ARN of the server certificate. For more information, see the Certificate Manager User Guide.
TargetNetworkCidrstringThe IPv4 address range, in CIDR notation, of the network for which access is being removed.
VpcIdstringThe ID of the VPC in which the associated target network is located.
regionstringAWS region (default: us-east-1)
AccessGroupIdstringThe ID of the Active Directory group for which to revoke access.
AuthorizeAllGroupsbooleanIndicates whether to grant access to all clients. Specify true to grant all clients who successfully establish a VPN connection access to the network. Must be set to true if AccessGroupId is not specified.
ClientCidrBlockstringThe IPv4 address range, in CIDR notation, from which to assign client IP addresses. The address range cannot overlap with the local CIDR of the VPC in which the associated subnet is located, or the routes that you add manually. The address range cannot be changed after the Client VPN endpoint has been created. Client CIDR range must have a size of at least /22 and must not be greater than /12.
ClientConnectOptionsobjectThe options for managing connection authorization for new client connections.
ClientLoginBannerOptionsobjectOptions for enabling a customizable text banner that will be displayed on Amazon Web Services provided clients when a VPN session is established.
ClientRouteEnforcementOptionsobjectClient route enforcement is a feature of the Client VPN service that helps enforce administrator defined routes on devices connected through the VPN. T his feature helps improve your security posture by ensuring that network traffic originating from a connected client is not inadvertently sent outside the VPN tunnel. Client route enforcement works by monitoring the route table of a connected device for routing policy changes to the VPN connection. If the feature detects any VPN routing policy modifications, it will automatically force an update to the route table, reverting it back to the expected route configurations.
ClientTokenstringUnique, case-sensitive identifier that you provide to ensure the idempotency of the request. For more information, see Ensuring idempotency.
ClientVpnEndpointIdarrayThe ID of the Client VPN endpoint.
ConnectionLogOptionsobjectInformation about the client connection logging options. If you enable client connection logging, data about client connections is sent to a Cloudwatch Logs log stream. The following information is logged: Client connection requests Client connection results (successful and unsuccessful) Reasons for unsuccessful client connection requests Client connection termination time
DescriptionstringA brief description of the Client VPN endpoint.
DisconnectOnSessionTimeoutbooleanIndicates whether the client VPN session is disconnected after the maximum timeout specified in sessionTimeoutHours is reached. If true, users are prompted to reconnect client VPN. If false, client VPN attempts to reconnect automatically. The default value is true.
DnsServersobjectInformation about the DNS servers to be used by Client VPN connections. A Client VPN endpoint can have up to two DNS servers.
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.
EndpointIpAddressTypestringThe IP address type for the Client VPN endpoint. Valid values are ipv4 (default) for IPv4 addressing only, ipv6 for IPv6 addressing only, or dual-stack for both IPv4 and IPv6 addressing. When set to dual-stack, clients can connect to the endpoint using either IPv4 or IPv6 addresses..
FilterarrayOne or more filters. Filter names and values are case-sensitive. endpoint-id - The ID of the Client VPN endpoint. transport-protocol - The transport protocol (tcp | udp).
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.
RevokeAllGroupsbooleanIndicates whether access should be revoked for all groups for a single TargetNetworkCidr that earlier authorized ingress for all groups using AuthorizeAllGroups. This does not impact other authorization rules that allowed ingress to the same TargetNetworkCidr with a specific AccessGroupId.
SecurityGroupIdarrayThe IDs of one or more security groups to apply to the target network.
SelfServicePortalstringSpecify whether to enable the self-service portal for the Client VPN endpoint.
ServerCertificateArnstringThe ARN of the server certificate to be used. The server certificate must be provisioned in Certificate Manager (ACM).
SessionTimeoutHoursintegerThe maximum VPN session duration time in hours. Valid values: 8 | 10 | 12 | 24 Default value: 24
SplitTunnelbooleanIndicates whether the VPN is split-tunnel. For information about split-tunnel VPN endpoints, see Split-tunnel Client VPN endpoint in the Client VPN Administrator Guide.
TagSpecificationarrayThe tags to apply to the Client VPN endpoint during creation.
TrafficIpAddressTypestringThe IP address type for traffic within the Client VPN tunnel. Valid values are ipv4 (default) for IPv4 traffic only, ipv6 for IPv6 addressing only, or dual-stack for both IPv4 and IPv6 traffic. When set to dual-stack, clients can access both IPv4 and IPv6 resources through the VPN .
TransitGatewayConfigurationobjectThe Transit Gateway configuration for the Client VPN endpoint. This option is currently not supported.
TransportProtocolstringThe transport protocol to be used by the VPN session. Default value: udp
VpcIdstringThe ID of the VPC to associate with the Client VPN endpoint.
VpnPortintegerThe port number to assign to the Client VPN endpoint for TCP and UDP traffic. Valid Values: 443 | 1194 Default Value: 443

SELECT examples

Describes one or more Client VPN endpoints in the account.

SELECT
associated_target_networks,
authentication_options,
client_cidr_block,
client_connect_options,
client_login_banner_options,
client_route_enforcement_options,
client_vpn_endpoint_id,
connection_log_options,
creation_time,
deletion_time,
description,
disconnect_on_session_timeout,
dns_name,
dns_servers,
endpoint_ip_address_type,
security_group_ids,
self_service_portal_url,
server_certificate_arn,
session_timeout_hours,
split_tunnel,
status,
tags,
traffic_ip_address_type,
transit_gateway_configuration,
transport_protocol,
vpc_id,
vpn_port,
vpn_protocol
FROM aws.ec2.client_vpn_endpoints
WHERE region = '{{ region }}' -- required
AND ClientVpnEndpointId = '{{ ClientVpnEndpointId }}'
AND MaxResults = '{{ MaxResults }}'
AND NextToken = '{{ NextToken }}'
AND Filter = '{{ Filter }}'
AND DryRun = '{{ DryRun }}'
;

INSERT examples

Creates a Client VPN endpoint. A Client VPN endpoint is the resource you create and configure to enable and manage client VPN sessions. It is the destination endpoint at which all client VPN sessions are terminated.

INSERT INTO aws.ec2.client_vpn_endpoints (
ServerCertificateArn,
Authentication,
ConnectionLogOptions,
region,
ClientCidrBlock,
DnsServers,
TransportProtocol,
VpnPort,
Description,
SplitTunnel,
DryRun,
ClientToken,
TagSpecification,
SecurityGroupId,
VpcId,
SelfServicePortal,
ClientConnectOptions,
SessionTimeoutHours,
ClientLoginBannerOptions,
ClientRouteEnforcementOptions,
DisconnectOnSessionTimeout,
EndpointIpAddressType,
TrafficIpAddressType,
TransitGatewayConfiguration
)
SELECT
'{{ ServerCertificateArn }}',
'{{ Authentication }}',
'{{ ConnectionLogOptions }}',
'{{ region }}',
'{{ ClientCidrBlock }}',
'{{ DnsServers }}',
'{{ TransportProtocol }}',
'{{ VpnPort }}',
'{{ Description }}',
'{{ SplitTunnel }}',
'{{ DryRun }}',
'{{ ClientToken }}',
'{{ TagSpecification }}',
'{{ SecurityGroupId }}',
'{{ VpcId }}',
'{{ SelfServicePortal }}',
'{{ ClientConnectOptions }}',
'{{ SessionTimeoutHours }}',
'{{ ClientLoginBannerOptions }}',
'{{ ClientRouteEnforcementOptions }}',
'{{ DisconnectOnSessionTimeout }}',
'{{ EndpointIpAddressType }}',
'{{ TrafficIpAddressType }}',
'{{ TransitGatewayConfiguration }}'
RETURNING
client_vpn_endpoint_id,
dns_name,
status
;

UPDATE examples

Adds an ingress authorization rule to a Client VPN endpoint. Ingress authorization rules act as firewall rules that grant access to networks. You must configure ingress authorization rules to enable clients to access resources in Amazon Web Services or on-premises networks.

UPDATE aws.ec2.client_vpn_endpoints
SET
-- No updatable properties
WHERE
ClientVpnEndpointId = '{{ ClientVpnEndpointId }}' --required
AND TargetNetworkCidr = '{{ TargetNetworkCidr }}' --required
AND region = '{{ region }}' --required
AND AccessGroupId = '{{ AccessGroupId}}'
AND AuthorizeAllGroups = {{ AuthorizeAllGroups}}
AND Description = '{{ Description}}'
AND ClientToken = '{{ ClientToken}}'
AND DryRun = {{ DryRun}}
RETURNING
code,
message;

DELETE examples

Deletes the specified Client VPN endpoint. You must disassociate all target networks before you can delete a Client VPN endpoint.

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

Lifecycle Methods

Applies a security group to the association between the target network and the Client VPN endpoint. This action replaces the existing security groups with the specified security groups.

EXEC aws.ec2.client_vpn_endpoints.apply_security_groups_to_client_vpn_target_network
@ClientVpnEndpointId='{{ ClientVpnEndpointId }}' --required,
@VpcId='{{ VpcId }}' --required,
@SecurityGroupId='{{ SecurityGroupId }}' --required,
@region='{{ region }}' --required,
@DryRun={{ DryRun }}
;