Class CfnVPCEndpoint

java.lang.Object
software.amazon.jsii.JsiiObject
software.constructs.Construct
All Implemented Interfaces:
IInspectable, software.amazon.jsii.JsiiSerializable, software.constructs.IConstruct, software.constructs.IDependable

@Generated(value="jsii-pacmak/1.97.0 (build 729de35)", date="2024-04-18T17:54:15.910Z") @Stability(Stable) public class CfnVPCEndpoint extends CfnResource implements IInspectable
Specifies a VPC endpoint.

A VPC endpoint provides a private connection between your VPC and an endpoint service. You can use an endpoint service provided by AWS , an AWS Marketplace Partner, or another AWS accounts in your organization. For more information, see the AWS PrivateLink User Guide .

An endpoint of type Interface establishes connections between the subnets in your VPC and an AWS service , your own service, or a service hosted by another AWS account . With an interface VPC endpoint, you specify the subnets in which to create the endpoint and the security groups to associate with the endpoint network interfaces.

An endpoint of type gateway serves as a target for a route in your route table for traffic destined for Amazon S3 or DynamoDB . You can specify an endpoint policy for the endpoint, which controls access to the service from your VPC. You can also specify the VPC route tables that use the endpoint. For more information about connectivity to Amazon S3 , see Why can't I connect to an S3 bucket using a gateway VPC endpoint?

An endpoint of type GatewayLoadBalancer provides private connectivity between your VPC and virtual appliances from a service provider.

Example:

 // The code below shows an example of how to instantiate this type.
 // The values are placeholders you should change.
 import software.amazon.awscdk.services.ec2.*;
 Object policyDocument;
 CfnVPCEndpoint cfnVPCEndpoint = CfnVPCEndpoint.Builder.create(this, "MyCfnVPCEndpoint")
         .serviceName("serviceName")
         .vpcId("vpcId")
         // the properties below are optional
         .policyDocument(policyDocument)
         .privateDnsEnabled(false)
         .routeTableIds(List.of("routeTableIds"))
         .securityGroupIds(List.of("securityGroupIds"))
         .subnetIds(List.of("subnetIds"))
         .vpcEndpointType("vpcEndpointType")
         .build();
 

