Class ClientVpnEndpointProps.Builder
java.lang.Object
software.amazon.awscdk.services.ec2.ClientVpnEndpointProps.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<ClientVpnEndpointProps>
- Enclosing interface:
ClientVpnEndpointProps
@Stability(Stable)
public static final class ClientVpnEndpointProps.Builder
extends Object
implements software.amazon.jsii.Builder<ClientVpnEndpointProps>
A builder for
ClientVpnEndpointProps
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionauthorizeAllUsersToVpcCidr
(Boolean authorizeAllUsersToVpcCidr) Sets the value ofClientVpnEndpointOptions.getAuthorizeAllUsersToVpcCidr()
build()
Builds the configured instance.Sets the value ofClientVpnEndpointOptions.getCidr()
clientCertificateArn
(String clientCertificateArn) Sets the value ofClientVpnEndpointOptions.getClientCertificateArn()
clientConnectionHandler
(IClientVpnConnectionHandler clientConnectionHandler) Sets the value ofClientVpnEndpointOptions.getClientConnectionHandler()
clientLoginBanner
(String clientLoginBanner) Sets the value ofClientVpnEndpointOptions.getClientLoginBanner()
description
(String description) Sets the value ofClientVpnEndpointOptions.getDescription()
dnsServers
(List<String> dnsServers) Sets the value ofClientVpnEndpointOptions.getDnsServers()
Sets the value ofClientVpnEndpointOptions.getLogging()
Sets the value ofClientVpnEndpointOptions.getLogGroup()
logStream
(ILogStream logStream) Sets the value ofClientVpnEndpointOptions.getLogStream()
Sets the value ofClientVpnEndpointOptions.getPort()
securityGroups
(List<? extends ISecurityGroup> securityGroups) Sets the value ofClientVpnEndpointOptions.getSecurityGroups()
selfServicePortal
(Boolean selfServicePortal) Sets the value ofClientVpnEndpointOptions.getSelfServicePortal()
serverCertificateArn
(String serverCertificateArn) Sets the value ofClientVpnEndpointOptions.getServerCertificateArn()
sessionTimeout
(ClientVpnSessionTimeout sessionTimeout) Sets the value ofClientVpnEndpointOptions.getSessionTimeout()
splitTunnel
(Boolean splitTunnel) Sets the value ofClientVpnEndpointOptions.getSplitTunnel()
transportProtocol
(TransportProtocol transportProtocol) Sets the value ofClientVpnEndpointOptions.getTransportProtocol()
userBasedAuthentication
(ClientVpnUserBasedAuthentication userBasedAuthentication) Sets the value ofClientVpnEndpointOptions.getUserBasedAuthentication()
Sets the value ofClientVpnEndpointProps.getVpc()
vpcSubnets
(SubnetSelection vpcSubnets) Sets the value ofClientVpnEndpointOptions.getVpcSubnets()
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
vpc
Sets the value ofClientVpnEndpointProps.getVpc()
- Parameters:
vpc
- The VPC to connect to. This parameter is required.- Returns:
this
-
cidr
Sets the value ofClientVpnEndpointOptions.getCidr()
- Parameters:
cidr
- The IPv4 address range, in CIDR notation, from which to assign client IP addresses. This parameter is required. 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.
- Returns:
this
-
serverCertificateArn
@Stability(Stable) public ClientVpnEndpointProps.Builder serverCertificateArn(String serverCertificateArn) Sets the value ofClientVpnEndpointOptions.getServerCertificateArn()
- Parameters:
serverCertificateArn
- The ARN of the server certificate. This parameter is required.- Returns:
this
-
authorizeAllUsersToVpcCidr
@Stability(Stable) public ClientVpnEndpointProps.Builder authorizeAllUsersToVpcCidr(Boolean authorizeAllUsersToVpcCidr) Sets the value ofClientVpnEndpointOptions.getAuthorizeAllUsersToVpcCidr()
- Parameters:
authorizeAllUsersToVpcCidr
- Whether to authorize all users to the VPC CIDR. This automatically creates an authorization rule. Set this tofalse
and useaddAuthorizationRule()
to create your own rules instead.- Returns:
this
-
clientCertificateArn
@Stability(Stable) public ClientVpnEndpointProps.Builder clientCertificateArn(String clientCertificateArn) Sets the value ofClientVpnEndpointOptions.getClientCertificateArn()
- Parameters:
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).- Returns:
this
-
clientConnectionHandler
@Stability(Stable) public ClientVpnEndpointProps.Builder clientConnectionHandler(IClientVpnConnectionHandler clientConnectionHandler) Sets the value ofClientVpnEndpointOptions.getClientConnectionHandler()
- Parameters:
clientConnectionHandler
- The AWS Lambda function used for connection authorization. The name of the Lambda function must begin with theAWSClientVPN-
prefix- Returns:
this
-
clientLoginBanner
@Stability(Stable) public ClientVpnEndpointProps.Builder clientLoginBanner(String clientLoginBanner) Sets the value ofClientVpnEndpointOptions.getClientLoginBanner()
- Parameters:
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.- Returns:
this
-
description
Sets the value ofClientVpnEndpointOptions.getDescription()
- Parameters:
description
- A brief description of the Client VPN endpoint.- Returns:
this
-
dnsServers
Sets the value ofClientVpnEndpointOptions.getDnsServers()
- Parameters:
dnsServers
- Information about the DNS servers to be used for DNS resolution. A Client VPN endpoint can have up to two DNS servers.- Returns:
this
-
logging
Sets the value ofClientVpnEndpointOptions.getLogging()
- Parameters:
logging
- Whether to enable connections logging.- Returns:
this
-
logGroup
Sets the value ofClientVpnEndpointOptions.getLogGroup()
- Parameters:
logGroup
- A CloudWatch Logs log group for connection logging.- Returns:
this
-
logStream
Sets the value ofClientVpnEndpointOptions.getLogStream()
- Parameters:
logStream
- A CloudWatch Logs log stream for connection logging.- Returns:
this
-
port
Sets the value ofClientVpnEndpointOptions.getPort()
- Parameters:
port
- The port number to assign to the Client VPN endpoint for TCP and UDP traffic.- Returns:
this
-
securityGroups
@Stability(Stable) public ClientVpnEndpointProps.Builder securityGroups(List<? extends ISecurityGroup> securityGroups) Sets the value ofClientVpnEndpointOptions.getSecurityGroups()
- Parameters:
securityGroups
- The security groups to apply to the target network.- Returns:
this
-
selfServicePortal
@Stability(Stable) public ClientVpnEndpointProps.Builder selfServicePortal(Boolean selfServicePortal) Sets the value ofClientVpnEndpointOptions.getSelfServicePortal()
- Parameters:
selfServicePortal
- Specify whether to enable the self-service portal for the Client VPN endpoint.- Returns:
this
-
sessionTimeout
@Stability(Stable) public ClientVpnEndpointProps.Builder sessionTimeout(ClientVpnSessionTimeout sessionTimeout) Sets the value ofClientVpnEndpointOptions.getSessionTimeout()
- Parameters:
sessionTimeout
- The maximum VPN session duration time.- Returns:
this
-
splitTunnel
Sets the value ofClientVpnEndpointOptions.getSplitTunnel()
- Parameters:
splitTunnel
- Indicates whether split-tunnel is enabled on the AWS Client VPN endpoint.- Returns:
this
-
transportProtocol
@Stability(Stable) public ClientVpnEndpointProps.Builder transportProtocol(TransportProtocol transportProtocol) Sets the value ofClientVpnEndpointOptions.getTransportProtocol()
- Parameters:
transportProtocol
- The transport protocol to be used by the VPN session.- Returns:
this
-
userBasedAuthentication
@Stability(Stable) public ClientVpnEndpointProps.Builder userBasedAuthentication(ClientVpnUserBasedAuthentication userBasedAuthentication) Sets the value ofClientVpnEndpointOptions.getUserBasedAuthentication()
- Parameters:
userBasedAuthentication
- The type of user-based authentication to use.- Returns:
this
-
vpcSubnets
Sets the value ofClientVpnEndpointOptions.getVpcSubnets()
- Parameters:
vpcSubnets
- Subnets to associate to the client VPN endpoint.- Returns:
this
-
build
Builds the configured instance.- Specified by:
build
in interfacesoftware.amazon.jsii.Builder<ClientVpnEndpointProps>
- Returns:
- a new instance of
ClientVpnEndpointProps
- Throws:
NullPointerException
- if any required attribute was not provided
-