/*
* Copyright 2018-2023 Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with
* the License. A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
* CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions
* and limitations under the License.
*/
package com.amazonaws.services.ec2.model;
import java.io.Serializable;
import javax.annotation.Generated;
import com.amazonaws.AmazonWebServiceRequest;
import com.amazonaws.Request;
import com.amazonaws.services.ec2.model.transform.CreateClientVpnEndpointRequestMarshaller;
/**
*
*/
@Generated("com.amazonaws:aws-java-sdk-code-generator")
public class CreateClientVpnEndpointRequest extends AmazonWebServiceRequest implements Serializable, Cloneable,
DryRunSupportedRequest
* 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. 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.
*
* The ARN of the server certificate. For more information, see the Certificate Manager User Guide.
*
* Information about the authentication method to be used to authenticate clients.
*
* Information 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
*
* Information about the DNS servers to be used for DNS resolution. A Client VPN endpoint can have up to two DNS
* servers. If no DNS server is specified, the DNS address configured on the device is used for the DNS server.
*
* The transport protocol to be used by the VPN session.
*
* Default value:
* The port number to assign to the Client VPN endpoint for TCP and UDP traffic.
*
* Valid Values:
* Default Value:
* A brief description of the Client VPN endpoint.
*
* Indicates whether split-tunnel is enabled on the Client VPN endpoint.
*
* By default, split-tunnel on a VPN endpoint is disabled.
*
* For information about split-tunnel VPN endpoints, see Split-tunnel Client VPN
* endpoint in the Client VPN Administrator Guide.
*
* Unique, case-sensitive identifier that you provide to ensure the idempotency of the request. For more
* information, see How to ensure
* idempotency.
*
* The tags to apply to the Client VPN endpoint during creation.
*
* The IDs of one or more security groups to apply to the target network. You must also specify the ID of the VPC
* that contains the security groups.
*
* The ID of the VPC to associate with the Client VPN endpoint. If no security group IDs are specified in the
* request, the default security group for the VPC is applied.
*
* Specify whether to enable the self-service portal for the Client VPN endpoint.
*
* Default Value:
* The options for managing connection authorization for new client connections.
*
* The maximum VPN session duration time in hours.
*
* Valid values:
* Default value:
* Options for enabling a customizable text banner that will be displayed on Amazon Web Services provided clients
* when a VPN session is established.
*
* 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. 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.
*
* 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. 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.
*
* 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. 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.
*
* The ARN of the server certificate. For more information, see the Certificate Manager User Guide.
*
* The ARN of the server certificate. For more information, see the Certificate Manager User Guide.
*
* The ARN of the server certificate. For more information, see the Certificate Manager User Guide.
*
* Information about the authentication method to be used to authenticate clients.
*
* Information about the authentication method to be used to authenticate clients.
*
* Information about the authentication method to be used to authenticate clients.
*
* NOTE: This method appends the values to the existing list (if any). Use
* {@link #setAuthenticationOptions(java.util.Collection)} or
* {@link #withAuthenticationOptions(java.util.Collection)} if you want to override the existing values.
*
* Information about the authentication method to be used to authenticate clients.
*
* Information 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
*
*
*/
private ConnectionLogOptions connectionLogOptions;
/**
* udp
* 443
| 1194
* 443
* enabled
* 8 | 10 | 12 | 24
* 24
*
*
*
* @param connectionLogOptions
* Information 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 *
** Information 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 *
** 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 *
** Information 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 *
** 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 *
** Information about the DNS servers to be used for DNS resolution. A Client VPN endpoint can have up to two DNS * servers. If no DNS server is specified, the DNS address configured on the device is used for the DNS server. *
* * @return Information about the DNS servers to be used for DNS resolution. A Client VPN endpoint can have up to two * DNS servers. If no DNS server is specified, the DNS address configured on the device is used for the DNS * server. */ public java.util.List* Information about the DNS servers to be used for DNS resolution. A Client VPN endpoint can have up to two DNS * servers. If no DNS server is specified, the DNS address configured on the device is used for the DNS server. *
* * @param dnsServers * Information about the DNS servers to be used for DNS resolution. A Client VPN endpoint can have up to two * DNS servers. If no DNS server is specified, the DNS address configured on the device is used for the DNS * server. */ public void setDnsServers(java.util.Collection* Information about the DNS servers to be used for DNS resolution. A Client VPN endpoint can have up to two DNS * servers. If no DNS server is specified, the DNS address configured on the device is used for the DNS server. *
** NOTE: This method appends the values to the existing list (if any). Use * {@link #setDnsServers(java.util.Collection)} or {@link #withDnsServers(java.util.Collection)} if you want to * override the existing values. *
* * @param dnsServers * Information about the DNS servers to be used for DNS resolution. A Client VPN endpoint can have up to two * DNS servers. If no DNS server is specified, the DNS address configured on the device is used for the DNS * server. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateClientVpnEndpointRequest withDnsServers(String... dnsServers) { if (this.dnsServers == null) { setDnsServers(new com.amazonaws.internal.SdkInternalList* Information about the DNS servers to be used for DNS resolution. A Client VPN endpoint can have up to two DNS * servers. If no DNS server is specified, the DNS address configured on the device is used for the DNS server. *
* * @param dnsServers * Information about the DNS servers to be used for DNS resolution. A Client VPN endpoint can have up to two * DNS servers. If no DNS server is specified, the DNS address configured on the device is used for the DNS * server. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateClientVpnEndpointRequest withDnsServers(java.util.Collection* The transport protocol to be used by the VPN session. *
*
* Default value: udp
*
* Default value: udp
* @see TransportProtocol
*/
public void setTransportProtocol(String transportProtocol) {
this.transportProtocol = transportProtocol;
}
/**
*
* The transport protocol to be used by the VPN session. *
*
* Default value: udp
*
* Default value: udp
* @see TransportProtocol
*/
public String getTransportProtocol() {
return this.transportProtocol;
}
/**
*
* The transport protocol to be used by the VPN session. *
*
* Default value: udp
*
* Default value: udp
* @return Returns a reference to this object so that method calls can be chained together.
* @see TransportProtocol
*/
public CreateClientVpnEndpointRequest withTransportProtocol(String transportProtocol) {
setTransportProtocol(transportProtocol);
return this;
}
/**
*
* The transport protocol to be used by the VPN session. *
*
* Default value: udp
*
* Default value: udp
* @return Returns a reference to this object so that method calls can be chained together.
* @see TransportProtocol
*/
public CreateClientVpnEndpointRequest withTransportProtocol(TransportProtocol transportProtocol) {
this.transportProtocol = transportProtocol.toString();
return this;
}
/**
*
* The port number to assign to the Client VPN endpoint for TCP and UDP traffic. *
*
* Valid Values: 443
| 1194
*
* Default Value: 443
*
* Valid Values: 443
| 1194
*
* Default Value: 443
*/
public void setVpnPort(Integer vpnPort) {
this.vpnPort = vpnPort;
}
/**
*
* The port number to assign to the Client VPN endpoint for TCP and UDP traffic. *
*
* Valid Values: 443
| 1194
*
* Default Value: 443
*
* Valid Values: 443
| 1194
*
* Default Value: 443
*/
public Integer getVpnPort() {
return this.vpnPort;
}
/**
*
* The port number to assign to the Client VPN endpoint for TCP and UDP traffic. *
*
* Valid Values: 443
| 1194
*
* Default Value: 443
*
* Valid Values: 443
| 1194
*
* Default Value: 443
* @return Returns a reference to this object so that method calls can be chained together.
*/
public CreateClientVpnEndpointRequest withVpnPort(Integer vpnPort) {
setVpnPort(vpnPort);
return this;
}
/**
*
* A brief description of the Client VPN endpoint. *
* * @param description * A brief description of the Client VPN endpoint. */ public void setDescription(String description) { this.description = description; } /** ** A brief description of the Client VPN endpoint. *
* * @return A brief description of the Client VPN endpoint. */ public String getDescription() { return this.description; } /** ** A brief description of the Client VPN endpoint. *
* * @param description * A brief description of the Client VPN endpoint. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateClientVpnEndpointRequest withDescription(String description) { setDescription(description); return this; } /** ** Indicates whether split-tunnel is enabled on the Client VPN endpoint. *
** By default, split-tunnel on a VPN endpoint is disabled. *
** For information about split-tunnel VPN endpoints, see Split-tunnel Client VPN * endpoint in the Client VPN Administrator Guide. *
* * @param splitTunnel * Indicates whether split-tunnel is enabled on the Client VPN endpoint. ** By default, split-tunnel on a VPN endpoint is disabled. *
** For information about split-tunnel VPN endpoints, see Split-tunnel Client * VPN endpoint in the Client VPN Administrator Guide. */ public void setSplitTunnel(Boolean splitTunnel) { this.splitTunnel = splitTunnel; } /** *
* Indicates whether split-tunnel is enabled on the Client VPN endpoint. *
** By default, split-tunnel on a VPN endpoint is disabled. *
** For information about split-tunnel VPN endpoints, see Split-tunnel Client VPN * endpoint in the Client VPN Administrator Guide. *
* * @return Indicates whether split-tunnel is enabled on the Client VPN endpoint. ** By default, split-tunnel on a VPN endpoint is disabled. *
** For information about split-tunnel VPN endpoints, see Split-tunnel Client * VPN endpoint in the Client VPN Administrator Guide. */ public Boolean getSplitTunnel() { return this.splitTunnel; } /** *
* Indicates whether split-tunnel is enabled on the Client VPN endpoint. *
** By default, split-tunnel on a VPN endpoint is disabled. *
** For information about split-tunnel VPN endpoints, see Split-tunnel Client VPN * endpoint in the Client VPN Administrator Guide. *
* * @param splitTunnel * Indicates whether split-tunnel is enabled on the Client VPN endpoint. ** By default, split-tunnel on a VPN endpoint is disabled. *
** For information about split-tunnel VPN endpoints, see Split-tunnel Client * VPN endpoint in the Client VPN Administrator Guide. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateClientVpnEndpointRequest withSplitTunnel(Boolean splitTunnel) { setSplitTunnel(splitTunnel); return this; } /** *
* Indicates whether split-tunnel is enabled on the Client VPN endpoint. *
** By default, split-tunnel on a VPN endpoint is disabled. *
** For information about split-tunnel VPN endpoints, see Split-tunnel Client VPN * endpoint in the Client VPN Administrator Guide. *
* * @return Indicates whether split-tunnel is enabled on the Client VPN endpoint. ** By default, split-tunnel on a VPN endpoint is disabled. *
** For information about split-tunnel VPN endpoints, see Split-tunnel Client * VPN endpoint in the Client VPN Administrator Guide. */ public Boolean isSplitTunnel() { return this.splitTunnel; } /** *
* Unique, case-sensitive identifier that you provide to ensure the idempotency of the request. For more * information, see How to ensure * idempotency. *
* * @param clientToken * Unique, case-sensitive identifier that you provide to ensure the idempotency of the request. For more * information, see How to ensure * idempotency. */ public void setClientToken(String clientToken) { this.clientToken = clientToken; } /** ** Unique, case-sensitive identifier that you provide to ensure the idempotency of the request. For more * information, see How to ensure * idempotency. *
* * @return Unique, case-sensitive identifier that you provide to ensure the idempotency of the request. For more * information, see How to ensure * idempotency. */ public String getClientToken() { return this.clientToken; } /** ** Unique, case-sensitive identifier that you provide to ensure the idempotency of the request. For more * information, see How to ensure * idempotency. *
* * @param clientToken * Unique, case-sensitive identifier that you provide to ensure the idempotency of the request. For more * information, see How to ensure * idempotency. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateClientVpnEndpointRequest withClientToken(String clientToken) { setClientToken(clientToken); return this; } /** ** The tags to apply to the Client VPN endpoint during creation. *
* * @return The tags to apply to the Client VPN endpoint during creation. */ public java.util.List* The tags to apply to the Client VPN endpoint during creation. *
* * @param tagSpecifications * The tags to apply to the Client VPN endpoint during creation. */ public void setTagSpecifications(java.util.Collection* The tags to apply to the Client VPN endpoint during creation. *
** NOTE: This method appends the values to the existing list (if any). Use * {@link #setTagSpecifications(java.util.Collection)} or {@link #withTagSpecifications(java.util.Collection)} if * you want to override the existing values. *
* * @param tagSpecifications * The tags to apply to the Client VPN endpoint during creation. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateClientVpnEndpointRequest withTagSpecifications(TagSpecification... tagSpecifications) { if (this.tagSpecifications == null) { setTagSpecifications(new com.amazonaws.internal.SdkInternalList* The tags to apply to the Client VPN endpoint during creation. *
* * @param tagSpecifications * The tags to apply to the Client VPN endpoint during creation. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateClientVpnEndpointRequest withTagSpecifications(java.util.Collection* The IDs of one or more security groups to apply to the target network. You must also specify the ID of the VPC * that contains the security groups. *
* * @return The IDs of one or more security groups to apply to the target network. You must also specify the ID of * the VPC that contains the security groups. */ public java.util.List* The IDs of one or more security groups to apply to the target network. You must also specify the ID of the VPC * that contains the security groups. *
* * @param securityGroupIds * The IDs of one or more security groups to apply to the target network. You must also specify the ID of the * VPC that contains the security groups. */ public void setSecurityGroupIds(java.util.Collection* The IDs of one or more security groups to apply to the target network. You must also specify the ID of the VPC * that contains the security groups. *
** NOTE: This method appends the values to the existing list (if any). Use * {@link #setSecurityGroupIds(java.util.Collection)} or {@link #withSecurityGroupIds(java.util.Collection)} if you * want to override the existing values. *
* * @param securityGroupIds * The IDs of one or more security groups to apply to the target network. You must also specify the ID of the * VPC that contains the security groups. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateClientVpnEndpointRequest withSecurityGroupIds(String... securityGroupIds) { if (this.securityGroupIds == null) { setSecurityGroupIds(new com.amazonaws.internal.SdkInternalList* The IDs of one or more security groups to apply to the target network. You must also specify the ID of the VPC * that contains the security groups. *
* * @param securityGroupIds * The IDs of one or more security groups to apply to the target network. You must also specify the ID of the * VPC that contains the security groups. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateClientVpnEndpointRequest withSecurityGroupIds(java.util.Collection* The ID of the VPC to associate with the Client VPN endpoint. If no security group IDs are specified in the * request, the default security group for the VPC is applied. *
* * @param vpcId * The ID of the VPC to associate with the Client VPN endpoint. If no security group IDs are specified in the * request, the default security group for the VPC is applied. */ public void setVpcId(String vpcId) { this.vpcId = vpcId; } /** ** The ID of the VPC to associate with the Client VPN endpoint. If no security group IDs are specified in the * request, the default security group for the VPC is applied. *
* * @return The ID of the VPC to associate with the Client VPN endpoint. If no security group IDs are specified in * the request, the default security group for the VPC is applied. */ public String getVpcId() { return this.vpcId; } /** ** The ID of the VPC to associate with the Client VPN endpoint. If no security group IDs are specified in the * request, the default security group for the VPC is applied. *
* * @param vpcId * The ID of the VPC to associate with the Client VPN endpoint. If no security group IDs are specified in the * request, the default security group for the VPC is applied. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateClientVpnEndpointRequest withVpcId(String vpcId) { setVpcId(vpcId); return this; } /** ** Specify whether to enable the self-service portal for the Client VPN endpoint. *
*
* Default Value: enabled
*
* Default Value: enabled
* @see SelfServicePortal
*/
public void setSelfServicePortal(String selfServicePortal) {
this.selfServicePortal = selfServicePortal;
}
/**
*
* Specify whether to enable the self-service portal for the Client VPN endpoint. *
*
* Default Value: enabled
*
* Default Value: enabled
* @see SelfServicePortal
*/
public String getSelfServicePortal() {
return this.selfServicePortal;
}
/**
*
* Specify whether to enable the self-service portal for the Client VPN endpoint. *
*
* Default Value: enabled
*
* Default Value: enabled
* @return Returns a reference to this object so that method calls can be chained together.
* @see SelfServicePortal
*/
public CreateClientVpnEndpointRequest withSelfServicePortal(String selfServicePortal) {
setSelfServicePortal(selfServicePortal);
return this;
}
/**
*
* Specify whether to enable the self-service portal for the Client VPN endpoint. *
*
* Default Value: enabled
*
* Default Value: enabled
* @return Returns a reference to this object so that method calls can be chained together.
* @see SelfServicePortal
*/
public CreateClientVpnEndpointRequest withSelfServicePortal(SelfServicePortal selfServicePortal) {
this.selfServicePortal = selfServicePortal.toString();
return this;
}
/**
*
* The options for managing connection authorization for new client connections. *
* * @param clientConnectOptions * The options for managing connection authorization for new client connections. */ public void setClientConnectOptions(ClientConnectOptions clientConnectOptions) { this.clientConnectOptions = clientConnectOptions; } /** ** The options for managing connection authorization for new client connections. *
* * @return The options for managing connection authorization for new client connections. */ public ClientConnectOptions getClientConnectOptions() { return this.clientConnectOptions; } /** ** The options for managing connection authorization for new client connections. *
* * @param clientConnectOptions * The options for managing connection authorization for new client connections. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateClientVpnEndpointRequest withClientConnectOptions(ClientConnectOptions clientConnectOptions) { setClientConnectOptions(clientConnectOptions); return this; } /** ** The maximum VPN session duration time in hours. *
*
* Valid values: 8 | 10 | 12 | 24
*
* Default value: 24
*
* Valid values: 8 | 10 | 12 | 24
*
* Default value: 24
*/
public void setSessionTimeoutHours(Integer sessionTimeoutHours) {
this.sessionTimeoutHours = sessionTimeoutHours;
}
/**
*
* The maximum VPN session duration time in hours. *
*
* Valid values: 8 | 10 | 12 | 24
*
* Default value: 24
*
* Valid values: 8 | 10 | 12 | 24
*
* Default value: 24
*/
public Integer getSessionTimeoutHours() {
return this.sessionTimeoutHours;
}
/**
*
* The maximum VPN session duration time in hours. *
*
* Valid values: 8 | 10 | 12 | 24
*
* Default value: 24
*
* Valid values: 8 | 10 | 12 | 24
*
* Default value: 24
* @return Returns a reference to this object so that method calls can be chained together.
*/
public CreateClientVpnEndpointRequest withSessionTimeoutHours(Integer sessionTimeoutHours) {
setSessionTimeoutHours(sessionTimeoutHours);
return this;
}
/**
*
* Options for enabling a customizable text banner that will be displayed on Amazon Web Services provided clients * when a VPN session is established. *
* * @param clientLoginBannerOptions * Options for enabling a customizable text banner that will be displayed on Amazon Web Services provided * clients when a VPN session is established. */ public void setClientLoginBannerOptions(ClientLoginBannerOptions clientLoginBannerOptions) { this.clientLoginBannerOptions = clientLoginBannerOptions; } /** ** Options for enabling a customizable text banner that will be displayed on Amazon Web Services provided clients * when a VPN session is established. *
* * @return Options for enabling a customizable text banner that will be displayed on Amazon Web Services provided * clients when a VPN session is established. */ public ClientLoginBannerOptions getClientLoginBannerOptions() { return this.clientLoginBannerOptions; } /** ** Options for enabling a customizable text banner that will be displayed on Amazon Web Services provided clients * when a VPN session is established. *
* * @param clientLoginBannerOptions * Options for enabling a customizable text banner that will be displayed on Amazon Web Services provided * clients when a VPN session is established. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateClientVpnEndpointRequest withClientLoginBannerOptions(ClientLoginBannerOptions clientLoginBannerOptions) { setClientLoginBannerOptions(clientLoginBannerOptions); return this; } /** * This method is intended for internal use only. Returns the marshaled request configured with additional * parameters to enable operation dry-run. */ @Override public Request