com.amazonaws.services.ec2.model.CreateClientVpnEndpointRequest Maven / Gradle / Ivy
Show all versions of aws-java-sdk-ec2 Show documentation
/*
* Copyright 2019-2024 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.
*
*/
private String clientCidrBlock;
/**
*
* The ARN of the server certificate. For more information, see the Certificate Manager User Guide.
*
*/
private String serverCertificateArn;
/**
*
* Information about the authentication method to be used to authenticate clients.
*
*/
private com.amazonaws.internal.SdkInternalList authenticationOptions;
/**
*
* 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;
/**
*
* 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.
*
*/
private com.amazonaws.internal.SdkInternalList dnsServers;
/**
*
* The transport protocol to be used by the VPN session.
*
*
* Default value: udp
*
*/
private String transportProtocol;
/**
*
* The port number to assign to the Client VPN endpoint for TCP and UDP traffic.
*
*
* Valid Values: 443
| 1194
*
*
* Default Value: 443
*
*/
private Integer vpnPort;
/**
*
* A brief description of the Client VPN endpoint.
*
*/
private String description;
/**
*
* 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.
*
*/
private Boolean splitTunnel;
/**
*
* Unique, case-sensitive identifier that you provide to ensure the idempotency of the request. For more
* information, see Ensuring
* idempotency.
*
*/
private String clientToken;
/**
*
* The tags to apply to the Client VPN endpoint during creation.
*
*/
private com.amazonaws.internal.SdkInternalList tagSpecifications;
/**
*
* 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.
*
*/
private com.amazonaws.internal.SdkInternalList securityGroupIds;
/**
*
* 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.
*
*/
private String vpcId;
/**
*
* Specify whether to enable the self-service portal for the Client VPN endpoint.
*
*
* Default Value: enabled
*
*/
private String selfServicePortal;
/**
*
* The options for managing connection authorization for new client connections.
*
*/
private ClientConnectOptions clientConnectOptions;
/**
*
* The maximum VPN session duration time in hours.
*
*
* Valid values: 8 | 10 | 12 | 24
*
*
* Default value: 24
*
*/
private Integer sessionTimeoutHours;
/**
*
* Options for enabling a customizable text banner that will be displayed on Amazon Web Services provided clients
* when a VPN session is established.
*
*/
private ClientLoginBannerOptions clientLoginBannerOptions;
/**
*
* 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.
*
*
* @param clientCidrBlock
* 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.
*/
public void setClientCidrBlock(String clientCidrBlock) {
this.clientCidrBlock = clientCidrBlock;
}
/**
*
* 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.
*
*
* @return 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.
*/
public String getClientCidrBlock() {
return this.clientCidrBlock;
}
/**
*
* 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.
*
*
* @param clientCidrBlock
* 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.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public CreateClientVpnEndpointRequest withClientCidrBlock(String clientCidrBlock) {
setClientCidrBlock(clientCidrBlock);
return this;
}
/**
*
* The ARN of the server certificate. For more information, see the Certificate Manager User Guide.
*
*
* @param serverCertificateArn
* The ARN of the server certificate. For more information, see the Certificate Manager User Guide.
*/
public void setServerCertificateArn(String serverCertificateArn) {
this.serverCertificateArn = serverCertificateArn;
}
/**
*
* The ARN of the server certificate. For more information, see the Certificate Manager User Guide.
*
*
* @return The ARN of the server certificate. For more information, see the Certificate Manager User Guide.
*/
public String getServerCertificateArn() {
return this.serverCertificateArn;
}
/**
*
* The ARN of the server certificate. For more information, see the Certificate Manager User Guide.
*
*
* @param serverCertificateArn
* The ARN of the server certificate. For more information, see the Certificate Manager User Guide.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public CreateClientVpnEndpointRequest withServerCertificateArn(String serverCertificateArn) {
setServerCertificateArn(serverCertificateArn);
return this;
}
/**
*
* Information about the authentication method to be used to authenticate clients.
*
*
* @return Information about the authentication method to be used to authenticate clients.
*/
public java.util.List getAuthenticationOptions() {
if (authenticationOptions == null) {
authenticationOptions = new com.amazonaws.internal.SdkInternalList();
}
return authenticationOptions;
}
/**
*
* Information about the authentication method to be used to authenticate clients.
*
*
* @param authenticationOptions
* Information about the authentication method to be used to authenticate clients.
*/
public void setAuthenticationOptions(java.util.Collection authenticationOptions) {
if (authenticationOptions == null) {
this.authenticationOptions = null;
return;
}
this.authenticationOptions = new com.amazonaws.internal.SdkInternalList(authenticationOptions);
}
/**
*
* 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.
*
*
* @param authenticationOptions
* Information about the authentication method to be used to authenticate clients.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public CreateClientVpnEndpointRequest withAuthenticationOptions(ClientVpnAuthenticationRequest... authenticationOptions) {
if (this.authenticationOptions == null) {
setAuthenticationOptions(new com.amazonaws.internal.SdkInternalList(authenticationOptions.length));
}
for (ClientVpnAuthenticationRequest ele : authenticationOptions) {
this.authenticationOptions.add(ele);
}
return this;
}
/**
*
* Information about the authentication method to be used to authenticate clients.
*
*
* @param authenticationOptions
* Information about the authentication method to be used to authenticate clients.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public CreateClientVpnEndpointRequest withAuthenticationOptions(java.util.Collection authenticationOptions) {
setAuthenticationOptions(authenticationOptions);
return this;
}
/**
*
* 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
*
*
*
*
* @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
*
*
*/
public void setConnectionLogOptions(ConnectionLogOptions connectionLogOptions) {
this.connectionLogOptions = 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
*
*
*
*
* @return 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
*
*
*/
public ConnectionLogOptions getConnectionLogOptions() {
return this.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
*
*
*
*
* @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
*
*
* @return Returns a reference to this object so that method calls can be chained together.
*/
public CreateClientVpnEndpointRequest withConnectionLogOptions(ConnectionLogOptions connectionLogOptions) {
setConnectionLogOptions(connectionLogOptions);
return this;
}
/**
*
* 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 getDnsServers() {
if (dnsServers == null) {
dnsServers = new com.amazonaws.internal.SdkInternalList();
}
return 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.
*
*
* @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 dnsServers) {
if (dnsServers == null) {
this.dnsServers = null;
return;
}
this.dnsServers = new com.amazonaws.internal.SdkInternalList(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.
*
*
* 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(dnsServers.length));
}
for (String ele : dnsServers) {
this.dnsServers.add(ele);
}
return this;
}
/**
*
* 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 dnsServers) {
setDnsServers(dnsServers);
return this;
}
/**
*
* The transport protocol to be used by the VPN session.
*
*
* Default value: udp
*
*
* @param transportProtocol
* The transport protocol to be used by the VPN session.
*
* 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
*
*
* @return The transport protocol to be used by the VPN session.
*
* Default value: udp
* @see TransportProtocol
*/
public String getTransportProtocol() {
return this.transportProtocol;
}
/**
*
* The transport protocol to be used by the VPN session.
*
*
* Default value: udp
*
*
* @param transportProtocol
* The transport protocol to be used by the VPN session.
*
* 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
*
*
* @param transportProtocol
* The transport protocol to be used by the VPN session.
*
* 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
*
*
* @param vpnPort
* The port number to assign to the Client VPN endpoint for TCP and UDP traffic.
*
* 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
*
*
* @return The port number to assign to the Client VPN endpoint for TCP and UDP traffic.
*
* 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
*
*
* @param vpnPort
* The port number to assign to the Client VPN endpoint for TCP and UDP traffic.
*
* 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 Ensuring
* idempotency.
*
*
* @param clientToken
* Unique, case-sensitive identifier that you provide to ensure the idempotency of the request. For more
* information, see Ensuring 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 Ensuring
* idempotency.
*
*
* @return Unique, case-sensitive identifier that you provide to ensure the idempotency of the request. For more
* information, see Ensuring 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 Ensuring
* idempotency.
*
*
* @param clientToken
* Unique, case-sensitive identifier that you provide to ensure the idempotency of the request. For more
* information, see Ensuring 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 getTagSpecifications() {
if (tagSpecifications == null) {
tagSpecifications = new com.amazonaws.internal.SdkInternalList();
}
return tagSpecifications;
}
/**
*
* 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 tagSpecifications) {
if (tagSpecifications == null) {
this.tagSpecifications = null;
return;
}
this.tagSpecifications = new com.amazonaws.internal.SdkInternalList(tagSpecifications);
}
/**
*
* 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(tagSpecifications.length));
}
for (TagSpecification ele : tagSpecifications) {
this.tagSpecifications.add(ele);
}
return this;
}
/**
*
* 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 tagSpecifications) {
setTagSpecifications(tagSpecifications);
return this;
}
/**
*
* 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 getSecurityGroupIds() {
if (securityGroupIds == null) {
securityGroupIds = new com.amazonaws.internal.SdkInternalList();
}
return 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.
*
*
* @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 securityGroupIds) {
if (securityGroupIds == null) {
this.securityGroupIds = null;
return;
}
this.securityGroupIds = new com.amazonaws.internal.SdkInternalList(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.
*
*
* 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(securityGroupIds.length));
}
for (String ele : securityGroupIds) {
this.securityGroupIds.add(ele);
}
return this;
}
/**
*
* 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 securityGroupIds) {
setSecurityGroupIds(securityGroupIds);
return this;
}
/**
*
* 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
*
*
* @param selfServicePortal
* Specify whether to enable the self-service portal for the Client VPN endpoint.
*
* 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
*
*
* @return Specify whether to enable the self-service portal for the Client VPN endpoint.
*
* 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
*
*
* @param selfServicePortal
* Specify whether to enable the self-service portal for the Client VPN endpoint.
*
* 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
*
*
* @param selfServicePortal
* Specify whether to enable the self-service portal for the Client VPN endpoint.
*
* 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
*
*
* @param sessionTimeoutHours
* The maximum VPN session duration time in hours.
*
* 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
*
*
* @return The maximum VPN session duration time in hours.
*
* 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
*
*
* @param sessionTimeoutHours
* The maximum VPN session duration time in hours.
*
* 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 getDryRunRequest() {
Request request = new CreateClientVpnEndpointRequestMarshaller().marshall(this);
request.addParameter("DryRun", Boolean.toString(true));
return request;
}
/**
* Returns a string representation of this object. This is useful for testing and debugging. Sensitive data will be
* redacted from this string using a placeholder value.
*
* @return A string representation of this object.
*
* @see java.lang.Object#toString()
*/
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("{");
if (getClientCidrBlock() != null)
sb.append("ClientCidrBlock: ").append(getClientCidrBlock()).append(",");
if (getServerCertificateArn() != null)
sb.append("ServerCertificateArn: ").append(getServerCertificateArn()).append(",");
if (getAuthenticationOptions() != null)
sb.append("AuthenticationOptions: ").append(getAuthenticationOptions()).append(",");
if (getConnectionLogOptions() != null)
sb.append("ConnectionLogOptions: ").append(getConnectionLogOptions()).append(",");
if (getDnsServers() != null)
sb.append("DnsServers: ").append(getDnsServers()).append(",");
if (getTransportProtocol() != null)
sb.append("TransportProtocol: ").append(getTransportProtocol()).append(",");
if (getVpnPort() != null)
sb.append("VpnPort: ").append(getVpnPort()).append(",");
if (getDescription() != null)
sb.append("Description: ").append(getDescription()).append(",");
if (getSplitTunnel() != null)
sb.append("SplitTunnel: ").append(getSplitTunnel()).append(",");
if (getClientToken() != null)
sb.append("ClientToken: ").append(getClientToken()).append(",");
if (getTagSpecifications() != null)
sb.append("TagSpecifications: ").append(getTagSpecifications()).append(",");
if (getSecurityGroupIds() != null)
sb.append("SecurityGroupIds: ").append(getSecurityGroupIds()).append(",");
if (getVpcId() != null)
sb.append("VpcId: ").append(getVpcId()).append(",");
if (getSelfServicePortal() != null)
sb.append("SelfServicePortal: ").append(getSelfServicePortal()).append(",");
if (getClientConnectOptions() != null)
sb.append("ClientConnectOptions: ").append(getClientConnectOptions()).append(",");
if (getSessionTimeoutHours() != null)
sb.append("SessionTimeoutHours: ").append(getSessionTimeoutHours()).append(",");
if (getClientLoginBannerOptions() != null)
sb.append("ClientLoginBannerOptions: ").append(getClientLoginBannerOptions());
sb.append("}");
return sb.toString();
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (obj instanceof CreateClientVpnEndpointRequest == false)
return false;
CreateClientVpnEndpointRequest other = (CreateClientVpnEndpointRequest) obj;
if (other.getClientCidrBlock() == null ^ this.getClientCidrBlock() == null)
return false;
if (other.getClientCidrBlock() != null && other.getClientCidrBlock().equals(this.getClientCidrBlock()) == false)
return false;
if (other.getServerCertificateArn() == null ^ this.getServerCertificateArn() == null)
return false;
if (other.getServerCertificateArn() != null && other.getServerCertificateArn().equals(this.getServerCertificateArn()) == false)
return false;
if (other.getAuthenticationOptions() == null ^ this.getAuthenticationOptions() == null)
return false;
if (other.getAuthenticationOptions() != null && other.getAuthenticationOptions().equals(this.getAuthenticationOptions()) == false)
return false;
if (other.getConnectionLogOptions() == null ^ this.getConnectionLogOptions() == null)
return false;
if (other.getConnectionLogOptions() != null && other.getConnectionLogOptions().equals(this.getConnectionLogOptions()) == false)
return false;
if (other.getDnsServers() == null ^ this.getDnsServers() == null)
return false;
if (other.getDnsServers() != null && other.getDnsServers().equals(this.getDnsServers()) == false)
return false;
if (other.getTransportProtocol() == null ^ this.getTransportProtocol() == null)
return false;
if (other.getTransportProtocol() != null && other.getTransportProtocol().equals(this.getTransportProtocol()) == false)
return false;
if (other.getVpnPort() == null ^ this.getVpnPort() == null)
return false;
if (other.getVpnPort() != null && other.getVpnPort().equals(this.getVpnPort()) == false)
return false;
if (other.getDescription() == null ^ this.getDescription() == null)
return false;
if (other.getDescription() != null && other.getDescription().equals(this.getDescription()) == false)
return false;
if (other.getSplitTunnel() == null ^ this.getSplitTunnel() == null)
return false;
if (other.getSplitTunnel() != null && other.getSplitTunnel().equals(this.getSplitTunnel()) == false)
return false;
if (other.getClientToken() == null ^ this.getClientToken() == null)
return false;
if (other.getClientToken() != null && other.getClientToken().equals(this.getClientToken()) == false)
return false;
if (other.getTagSpecifications() == null ^ this.getTagSpecifications() == null)
return false;
if (other.getTagSpecifications() != null && other.getTagSpecifications().equals(this.getTagSpecifications()) == false)
return false;
if (other.getSecurityGroupIds() == null ^ this.getSecurityGroupIds() == null)
return false;
if (other.getSecurityGroupIds() != null && other.getSecurityGroupIds().equals(this.getSecurityGroupIds()) == false)
return false;
if (other.getVpcId() == null ^ this.getVpcId() == null)
return false;
if (other.getVpcId() != null && other.getVpcId().equals(this.getVpcId()) == false)
return false;
if (other.getSelfServicePortal() == null ^ this.getSelfServicePortal() == null)
return false;
if (other.getSelfServicePortal() != null && other.getSelfServicePortal().equals(this.getSelfServicePortal()) == false)
return false;
if (other.getClientConnectOptions() == null ^ this.getClientConnectOptions() == null)
return false;
if (other.getClientConnectOptions() != null && other.getClientConnectOptions().equals(this.getClientConnectOptions()) == false)
return false;
if (other.getSessionTimeoutHours() == null ^ this.getSessionTimeoutHours() == null)
return false;
if (other.getSessionTimeoutHours() != null && other.getSessionTimeoutHours().equals(this.getSessionTimeoutHours()) == false)
return false;
if (other.getClientLoginBannerOptions() == null ^ this.getClientLoginBannerOptions() == null)
return false;
if (other.getClientLoginBannerOptions() != null && other.getClientLoginBannerOptions().equals(this.getClientLoginBannerOptions()) == false)
return false;
return true;
}
@Override
public int hashCode() {
final int prime = 31;
int hashCode = 1;
hashCode = prime * hashCode + ((getClientCidrBlock() == null) ? 0 : getClientCidrBlock().hashCode());
hashCode = prime * hashCode + ((getServerCertificateArn() == null) ? 0 : getServerCertificateArn().hashCode());
hashCode = prime * hashCode + ((getAuthenticationOptions() == null) ? 0 : getAuthenticationOptions().hashCode());
hashCode = prime * hashCode + ((getConnectionLogOptions() == null) ? 0 : getConnectionLogOptions().hashCode());
hashCode = prime * hashCode + ((getDnsServers() == null) ? 0 : getDnsServers().hashCode());
hashCode = prime * hashCode + ((getTransportProtocol() == null) ? 0 : getTransportProtocol().hashCode());
hashCode = prime * hashCode + ((getVpnPort() == null) ? 0 : getVpnPort().hashCode());
hashCode = prime * hashCode + ((getDescription() == null) ? 0 : getDescription().hashCode());
hashCode = prime * hashCode + ((getSplitTunnel() == null) ? 0 : getSplitTunnel().hashCode());
hashCode = prime * hashCode + ((getClientToken() == null) ? 0 : getClientToken().hashCode());
hashCode = prime * hashCode + ((getTagSpecifications() == null) ? 0 : getTagSpecifications().hashCode());
hashCode = prime * hashCode + ((getSecurityGroupIds() == null) ? 0 : getSecurityGroupIds().hashCode());
hashCode = prime * hashCode + ((getVpcId() == null) ? 0 : getVpcId().hashCode());
hashCode = prime * hashCode + ((getSelfServicePortal() == null) ? 0 : getSelfServicePortal().hashCode());
hashCode = prime * hashCode + ((getClientConnectOptions() == null) ? 0 : getClientConnectOptions().hashCode());
hashCode = prime * hashCode + ((getSessionTimeoutHours() == null) ? 0 : getSessionTimeoutHours().hashCode());
hashCode = prime * hashCode + ((getClientLoginBannerOptions() == null) ? 0 : getClientLoginBannerOptions().hashCode());
return hashCode;
}
@Override
public CreateClientVpnEndpointRequest clone() {
return (CreateClientVpnEndpointRequest) super.clone();
}
}