@Generated(value="jsii-pacmak/1.50.0 (build d1830a4)", date="2022-01-04T15:39:06.363Z") @Stability(value=Stable) public class CfnVPCEndpoint extends CfnResource implements IInspectable
Specifies a VPC endpoint for a service. An endpoint enables you to create a private connection between your VPC and the service. The service may be provided by AWS , an AWS Marketplace Partner, or another AWS account. For more information, see VPC Endpoints in the AWS PrivateLink User Guide .
A gateway endpoint serves as a target for a route in your route table for traffic destined for the AWS service. You can specify an endpoint policy to attach to the endpoint, which controls access to the service from your VPC. You can also specify the VPC route tables that use the endpoint.
For information about connectivity when you use a gateway endpoint to connect to an Amazon S3 bucket from an EC2 instance, see Why can’t I connect to an S3 bucket using a gateway VPC endpoint .
An interface endpoint is a network interface in your subnet that serves as an endpoint for communicating with the specified service. You can specify the subnets in which to create an endpoint, and the security groups to associate with the endpoint network interface.
A GatewayLoadBalancer endpoint is a network interface in your subnet that serves an endpoint for communicating with a Gateway Load Balancer that you've configured as a VPC endpoint service.
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();
| Modifier and Type | Class and Description |
|---|---|
static class |
CfnVPCEndpoint.Builder
A fluent builder for
CfnVPCEndpoint. |
software.amazon.jsii.JsiiObject.InitializationModeIInspectable.Jsii$Default, IInspectable.Jsii$ProxyIConstruct.Jsii$Default| Modifier and Type | Field and Description |
|---|---|
static String |
CFN_RESOURCE_TYPE_NAME
The CloudFormation resource type name for this resource class.
|
| Modifier | Constructor and Description |
|---|---|
|
CfnVPCEndpoint(Construct scope,
String id,
CfnVPCEndpointProps props)
Create a new `AWS::EC2::VPCEndpoint`.
|
protected |
CfnVPCEndpoint(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) |
protected |
CfnVPCEndpoint(software.amazon.jsii.JsiiObjectRef objRef) |
| Modifier and Type | Method and Description |
|---|---|
String |
getAttrCreationTimestamp()
The date and time the VPC endpoint was created.
|
List<String> |
getAttrDnsEntries()
(Interface endpoint) The DNS entries for the endpoint.
|
List<String> |
getAttrNetworkInterfaceIds()
(Interface endpoint) One or more network interface IDs.
|
protected Map<String,Object> |
getCfnProperties() |
Object |
getPolicyDocument()
(Interface and gateway endpoints) A policy to attach to the endpoint that controls access to the service.
|
Object |
getPrivateDnsEnabled()
(Interface endpoint) Indicate whether to associate a private hosted zone with the specified VPC.
|
List<String> |
getRouteTableIds()
(Gateway endpoint) One or more route table IDs.
|
List<String> |
getSecurityGroupIds()
(Interface endpoint) The ID of one or more security groups to associate with the endpoint network interface.
|
String |
getServiceName()
The service name.
|
List<String> |
getSubnetIds()
(Interface and Gateway Load Balancer endpoints) The ID of one or more subnets in which to create an endpoint network interface.
|
String |
getVpcEndpointType()
The type of endpoint.
|
String |
getVpcId()
The ID of the VPC in which the endpoint will be used.
|
void |
inspect(TreeInspector inspector)
Examines the CloudFormation resource and discloses attributes.
|
protected Map<String,Object> |
renderProperties(Map<String,Object> props) |
void |
setPolicyDocument(Object value)
(Interface and gateway endpoints) A policy to attach to the endpoint that controls access to the service.
|
void |
setPrivateDnsEnabled(Boolean value)
(Interface endpoint) Indicate whether to associate a private hosted zone with the specified VPC.
|
void |
setPrivateDnsEnabled(IResolvable value)
(Interface endpoint) Indicate whether to associate a private hosted zone with the specified VPC.
|
void |
setRouteTableIds(List<String> value)
(Gateway endpoint) One or more route table IDs.
|
void |
setSecurityGroupIds(List<String> value)
(Interface endpoint) The ID of one or more security groups to associate with the endpoint network interface.
|
void |
setServiceName(String value)
The service name.
|
void |
setSubnetIds(List<String> value)
(Interface and Gateway Load Balancer endpoints) The ID of one or more subnets in which to create an endpoint network interface.
|
void |
setVpcEndpointType(String value)
The type of endpoint.
|
void |
setVpcId(String value)
The ID of the VPC in which the endpoint will be used.
|
addDeletionOverride, addDependsOn, addMetadata, addOverride, addPropertyDeletionOverride, addPropertyOverride, applyRemovalPolicy, applyRemovalPolicy, applyRemovalPolicy, getAtt, getCfnOptions, getCfnResourceType, getMetadata, getUpdatedProperites, isCfnResource, shouldSynthesize, toString, validatePropertiesgetRefgetCreationStack, getLogicalId, getStack, isCfnElement, overrideLogicalIdgetNode, isConstruct, onPrepare, onSynthesize, onValidate, prepare, synthesize, validatejsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSet@Stability(value=Stable) public static final String CFN_RESOURCE_TYPE_NAME
protected CfnVPCEndpoint(software.amazon.jsii.JsiiObjectRef objRef)
protected CfnVPCEndpoint(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
@Stability(value=Stable)
public CfnVPCEndpoint(@NotNull
Construct scope,
@NotNull
String id,
@NotNull
CfnVPCEndpointProps props)
scope - - scope in which this resource is defined. This parameter is required.id - - scoped id of the resource. This parameter is required.props - - resource properties. This parameter is required.@Stability(value=Stable)
public void inspect(@NotNull
TreeInspector inspector)
inspect in interface IInspectableinspector - - tree inspector to collect and process attributes. This parameter is required.@Stability(value=Stable) @NotNull protected Map<String,Object> renderProperties(@NotNull Map<String,Object> props)
renderProperties in class CfnResourceprops - This parameter is required.@Stability(value=Stable) @NotNull public String getAttrCreationTimestamp()
For example: Fri Sep 28 23:34:36 UTC 2018.
@Stability(value=Stable) @NotNull public List<String> getAttrDnsEntries()
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.
@Stability(value=Stable) @NotNull public List<String> getAttrNetworkInterfaceIds()
If you update the PrivateDnsEnabled or SubnetIds properties, the items in this list might change.
@Stability(value=Stable) @NotNull protected Map<String,Object> getCfnProperties()
getCfnProperties in class CfnResource@Stability(value=Stable) @NotNull public Object getPolicyDocument()
If this parameter is not specified, we attach a default policy that allows full access to the service.
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.
@Stability(value=Stable)
public void setPolicyDocument(@NotNull
Object value)
If this parameter is not specified, we attach a default policy that allows full access to the service.
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.
@Stability(value=Stable) @NotNull public String getServiceName()
To get a list of available services, use the DescribeVpcEndpointServices request, or get the name from the service provider.
@Stability(value=Stable)
public void setServiceName(@NotNull
String value)
To get a list of available services, use the DescribeVpcEndpointServices request, or get the name from the service provider.
@Stability(value=Stable) @NotNull public String getVpcId()
@Stability(value=Stable)
public void setVpcId(@NotNull
String value)
@Stability(value=Stable) @Nullable public Object getPrivateDnsEnabled()
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 .
Default: false
@Stability(value=Stable)
public void setPrivateDnsEnabled(@Nullable
Boolean value)
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 .
Default: false
@Stability(value=Stable)
public void setPrivateDnsEnabled(@Nullable
IResolvable value)
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 .
Default: false
@Stability(value=Stable) @Nullable public List<String> getRouteTableIds()
@Stability(value=Stable)
public void setRouteTableIds(@Nullable
List<String> value)
@Stability(value=Stable) @Nullable public List<String> getSecurityGroupIds()
@Stability(value=Stable)
public void setSecurityGroupIds(@Nullable
List<String> value)
@Stability(value=Stable) @Nullable public List<String> getSubnetIds()
For a Gateway Load Balancer endpoint, you can specify one subnet only.
@Stability(value=Stable)
public void setSubnetIds(@Nullable
List<String> value)
For a Gateway Load Balancer endpoint, you can specify one subnet only.
@Stability(value=Stable) @Nullable public String getVpcEndpointType()
Default: Gateway
@Stability(value=Stable)
public void setVpcEndpointType(@Nullable
String value)
Default: Gateway
Copyright © 2022. All rights reserved.