/*
* 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.CreateVpcEndpointRequestMarshaller;
/**
*
*/
@Generated("com.amazonaws:aws-java-sdk-code-generator")
public class CreateVpcEndpointRequest extends AmazonWebServiceRequest implements Serializable, Cloneable, DryRunSupportedRequest
* The type of endpoint.
*
* Default: Gateway
*
* The ID of the VPC.
*
* The name of the endpoint service.
*
* (Interface and gateway endpoints) A policy to attach to the endpoint that controls access to the service. The
* policy must be in valid JSON format. If this parameter is not specified, we attach a default policy that allows
* full access to the service.
*
* (Gateway endpoint) The route table IDs.
*
* (Interface and Gateway Load Balancer endpoints) The IDs of the subnets in which to create an endpoint network
* interface. For a Gateway Load Balancer endpoint, you can specify only one subnet.
*
* (Interface endpoint) The IDs of the security groups to associate with the endpoint network interface. If this
* parameter is not specified, we use the default security group for the VPC.
*
* The IP address type for the endpoint.
*
* The DNS options for the endpoint.
*
* Unique, case-sensitive identifier that you provide to ensure the idempotency of the request. For more
* information, see How to ensure
* idempotency.
*
* (Interface endpoint) Indicates whether to associate a private hosted zone with the specified VPC. The private
* hosted zone contains a record set for the default public DNS name for the service for the Region (for example,
*
* To use a private hosted zone, you must set the following VPC attributes to
* Default:
* The tags to associate with the endpoint.
*
* The type of endpoint.
*
* Default: Gateway
* kinesis.us-east-1.amazonaws.com
), which resolves to the private IP addresses of the endpoint network
* interfaces in the VPC. This enables you to make requests to the default public DNS name for the service instead
* of the public DNS names that are automatically generated by the VPC endpoint service.
* true
:
* enableDnsHostnames
and enableDnsSupport
. Use ModifyVpcAttribute to set the VPC
* attributes.
* true
*
* Default: Gateway * @see VpcEndpointType */ public void setVpcEndpointType(String vpcEndpointType) { this.vpcEndpointType = vpcEndpointType; } /** *
* The type of endpoint. *
** Default: Gateway *
* * @return The type of endpoint. ** Default: Gateway * @see VpcEndpointType */ public String getVpcEndpointType() { return this.vpcEndpointType; } /** *
* The type of endpoint. *
** Default: Gateway *
* * @param vpcEndpointType * The type of endpoint. ** Default: Gateway * @return Returns a reference to this object so that method calls can be chained together. * @see VpcEndpointType */ public CreateVpcEndpointRequest withVpcEndpointType(String vpcEndpointType) { setVpcEndpointType(vpcEndpointType); return this; } /** *
* The type of endpoint. *
** Default: Gateway *
* * @param vpcEndpointType * The type of endpoint. ** Default: Gateway * @return Returns a reference to this object so that method calls can be chained together. * @see VpcEndpointType */ public CreateVpcEndpointRequest withVpcEndpointType(VpcEndpointType vpcEndpointType) { this.vpcEndpointType = vpcEndpointType.toString(); return this; } /** *
* The ID of the VPC. *
* * @param vpcId * The ID of the VPC. */ public void setVpcId(String vpcId) { this.vpcId = vpcId; } /** ** The ID of the VPC. *
* * @return The ID of the VPC. */ public String getVpcId() { return this.vpcId; } /** ** The ID of the VPC. *
* * @param vpcId * The ID of the VPC. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateVpcEndpointRequest withVpcId(String vpcId) { setVpcId(vpcId); return this; } /** ** The name of the endpoint service. *
* * @param serviceName * The name of the endpoint service. */ public void setServiceName(String serviceName) { this.serviceName = serviceName; } /** ** The name of the endpoint service. *
* * @return The name of the endpoint service. */ public String getServiceName() { return this.serviceName; } /** ** The name of the endpoint service. *
* * @param serviceName * The name of the endpoint service. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateVpcEndpointRequest withServiceName(String serviceName) { setServiceName(serviceName); return this; } /** ** (Interface and gateway endpoints) A policy to attach to the endpoint that controls access to the service. The * policy must be in valid JSON format. If this parameter is not specified, we attach a default policy that allows * full access to the service. *
* * @param policyDocument * (Interface and gateway endpoints) A policy to attach to the endpoint that controls access to the service. * The policy must be in valid JSON format. If this parameter is not specified, we attach a default policy * that allows full access to the service. */ public void setPolicyDocument(String policyDocument) { this.policyDocument = policyDocument; } /** ** (Interface and gateway endpoints) A policy to attach to the endpoint that controls access to the service. The * policy must be in valid JSON format. If this parameter is not specified, we attach a default policy that allows * full access to the service. *
* * @return (Interface and gateway endpoints) A policy to attach to the endpoint that controls access to the service. * The policy must be in valid JSON format. If this parameter is not specified, we attach a default policy * that allows full access to the service. */ public String getPolicyDocument() { return this.policyDocument; } /** ** (Interface and gateway endpoints) A policy to attach to the endpoint that controls access to the service. The * policy must be in valid JSON format. If this parameter is not specified, we attach a default policy that allows * full access to the service. *
* * @param policyDocument * (Interface and gateway endpoints) A policy to attach to the endpoint that controls access to the service. * The policy must be in valid JSON format. If this parameter is not specified, we attach a default policy * that allows full access to the service. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateVpcEndpointRequest withPolicyDocument(String policyDocument) { setPolicyDocument(policyDocument); return this; } /** ** (Gateway endpoint) The route table IDs. *
* * @return (Gateway endpoint) The route table IDs. */ public java.util.List* (Gateway endpoint) The route table IDs. *
* * @param routeTableIds * (Gateway endpoint) The route table IDs. */ public void setRouteTableIds(java.util.Collection* (Gateway endpoint) The route table IDs. *
** NOTE: This method appends the values to the existing list (if any). Use * {@link #setRouteTableIds(java.util.Collection)} or {@link #withRouteTableIds(java.util.Collection)} if you want * to override the existing values. *
* * @param routeTableIds * (Gateway endpoint) The route table IDs. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateVpcEndpointRequest withRouteTableIds(String... routeTableIds) { if (this.routeTableIds == null) { setRouteTableIds(new com.amazonaws.internal.SdkInternalList* (Gateway endpoint) The route table IDs. *
* * @param routeTableIds * (Gateway endpoint) The route table IDs. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateVpcEndpointRequest withRouteTableIds(java.util.Collection* (Interface and Gateway Load Balancer endpoints) The IDs of the subnets in which to create an endpoint network * interface. For a Gateway Load Balancer endpoint, you can specify only one subnet. *
* * @return (Interface and Gateway Load Balancer endpoints) The IDs of the subnets in which to create an endpoint * network interface. For a Gateway Load Balancer endpoint, you can specify only one subnet. */ public java.util.List* (Interface and Gateway Load Balancer endpoints) The IDs of the subnets in which to create an endpoint network * interface. For a Gateway Load Balancer endpoint, you can specify only one subnet. *
* * @param subnetIds * (Interface and Gateway Load Balancer endpoints) The IDs of the subnets in which to create an endpoint * network interface. For a Gateway Load Balancer endpoint, you can specify only one subnet. */ public void setSubnetIds(java.util.Collection* (Interface and Gateway Load Balancer endpoints) The IDs of the subnets in which to create an endpoint network * interface. For a Gateway Load Balancer endpoint, you can specify only one subnet. *
** NOTE: This method appends the values to the existing list (if any). Use * {@link #setSubnetIds(java.util.Collection)} or {@link #withSubnetIds(java.util.Collection)} if you want to * override the existing values. *
* * @param subnetIds * (Interface and Gateway Load Balancer endpoints) The IDs of the subnets in which to create an endpoint * network interface. For a Gateway Load Balancer endpoint, you can specify only one subnet. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateVpcEndpointRequest withSubnetIds(String... subnetIds) { if (this.subnetIds == null) { setSubnetIds(new com.amazonaws.internal.SdkInternalList* (Interface and Gateway Load Balancer endpoints) The IDs of the subnets in which to create an endpoint network * interface. For a Gateway Load Balancer endpoint, you can specify only one subnet. *
* * @param subnetIds * (Interface and Gateway Load Balancer endpoints) The IDs of the subnets in which to create an endpoint * network interface. For a Gateway Load Balancer endpoint, you can specify only one subnet. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateVpcEndpointRequest withSubnetIds(java.util.Collection* (Interface endpoint) The IDs of the security groups to associate with the endpoint network interface. If this * parameter is not specified, we use the default security group for the VPC. *
* * @return (Interface endpoint) The IDs of the security groups to associate with the endpoint network interface. If * this parameter is not specified, we use the default security group for the VPC. */ public java.util.List* (Interface endpoint) The IDs of the security groups to associate with the endpoint network interface. If this * parameter is not specified, we use the default security group for the VPC. *
* * @param securityGroupIds * (Interface endpoint) The IDs of the security groups to associate with the endpoint network interface. If * this parameter is not specified, we use the default security group for the VPC. */ public void setSecurityGroupIds(java.util.Collection* (Interface endpoint) The IDs of the security groups to associate with the endpoint network interface. If this * parameter is not specified, we use the default security group for the VPC. *
** 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 * (Interface endpoint) The IDs of the security groups to associate with the endpoint network interface. If * this parameter is not specified, we use the default security group for the VPC. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateVpcEndpointRequest withSecurityGroupIds(String... securityGroupIds) { if (this.securityGroupIds == null) { setSecurityGroupIds(new com.amazonaws.internal.SdkInternalList* (Interface endpoint) The IDs of the security groups to associate with the endpoint network interface. If this * parameter is not specified, we use the default security group for the VPC. *
* * @param securityGroupIds * (Interface endpoint) The IDs of the security groups to associate with the endpoint network interface. If * this parameter is not specified, we use the default security group for the VPC. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateVpcEndpointRequest withSecurityGroupIds(java.util.Collection* The IP address type for the endpoint. *
* * @param ipAddressType * The IP address type for the endpoint. * @see IpAddressType */ public void setIpAddressType(String ipAddressType) { this.ipAddressType = ipAddressType; } /** ** The IP address type for the endpoint. *
* * @return The IP address type for the endpoint. * @see IpAddressType */ public String getIpAddressType() { return this.ipAddressType; } /** ** The IP address type for the endpoint. *
* * @param ipAddressType * The IP address type for the endpoint. * @return Returns a reference to this object so that method calls can be chained together. * @see IpAddressType */ public CreateVpcEndpointRequest withIpAddressType(String ipAddressType) { setIpAddressType(ipAddressType); return this; } /** ** The IP address type for the endpoint. *
* * @param ipAddressType * The IP address type for the endpoint. * @return Returns a reference to this object so that method calls can be chained together. * @see IpAddressType */ public CreateVpcEndpointRequest withIpAddressType(IpAddressType ipAddressType) { this.ipAddressType = ipAddressType.toString(); return this; } /** ** The DNS options for the endpoint. *
* * @param dnsOptions * The DNS options for the endpoint. */ public void setDnsOptions(DnsOptionsSpecification dnsOptions) { this.dnsOptions = dnsOptions; } /** ** The DNS options for the endpoint. *
* * @return The DNS options for the endpoint. */ public DnsOptionsSpecification getDnsOptions() { return this.dnsOptions; } /** ** The DNS options for the endpoint. *
* * @param dnsOptions * The DNS options for the endpoint. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateVpcEndpointRequest withDnsOptions(DnsOptionsSpecification dnsOptions) { setDnsOptions(dnsOptions); return this; } /** ** 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 CreateVpcEndpointRequest withClientToken(String clientToken) { setClientToken(clientToken); return this; } /** *
* (Interface endpoint) Indicates whether to associate a private hosted zone with the specified VPC. The private
* hosted zone contains a record set for the default public DNS name for the service for the Region (for example,
* kinesis.us-east-1.amazonaws.com
), which resolves to the private IP addresses of the endpoint network
* interfaces in the VPC. This enables you to make requests to the default public DNS name for the service instead
* of the public DNS names that are automatically generated by the VPC endpoint service.
*
* To use a private hosted zone, you must set the following VPC attributes to true
:
* enableDnsHostnames
and enableDnsSupport
. Use ModifyVpcAttribute to set the VPC
* attributes.
*
* Default: true
*
kinesis.us-east-1.amazonaws.com
), which resolves to the private IP addresses of
* the endpoint network interfaces in the VPC. This enables you to make requests to the default public DNS
* name for the service instead of the public DNS names that are automatically generated by the VPC endpoint
* service.
*
* To use a private hosted zone, you must set the following VPC attributes to true
:
* enableDnsHostnames
and enableDnsSupport
. Use ModifyVpcAttribute to set
* the VPC attributes.
*
* Default: true
*/
public void setPrivateDnsEnabled(Boolean privateDnsEnabled) {
this.privateDnsEnabled = privateDnsEnabled;
}
/**
*
* (Interface endpoint) Indicates whether to associate a private hosted zone with the specified VPC. The private
* hosted zone contains a record set for the default public DNS name for the service for the Region (for example,
* kinesis.us-east-1.amazonaws.com
), which resolves to the private IP addresses of the endpoint network
* interfaces in the VPC. This enables you to make requests to the default public DNS name for the service instead
* of the public DNS names that are automatically generated by the VPC endpoint service.
*
* To use a private hosted zone, you must set the following VPC attributes to true
:
* enableDnsHostnames
and enableDnsSupport
. Use ModifyVpcAttribute to set the VPC
* attributes.
*
* Default: true
*
kinesis.us-east-1.amazonaws.com
), which resolves to the private IP addresses
* of the endpoint network interfaces in the VPC. This enables you to make requests to the default public
* DNS name for the service instead of the public DNS names that are automatically generated by the VPC
* endpoint service.
*
* To use a private hosted zone, you must set the following VPC attributes to true
:
* enableDnsHostnames
and enableDnsSupport
. Use ModifyVpcAttribute to set
* the VPC attributes.
*
* Default: true
*/
public Boolean getPrivateDnsEnabled() {
return this.privateDnsEnabled;
}
/**
*
* (Interface endpoint) Indicates whether to associate a private hosted zone with the specified VPC. The private
* hosted zone contains a record set for the default public DNS name for the service for the Region (for example,
* kinesis.us-east-1.amazonaws.com
), which resolves to the private IP addresses of the endpoint network
* interfaces in the VPC. This enables you to make requests to the default public DNS name for the service instead
* of the public DNS names that are automatically generated by the VPC endpoint service.
*
* To use a private hosted zone, you must set the following VPC attributes to true
:
* enableDnsHostnames
and enableDnsSupport
. Use ModifyVpcAttribute to set the VPC
* attributes.
*
* Default: true
*
kinesis.us-east-1.amazonaws.com
), which resolves to the private IP addresses of
* the endpoint network interfaces in the VPC. This enables you to make requests to the default public DNS
* name for the service instead of the public DNS names that are automatically generated by the VPC endpoint
* service.
*
* To use a private hosted zone, you must set the following VPC attributes to true
:
* enableDnsHostnames
and enableDnsSupport
. Use ModifyVpcAttribute to set
* the VPC attributes.
*
* Default: true
* @return Returns a reference to this object so that method calls can be chained together.
*/
public CreateVpcEndpointRequest withPrivateDnsEnabled(Boolean privateDnsEnabled) {
setPrivateDnsEnabled(privateDnsEnabled);
return this;
}
/**
*
* (Interface endpoint) Indicates whether to associate a private hosted zone with the specified VPC. The private
* hosted zone contains a record set for the default public DNS name for the service for the Region (for example,
* kinesis.us-east-1.amazonaws.com
), which resolves to the private IP addresses of the endpoint network
* interfaces in the VPC. This enables you to make requests to the default public DNS name for the service instead
* of the public DNS names that are automatically generated by the VPC endpoint service.
*
* To use a private hosted zone, you must set the following VPC attributes to true
:
* enableDnsHostnames
and enableDnsSupport
. Use ModifyVpcAttribute to set the VPC
* attributes.
*
* Default: true
*
kinesis.us-east-1.amazonaws.com
), which resolves to the private IP addresses
* of the endpoint network interfaces in the VPC. This enables you to make requests to the default public
* DNS name for the service instead of the public DNS names that are automatically generated by the VPC
* endpoint service.
*
* To use a private hosted zone, you must set the following VPC attributes to true
:
* enableDnsHostnames
and enableDnsSupport
. Use ModifyVpcAttribute to set
* the VPC attributes.
*
* Default: true
*/
public Boolean isPrivateDnsEnabled() {
return this.privateDnsEnabled;
}
/**
*
* The tags to associate with the endpoint. *
* * @return The tags to associate with the endpoint. */ public java.util.List* The tags to associate with the endpoint. *
* * @param tagSpecifications * The tags to associate with the endpoint. */ public void setTagSpecifications(java.util.Collection* The tags to associate with the endpoint. *
** 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 associate with the endpoint. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateVpcEndpointRequest withTagSpecifications(TagSpecification... tagSpecifications) { if (this.tagSpecifications == null) { setTagSpecifications(new com.amazonaws.internal.SdkInternalList* The tags to associate with the endpoint. *
* * @param tagSpecifications * The tags to associate with the endpoint. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateVpcEndpointRequest withTagSpecifications(java.util.Collection