Class CfnVPCEndpoint
- All Implemented Interfaces:
IConstruct
,IDependable
,IInspectable
,software.amazon.jsii.JsiiSerializable
,software.constructs.IConstruct
AWS::EC2::VPCEndpoint
.
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();
-
Nested Class Summary
Nested classes/interfaces inherited from class software.amazon.jsii.JsiiObject
software.amazon.jsii.JsiiObject.InitializationMode
Nested classes/interfaces inherited from interface software.amazon.awscdk.core.IConstruct
IConstruct.Jsii$Default
Nested classes/interfaces inherited from interface software.constructs.IConstruct
software.constructs.IConstruct.Jsii$Default
Nested classes/interfaces inherited from interface software.amazon.awscdk.core.IInspectable
IInspectable.Jsii$Default, IInspectable.Jsii$Proxy
-
Field Summary
Modifier and TypeFieldDescriptionstatic final String
The CloudFormation resource type name for this resource class. -
Constructor Summary
ModifierConstructorDescriptionCfnVPCEndpoint
(Construct scope, String id, CfnVPCEndpointProps props) Create a newAWS::EC2::VPCEndpoint
.protected
CfnVPCEndpoint
(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) protected
CfnVPCEndpoint
(software.amazon.jsii.JsiiObjectRef objRef) -
Method Summary
Modifier and TypeMethodDescriptionThe 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.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 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 IDs of the subnets in which to create endpoint network interfaces.The type of endpoint.getVpcId()
The ID of the VPC.void
inspect
(TreeInspector inspector) Examines the CloudFormation resource and discloses attributes.renderProperties
(Map<String, Object> props) void
setPolicyDocument
(Object value) An endpoint policy, which controls access to the service from the VPC.void
setPrivateDnsEnabled
(Boolean value) Indicate whether to associate a private hosted zone with the specified VPC.void
setPrivateDnsEnabled
(IResolvable value) Indicate whether to associate a private hosted zone with the specified VPC.void
setRouteTableIds
(List<String> value) The IDs of the route tables.void
setSecurityGroupIds
(List<String> value) The IDs of the security groups to associate with the endpoint network interfaces.void
setServiceName
(String value) The name of the endpoint service.void
setSubnetIds
(List<String> value) The IDs of the subnets in which to create endpoint network interfaces.void
setVpcEndpointType
(String value) The type of endpoint.void
The ID of the VPC.Methods inherited from class software.amazon.awscdk.core.CfnResource
addDeletionOverride, addDependsOn, addMetadata, addOverride, addPropertyDeletionOverride, addPropertyOverride, applyRemovalPolicy, applyRemovalPolicy, applyRemovalPolicy, getAtt, getCfnOptions, getCfnResourceType, getMetadata, getUpdatedProperites, isCfnResource, shouldSynthesize, toString, validateProperties
Methods inherited from class software.amazon.awscdk.core.CfnRefElement
getRef
Methods inherited from class software.amazon.awscdk.core.CfnElement
getCreationStack, getLogicalId, getStack, isCfnElement, overrideLogicalId
Methods inherited from class software.amazon.awscdk.core.Construct
getNode, isConstruct, onPrepare, onSynthesize, onValidate, prepare, synthesize, validate
Methods inherited from class software.amazon.jsii.JsiiObject
jsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSet
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods 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 Construct scope, @NotNull String id, @NotNull CfnVPCEndpointProps props) Create a newAWS::EC2::VPCEndpoint
.- Parameters:
scope
-- scope in which this resource is defined.
id
-- scoped id of the resource.
props
-- resource properties.
-
-
Method Details
-
inspect
Examines the CloudFormation resource and discloses attributes.- Specified by:
inspect
in interfaceIInspectable
- Parameters:
inspector
-- tree inspector to collect and process attributes.
-
renderProperties
@Stability(Stable) @NotNull protected Map<String,Object> renderProperties(@NotNull Map<String, Object> props) - Overrides:
renderProperties
in 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
PrivateDnsEnabled
orSubnetIds
properties, 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
PrivateDnsEnabled
orSubnetIds
properties, the items in this list might change. -
getCfnProperties
- Overrides:
getCfnProperties
in classCfnResource
-
getPolicyDocument
An endpoint policy, which controls access to the service from the VPC.The default endpoint policy allows full access to the service. Endpoint policies are supported only for gateway and interface endpoints.
For CloudFormation templates in YAML, you can provide the policy in JSON or YAML format. AWS CloudFormation converts YAML policies to JSON format before calling the API to create or modify the VPC endpoint.
-
setPolicyDocument
An endpoint policy, which controls access to the service from the VPC.The default endpoint policy allows full access to the service. Endpoint policies are supported only for gateway and interface endpoints.
For CloudFormation templates in YAML, you can provide the policy in JSON or YAML format. AWS CloudFormation converts YAML policies to JSON format before calling the API to create or modify the VPC endpoint.
-
getServiceName
The name of the endpoint service. -
setServiceName
The name of the endpoint service. -
getVpcId
The ID of the VPC. -
setVpcId
The ID of the VPC. -
getPrivateDnsEnabled
Indicate 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
andenableDnsSupport
.This property is supported only for interface endpoints.
Default:
false
-
setPrivateDnsEnabled
Indicate 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
andenableDnsSupport
.This property is supported only for interface endpoints.
Default:
false
-
setPrivateDnsEnabled
Indicate 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
andenableDnsSupport
.This property is supported only for interface endpoints.
Default:
false
-
getRouteTableIds
The IDs of the route tables.Routing is supported only for gateway endpoints.
-
setRouteTableIds
The IDs of the route tables.Routing is supported only for gateway endpoints.
-
getSecurityGroupIds
The IDs of the security groups to associate with the endpoint network interfaces.If this parameter is not specified, we use the default security group for the VPC. Security groups are supported only for interface endpoints.
-
setSecurityGroupIds
The IDs of the security groups to associate with the endpoint network interfaces.If this parameter is not specified, we use the default security group for the VPC. Security groups are supported only for interface endpoints.
-
getSubnetIds
The IDs of the subnets in which to create endpoint network interfaces.You must specify this property for an interface endpoint or a Gateway Load Balancer endpoint. You can't specify this property for a gateway endpoint. For a Gateway Load Balancer endpoint, you can specify only one subnet.
-
setSubnetIds
The IDs of the subnets in which to create endpoint network interfaces.You must specify this property for an interface endpoint or a Gateway Load Balancer endpoint. You can't specify this property for a gateway endpoint. For a Gateway Load Balancer endpoint, you can specify only one subnet.
-
getVpcEndpointType
The type of endpoint.Default: Gateway
-
setVpcEndpointType
The type of endpoint.Default: Gateway
-