Class CfnVPCEndpoint
- All Implemented Interfaces:
IInspectable,IVPCEndpointRef,IEnvironmentAware,ITaggableV2,software.amazon.jsii.JsiiSerializable,software.constructs.IConstruct,software.constructs.IDependable
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")
.vpcId("vpcId")
// the properties below are optional
.dnsOptions(DnsOptionsSpecificationProperty.builder()
.dnsRecordIpType("dnsRecordIpType")
.privateDnsOnlyForInboundResolverEndpoint("privateDnsOnlyForInboundResolverEndpoint")
.privateDnsPreference("privateDnsPreference")
.privateDnsSpecifiedDomains(List.of("privateDnsSpecifiedDomains"))
.build())
.ipAddressType("ipAddressType")
.policyDocument(policyDocument)
.privateDnsEnabled(false)
.resourceConfigurationArn("resourceConfigurationArn")
.routeTableIds(List.of("routeTableIds"))
.securityGroupIds(List.of("securityGroupIds"))
.serviceName("serviceName")
.serviceNetworkArn("serviceNetworkArn")
.serviceRegion("serviceRegion")
.subnetIds(List.of("subnetIds"))
.tags(List.of(CfnTag.builder()
.key("key")
.value("value")
.build()))
.vpcEndpointType("vpcEndpointType")
.build();
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classA fluent builder forCfnVPCEndpoint.static interfaceDescribes the DNS options for an endpoint.Nested classes/interfaces inherited from class software.amazon.jsii.JsiiObject
software.amazon.jsii.JsiiObject.InitializationModeNested classes/interfaces inherited from interface software.constructs.IConstruct
software.constructs.IConstruct.Jsii$DefaultNested classes/interfaces inherited from interface software.amazon.awscdk.IInspectable
IInspectable.Jsii$Default, IInspectable.Jsii$ProxyNested classes/interfaces inherited from interface software.amazon.awscdk.ITaggableV2
ITaggableV2.Jsii$Default, ITaggableV2.Jsii$ProxyNested classes/interfaces inherited from interface software.amazon.awscdk.interfaces.ec2.IVPCEndpointRef
IVPCEndpointRef.Jsii$Default, IVPCEndpointRef.Jsii$Proxy -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringThe CloudFormation resource type name for this resource class. -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedCfnVPCEndpoint(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) protectedCfnVPCEndpoint(software.amazon.jsii.JsiiObjectRef objRef) CfnVPCEndpoint(software.constructs.Construct scope, String id, CfnVPCEndpointProps props) Create a newAWS::EC2::VPCEndpoint. -
Method Summary
Modifier and TypeMethodDescriptionstatic StringarnForVPCEndpoint(IVPCEndpointRef resource) static IVPCEndpointReffromVpcEndpointId(software.constructs.Construct scope, String id, String vpcEndpointId) Creates a new IVPCEndpointRef from a vpcEndpointId.The date and time the VPC endpoint was created.(Interface endpoints) The DNS entries for the endpoint.The ID of the VPC endpoint.(Interface endpoints) The network interface IDs.Tag Manager which manages the tags for this resource.Describes the DNS options for an endpoint.The supported IP address types.An endpoint policy, which controls access to the service from the VPC.Indicate whether to associate a private hosted zone with the specified VPC.The Amazon Resource Name (ARN) of the resource configuration.The IDs of the route tables.The IDs of the security groups to associate with the endpoint network interfaces.The name of the endpoint service.The Amazon Resource Name (ARN) of the service network.Describes a Region.The IDs of the subnets in which to create endpoint network interfaces.getTags()The tags to associate with the endpoint.A reference to a VPCEndpoint resource.The type of endpoint.getVpcId()The ID of the VPC.voidinspect(TreeInspector inspector) Examines the CloudFormation resource and discloses attributes.static BooleanChecks whether the given object is a CfnVPCEndpoint.renderProperties(Map<String, Object> props) voidsetDnsOptions(IResolvable value) Describes the DNS options for an endpoint.voidDescribes the DNS options for an endpoint.voidsetIpAddressType(String value) The supported IP address types.voidsetPolicyDocument(Object value) An endpoint policy, which controls access to the service from the VPC.voidsetPrivateDnsEnabled(Boolean value) Indicate whether to associate a private hosted zone with the specified VPC.voidsetPrivateDnsEnabled(IResolvable value) Indicate whether to associate a private hosted zone with the specified VPC.voidThe Amazon Resource Name (ARN) of the resource configuration.voidsetRouteTableIds(List<String> value) The IDs of the route tables.voidsetSecurityGroupIds(List<String> value) The IDs of the security groups to associate with the endpoint network interfaces.voidsetServiceName(String value) The name of the endpoint service.voidsetServiceNetworkArn(String value) The Amazon Resource Name (ARN) of the service network.voidsetServiceRegion(String value) Describes a Region.voidsetSubnetIds(List<String> value) The IDs of the subnets in which to create endpoint network interfaces.voidThe tags to associate with the endpoint.voidsetVpcEndpointType(String value) The type of endpoint.voidThe ID of the VPC.Methods inherited from class software.amazon.awscdk.CfnResource
addDeletionOverride, addDependency, addDependsOn, addMetadata, addOverride, addPropertyDeletionOverride, addPropertyOverride, applyRemovalPolicy, applyRemovalPolicy, applyRemovalPolicy, getAtt, getAtt, getCfnOptions, getCfnResourceType, getEnv, getMetadata, getUpdatedProperites, getUpdatedProperties, isCfnResource, obtainDependencies, obtainResourceDependencies, removeDependency, replaceDependency, shouldSynthesize, toString, validatePropertiesMethods inherited from class software.amazon.awscdk.CfnRefElement
getRefMethods inherited from class software.amazon.awscdk.CfnElement
getCreationStack, getLogicalId, getStack, isCfnElement, overrideLogicalIdMethods inherited from class software.constructs.Construct
getNode, isConstructMethods inherited from class software.amazon.jsii.JsiiObject
jsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSetMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface software.constructs.IConstruct
getNodeMethods inherited from interface software.amazon.awscdk.interfaces.IEnvironmentAware
getEnvMethods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Field Details
-
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) Create a newAWS::EC2::VPCEndpoint.- 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
-
arnForVPCEndpoint
@Stability(Stable) @NotNull public static String arnForVPCEndpoint(@NotNull IVPCEndpointRef resource) - Parameters:
resource- This parameter is required.
-
fromVpcEndpointId
@Stability(Stable) @NotNull public static IVPCEndpointRef fromVpcEndpointId(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull String vpcEndpointId) Creates a new IVPCEndpointRef from a vpcEndpointId.- Parameters:
scope- This parameter is required.id- This parameter is required.vpcEndpointId- This parameter is required.
-
isCfnVPCEndpoint
Checks whether the given object is a CfnVPCEndpoint.- Parameters:
x- This parameter is required.
-
inspect
Examines the CloudFormation resource and discloses attributes.- Specified by:
inspectin interfaceIInspectable- 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:
renderPropertiesin classCfnResource- Parameters:
props- This parameter is required.
-
getAttrCreationTimestamp
The date and time the VPC endpoint was created.For example:
Fri Sep 28 23:34:36 UTC 2018. -
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
PrivateDnsEnabledorSubnetIdsproperties, the DNS entries in the list will change. -
getAttrId
The ID of the VPC endpoint. -
getAttrNetworkInterfaceIds
(Interface endpoints) The network interface IDs.If you update the
PrivateDnsEnabledorSubnetIdsproperties, the items in this list might change. -
getCdkTagManager
Tag Manager which manages the tags for this resource.- Specified by:
getCdkTagManagerin interfaceITaggableV2
-
getCfnProperties
- Overrides:
getCfnPropertiesin classCfnResource
-
getVpcEndpointRef
A reference to a VPCEndpoint resource.- Specified by:
getVpcEndpointRefin interfaceIVPCEndpointRef
-
getVpcId
The ID of the VPC. -
setVpcId
The ID of the VPC. -
getDnsOptions
Describes the DNS options for an endpoint.Returns union: either
IResolvableorCfnVPCEndpoint.DnsOptionsSpecificationProperty -
setDnsOptions
Describes the DNS options for an endpoint. -
setDnsOptions
@Stability(Stable) public void setDnsOptions(@Nullable CfnVPCEndpoint.DnsOptionsSpecificationProperty value) Describes the DNS options for an endpoint. -
getIpAddressType
The supported IP address types. -
setIpAddressType
The supported IP address types. -
getPolicyDocument
An endpoint policy, which controls access to the service from the VPC. -
setPolicyDocument
An endpoint policy, which controls access to the service from the VPC. -
getPrivateDnsEnabled
Indicate whether to associate a private hosted zone with the specified VPC.Returns union: either
BooleanorIResolvable -
setPrivateDnsEnabled
Indicate whether to associate a private hosted zone with the specified VPC. -
setPrivateDnsEnabled
Indicate whether to associate a private hosted zone with the specified VPC. -
getResourceConfigurationArn
The Amazon Resource Name (ARN) of the resource configuration. -
setResourceConfigurationArn
The Amazon Resource Name (ARN) of the resource configuration. -
getRouteTableIds
The IDs of the route tables. -
setRouteTableIds
The IDs of the route tables. -
getSecurityGroupIds
The IDs of the security groups to associate with the endpoint network interfaces. -
setSecurityGroupIds
The IDs of the security groups to associate with the endpoint network interfaces. -
getServiceName
The name of the endpoint service. -
setServiceName
The name of the endpoint service. -
getServiceNetworkArn
The Amazon Resource Name (ARN) of the service network. -
setServiceNetworkArn
The Amazon Resource Name (ARN) of the service network. -
getServiceRegion
Describes a Region. -
setServiceRegion
Describes a Region. -
getSubnetIds
The IDs of the subnets in which to create endpoint network interfaces. -
setSubnetIds
The IDs of the subnets in which to create endpoint network interfaces. -
getTags
The tags to associate with the endpoint. -
setTags
The tags to associate with the endpoint. -
getVpcEndpointType
The type of endpoint. -
setVpcEndpointType
The type of endpoint.
-