Class ClientVpnEndpoint.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<ClientVpnEndpoint>
- Enclosing class:
ClientVpnEndpoint
ClientVpnEndpoint
.-
Method Summary
Modifier and TypeMethodDescriptionauthorizeAllUsersToVpcCidr
(Boolean authorizeAllUsersToVpcCidr) Whether to authorize all users to the VPC CIDR.build()
The IPv4 address range, in CIDR notation, from which to assign client IP addresses.clientCertificateArn
(String clientCertificateArn) The ARN of the client certificate for mutual authentication.clientConnectionHandler
(IClientVpnConnectionHandler clientConnectionHandler) The AWS Lambda function used for connection authorization.clientLoginBanner
(String clientLoginBanner) Customizable text that will be displayed in a banner on AWS provided clients when a VPN session is established.static ClientVpnEndpoint.Builder
description
(String description) A brief description of the Client VPN endpoint.dnsServers
(List<String> dnsServers) Information about the DNS servers to be used for DNS resolution.Whether to enable connections logging.A CloudWatch Logs log group for connection logging.logStream
(ILogStream logStream) A CloudWatch Logs log stream for connection logging.The port number to assign to the Client VPN endpoint for TCP and UDP traffic.securityGroups
(List<? extends ISecurityGroup> securityGroups) The security groups to apply to the target network.selfServicePortal
(Boolean selfServicePortal) Specify whether to enable the self-service portal for the Client VPN endpoint.serverCertificateArn
(String serverCertificateArn) The ARN of the server certificate.sessionTimeout
(ClientVpnSessionTimeout sessionTimeout) The maximum VPN session duration time.splitTunnel
(Boolean splitTunnel) Indicates whether split-tunnel is enabled on the AWS Client VPN endpoint.transportProtocol
(TransportProtocol transportProtocol) The transport protocol to be used by the VPN session.userBasedAuthentication
(ClientVpnUserBasedAuthentication userBasedAuthentication) The type of user-based authentication to use.The VPC to connect to.vpcSubnets
(SubnetSelection vpcSubnets) Subnets to associate to the client VPN endpoint.
-
Method Details
-
create
@Stability(Stable) public static ClientVpnEndpoint.Builder create(software.constructs.Construct scope, String id) - Parameters:
scope
- This parameter is required.id
- This parameter is required.- Returns:
- a new instance of
ClientVpnEndpoint.Builder
.
-
cidr
The 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.
Changing the address range will replace the Client VPN endpoint.
The CIDR block should be /22 or greater.
- Parameters:
cidr
- The IPv4 address range, in CIDR notation, from which to assign client IP addresses. This parameter is required.- Returns:
this
-
serverCertificateArn
@Stability(Stable) public ClientVpnEndpoint.Builder serverCertificateArn(String serverCertificateArn) The ARN of the server certificate.- Parameters:
serverCertificateArn
- The ARN of the server certificate. This parameter is required.- Returns:
this
-
authorizeAllUsersToVpcCidr
@Stability(Stable) public ClientVpnEndpoint.Builder authorizeAllUsersToVpcCidr(Boolean authorizeAllUsersToVpcCidr) Whether to authorize all users to the VPC CIDR.This automatically creates an authorization rule. Set this to
false
and useaddAuthorizationRule()
to create your own rules instead.Default: true
- Parameters:
authorizeAllUsersToVpcCidr
- Whether to authorize all users to the VPC CIDR. This parameter is required.- Returns:
this
-
clientCertificateArn
@Stability(Stable) public ClientVpnEndpoint.Builder clientCertificateArn(String clientCertificateArn) The ARN of the client certificate for mutual authentication.The certificate must be signed by a certificate authority (CA) and it must be provisioned in AWS Certificate Manager (ACM).
Default: - use user-based authentication
- Parameters:
clientCertificateArn
- The ARN of the client certificate for mutual authentication. This parameter is required.- Returns:
this
-
clientConnectionHandler
@Stability(Stable) public ClientVpnEndpoint.Builder clientConnectionHandler(IClientVpnConnectionHandler clientConnectionHandler) The AWS Lambda function used for connection authorization.The name of the Lambda function must begin with the
AWSClientVPN-
prefixDefault: - no connection handler
- Parameters:
clientConnectionHandler
- The AWS Lambda function used for connection authorization. This parameter is required.- Returns:
this
-
clientLoginBanner
Customizable text that will be displayed in a banner on AWS provided clients when a VPN session is established.UTF-8 encoded characters only. Maximum of 1400 characters.
Default: - no banner is presented to the client
- Parameters:
clientLoginBanner
- Customizable text that will be displayed in a banner on AWS provided clients when a VPN session is established. This parameter is required.- Returns:
this
-
description
A brief description of the Client VPN endpoint.Default: - no description
- Parameters:
description
- A brief description of the Client VPN endpoint. This parameter is required.- Returns:
this
-
dnsServers
Information about the DNS servers to be used for DNS resolution.A Client VPN endpoint can have up to two DNS servers.
Default: - use the DNS address configured on the device
- Parameters:
dnsServers
- Information about the DNS servers to be used for DNS resolution. This parameter is required.- Returns:
this
-
logging
Whether to enable connections logging.Default: true
- Parameters:
logging
- Whether to enable connections logging. This parameter is required.- Returns:
this
-
logGroup
A CloudWatch Logs log group for connection logging.Default: - a new group is created
- Parameters:
logGroup
- A CloudWatch Logs log group for connection logging. This parameter is required.- Returns:
this
-
logStream
A CloudWatch Logs log stream for connection logging.Default: - a new stream is created
- Parameters:
logStream
- A CloudWatch Logs log stream for connection logging. This parameter is required.- Returns:
this
-
port
The port number to assign to the Client VPN endpoint for TCP and UDP traffic.Default: VpnPort.HTTPS
- Parameters:
port
- The port number to assign to the Client VPN endpoint for TCP and UDP traffic. This parameter is required.- Returns:
this
-
securityGroups
@Stability(Stable) public ClientVpnEndpoint.Builder securityGroups(List<? extends ISecurityGroup> securityGroups) The security groups to apply to the target network.Default: - a new security group is created
- Parameters:
securityGroups
- The security groups to apply to the target network. This parameter is required.- Returns:
this
-
selfServicePortal
Specify whether to enable the self-service portal for the Client VPN endpoint.Default: true
- Parameters:
selfServicePortal
- Specify whether to enable the self-service portal for the Client VPN endpoint. This parameter is required.- Returns:
this
-
sessionTimeout
@Stability(Stable) public ClientVpnEndpoint.Builder sessionTimeout(ClientVpnSessionTimeout sessionTimeout) The maximum VPN session duration time.Default: ClientVpnSessionTimeout.TWENTY_FOUR_HOURS
- Parameters:
sessionTimeout
- The maximum VPN session duration time. This parameter is required.- Returns:
this
-
splitTunnel
Indicates whether split-tunnel is enabled on the AWS Client VPN endpoint.Default: false
- Parameters:
splitTunnel
- Indicates whether split-tunnel is enabled on the AWS Client VPN endpoint. This parameter is required.- Returns:
this
- See Also:
-
transportProtocol
@Stability(Stable) public ClientVpnEndpoint.Builder transportProtocol(TransportProtocol transportProtocol) The transport protocol to be used by the VPN session.Default: TransportProtocol.UDP
- Parameters:
transportProtocol
- The transport protocol to be used by the VPN session. This parameter is required.- Returns:
this
-
userBasedAuthentication
@Stability(Stable) public ClientVpnEndpoint.Builder userBasedAuthentication(ClientVpnUserBasedAuthentication userBasedAuthentication) The type of user-based authentication to use.Default: - use mutual authentication
- Parameters:
userBasedAuthentication
- The type of user-based authentication to use. This parameter is required.- Returns:
this
- See Also:
-
vpcSubnets
Subnets to associate to the client VPN endpoint.Default: - the VPC default strategy
- Parameters:
vpcSubnets
- Subnets to associate to the client VPN endpoint. This parameter is required.- Returns:
this
-
vpc
The VPC to connect to.- Parameters:
vpc
- The VPC to connect to. This parameter is required.- Returns:
this
-
build
- Specified by:
build
in interfacesoftware.amazon.jsii.Builder<ClientVpnEndpoint>
- Returns:
- a newly built instance of
ClientVpnEndpoint
.
-