Class InterfaceVpcEndpointOptions.Builder
java.lang.Object
software.amazon.awscdk.services.ec2.InterfaceVpcEndpointOptions.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<InterfaceVpcEndpointOptions>
- Enclosing interface:
InterfaceVpcEndpointOptions
@Stability(Stable)
public static final class InterfaceVpcEndpointOptions.Builder
extends Object
implements software.amazon.jsii.Builder<InterfaceVpcEndpointOptions>
A builder for
InterfaceVpcEndpointOptions
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
Builds the configured instance.lookupSupportedAzs
(Boolean lookupSupportedAzs) Sets the value ofInterfaceVpcEndpointOptions.getLookupSupportedAzs()
Sets the value ofInterfaceVpcEndpointOptions.getOpen()
privateDnsEnabled
(Boolean privateDnsEnabled) Sets the value ofInterfaceVpcEndpointOptions.getPrivateDnsEnabled()
securityGroups
(List<? extends ISecurityGroup> securityGroups) Sets the value ofInterfaceVpcEndpointOptions.getSecurityGroups()
service
(IInterfaceVpcEndpointService service) Sets the value ofInterfaceVpcEndpointOptions.getService()
subnets
(SubnetSelection subnets) Sets the value ofInterfaceVpcEndpointOptions.getSubnets()
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
service
@Stability(Stable) public InterfaceVpcEndpointOptions.Builder service(IInterfaceVpcEndpointService service) Sets the value ofInterfaceVpcEndpointOptions.getService()
- Parameters:
service
- The service to use for this interface VPC endpoint. This parameter is required.- Returns:
this
-
lookupSupportedAzs
@Stability(Stable) public InterfaceVpcEndpointOptions.Builder lookupSupportedAzs(Boolean lookupSupportedAzs) Sets the value ofInterfaceVpcEndpointOptions.getLookupSupportedAzs()
- Parameters:
lookupSupportedAzs
- Limit to only those availability zones where the endpoint service can be created. Setting this to 'true' requires a lookup to be performed at synthesis time. Account and region must be set on the containing stack for this to work.- Returns:
this
-
open
Sets the value ofInterfaceVpcEndpointOptions.getOpen()
- Parameters:
open
- Whether to automatically allow VPC traffic to the endpoint. If enabled, all traffic to the endpoint from within the VPC will be automatically allowed. This is done based on the VPC's CIDR range.- Returns:
this
-
privateDnsEnabled
@Stability(Stable) public InterfaceVpcEndpointOptions.Builder privateDnsEnabled(Boolean privateDnsEnabled) Sets the value ofInterfaceVpcEndpointOptions.getPrivateDnsEnabled()
- Parameters:
privateDnsEnabled
- Whether to associate a private hosted zone with the specified VPC. This allows you to make requests to the service using its default DNS hostname.- Returns:
this
-
securityGroups
@Stability(Stable) public InterfaceVpcEndpointOptions.Builder securityGroups(List<? extends ISecurityGroup> securityGroups) Sets the value ofInterfaceVpcEndpointOptions.getSecurityGroups()
- Parameters:
securityGroups
- The security groups to associate with this interface VPC endpoint.- Returns:
this
-
subnets
Sets the value ofInterfaceVpcEndpointOptions.getSubnets()
- Parameters:
subnets
- The subnets in which to create an endpoint network interface. At most one per availability zone.- Returns:
this
-
build
Builds the configured instance.- Specified by:
build
in interfacesoftware.amazon.jsii.Builder<InterfaceVpcEndpointOptions>
- Returns:
- a new instance of
InterfaceVpcEndpointOptions
- Throws:
NullPointerException
- if any required attribute was not provided
-