See Also:
  • Field Details

    • CFN_RESOURCE_TYPE_NAME

      @Stability(Stable) public static final String CFN_RESOURCE_TYPE_NAME
      The CloudFormation resource type name for this resource class.
  • Constructor Details

    • CfnVPCEndpoint

      protected CfnVPCEndpoint(software.amazon.jsii.JsiiObjectRef objRef)
    • CfnVPCEndpoint

      protected CfnVPCEndpoint(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
    • CfnVPCEndpoint

      @Stability(Stable) public CfnVPCEndpoint(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull CfnVPCEndpointProps props)
      Parameters:
      scope - Scope in which this resource is defined. This parameter is required.
      id - Construct identifier for this resource (unique in its scope). This parameter is required.
      props - Resource properties. This parameter is required.
  • Method Details

    • inspect

      @Stability(Stable) public void inspect(@NotNull TreeInspector inspector)
      Examines the CloudFormation resource and discloses attributes.

      Specified by:
      inspect in interface IInspectable
      Parameters:
      inspector - tree inspector to collect and process attributes. This parameter is required.
    • renderProperties

      @Stability(Stable) @NotNull protected Map<String,Object> renderProperties(@NotNull Map<String,Object> props)
      Overrides:
      renderProperties in class CfnResource
      Parameters:
      props - This parameter is required.
    • getAttrCreationTimestamp

      @Stability(Stable) @NotNull public String getAttrCreationTimestamp()
      The date and time the VPC endpoint was created.

      For example: Fri Sep 28 23:34:36 UTC 2018.

    • getAttrDnsEntries

      @Stability(Stable) @NotNull public List<String> getAttrDnsEntries()
      (Interface endpoints) The DNS entries for the endpoint.

      Each entry is a combination of the hosted zone ID and the DNS name. The entries are ordered as follows: regional public DNS, zonal public DNS, private DNS, and wildcard DNS. This order is not enforced for AWS Marketplace services.

      The following is an example. In the first entry, the hosted zone ID is Z1HUB23UULQXV and the DNS name is vpce-01abc23456de78f9g-12abccd3.ec2.us-east-1.vpce.amazonaws.com.

      ["Z1HUB23UULQXV:vpce-01abc23456de78f9g-12abccd3.ec2.us-east-1.vpce.amazonaws.com", "Z1HUB23UULQXV:vpce-01abc23456de78f9g-12abccd3-us-east-1a.ec2.us-east-1.vpce.amazonaws.com", "Z1C12344VYDITB0:ec2.us-east-1.amazonaws.com"]

      If you update the PrivateDnsEnabled or SubnetIds properties, the DNS entries in the list will change.

    • getAttrId

      @Stability(Stable) @NotNull public String getAttrId()
      The ID of the VPC endpoint.
    • getAttrNetworkInterfaceIds

      @Stability(Stable) @NotNull public List<String> getAttrNetworkInterfaceIds()
      (Interface endpoints) The network interface IDs.

      If you update the PrivateDnsEnabled or SubnetIds properties, the items in this list might change.

    • getCfnProperties

      @Stability(Stable) @NotNull protected Map<String,Object> getCfnProperties()
      Overrides:
      getCfnProperties in class CfnResource
    • getServiceName

      @Stability(Stable) @NotNull public String getServiceName()
      The name of the endpoint service.
    • setServiceName

      @Stability(Stable) public void setServiceName(@NotNull String value)
      The name of the endpoint service.
    • getVpcId

      @Stability(Stable) @NotNull public String getVpcId()
      The ID of the VPC.
    • setVpcId

      @Stability(Stable) public void setVpcId(@NotNull String value)
      The ID of the VPC.
    • getPolicyDocument

      @Stability(Stable) @Nullable public Object getPolicyDocument()
      An endpoint policy, which controls access to the service from the VPC.
    • setPolicyDocument

      @Stability(Stable) public void setPolicyDocument(@Nullable Object value)
      An endpoint policy, which controls access to the service from the VPC.
    • getPrivateDnsEnabled

      @Stability(Stable) @Nullable public Object getPrivateDnsEnabled()
      Indicate whether to associate a private hosted zone with the specified VPC.
    • setPrivateDnsEnabled

      @Stability(Stable) public void setPrivateDnsEnabled(@Nullable Boolean value)
      Indicate whether to associate a private hosted zone with the specified VPC.
    • setPrivateDnsEnabled

      @Stability(Stable) public void setPrivateDnsEnabled(@Nullable IResolvable value)
      Indicate whether to associate a private hosted zone with the specified VPC.
    • getRouteTableIds

      @Stability(Stable) @Nullable public List<String> getRouteTableIds()
      The IDs of the route tables.
    • setRouteTableIds

      @Stability(Stable) public void setRouteTableIds(@Nullable List<String> value)
      The IDs of the route tables.
    • getSecurityGroupIds

      @Stability(Stable) @Nullable public List<String> getSecurityGroupIds()
      The IDs of the security groups to associate with the endpoint network interfaces.
    • setSecurityGroupIds

      @Stability(Stable) public void setSecurityGroupIds(@Nullable List<String> value)
      The IDs of the security groups to associate with the endpoint network interfaces.
    • getSubnetIds

      @Stability(Stable) @Nullable public List<String> getSubnetIds()
      The IDs of the subnets in which to create endpoint network interfaces.
    • setSubnetIds

      @Stability(Stable) public void setSubnetIds(@Nullable List<String> value)
      The IDs of the subnets in which to create endpoint network interfaces.
    • getVpcEndpointType

      @Stability(Stable) @Nullable public String getVpcEndpointType()
      The type of endpoint.
    • setVpcEndpointType

      @Stability(Stable) public void setVpcEndpointType(@Nullable String value)
      The type of endpoint.