vpc_endpoints
Creates, updates, deletes or gets a vpc_endpoint
resource or lists vpc_endpoints
in a region
Overview
Name | vpc_endpoints |
Type | Resource |
Description | 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 MKT Partner, or another AWS accounts in your organization. For more information, see the [User Guide](https://docs.aws.amazon.com/vpc/latest/privatelink/). 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 S3 or DDB. 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 S3, see [W |
Id | aws.ec2.vpc_endpoints |
Fields
Name | Datatype | Description |
---|---|---|
id | string | |
creation_timestamp | string | |
dns_entries | array | |
network_interface_ids | array | |
policy_document | object | 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. CFNlong converts YAML policies to JSON format before calling the API to create or modify the VPC endpoint. |
private_dns_enabled | boolean | 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 and enableDnsSupport .This property is supported only for interface endpoints. Default: false |
route_table_ids | array | The IDs of the route tables. Routing is supported only for gateway endpoints. |
security_group_ids | array | 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. |
service_name | string | The name of the endpoint service. |
subnet_ids | array | 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. |
vpc_endpoint_type | string | The type of endpoint. Default: Gateway |
vpc_id | string | The ID of the VPC. |
region | string | AWS region. |
Methods
Name | Accessible by | Required Params |
---|---|---|
create_resource | INSERT | VpcId, ServiceName, region |
delete_resource | DELETE | data__Identifier, region |
update_resource | UPDATE | data__Identifier, data__PatchDocument, region |
list_resources | SELECT | region |
get_resource | SELECT | data__Identifier, region |
SELECT
examples
Gets all vpc_endpoints
in a region.
SELECT
region,
id,
creation_timestamp,
dns_entries,
network_interface_ids,
policy_document,
private_dns_enabled,
route_table_ids,
security_group_ids,
service_name,
subnet_ids,
vpc_endpoint_type,
vpc_id
FROM aws.ec2.vpc_endpoints
WHERE region = 'us-east-1';
Gets all properties from an individual vpc_endpoint
.
SELECT
region,
id,
creation_timestamp,
dns_entries,
network_interface_ids,
policy_document,
private_dns_enabled,
route_table_ids,
security_group_ids,
service_name,
subnet_ids,
vpc_endpoint_type,
vpc_id
FROM aws.ec2.vpc_endpoints
WHERE region = 'us-east-1' AND data__Identifier = '<Id>';
INSERT
example
Use the following StackQL query and manifest file to create a new vpc_endpoint
resource, using stack-deploy
.
- Required Properties
- All Properties
- Manifest
/*+ create */
INSERT INTO aws.ec2.vpc_endpoints (
ServiceName,
VpcId,
region
)
SELECT
'{{ ServiceName }}',
'{{ VpcId }}',
'{{ region }}';
/*+ create */
INSERT INTO aws.ec2.vpc_endpoints (
PolicyDocument,
PrivateDnsEnabled,
RouteTableIds,
SecurityGroupIds,
ServiceName,
SubnetIds,
VpcEndpointType,
VpcId,
region
)
SELECT
'{{ PolicyDocument }}',
'{{ PrivateDnsEnabled }}',
'{{ RouteTableIds }}',
'{{ SecurityGroupIds }}',
'{{ ServiceName }}',
'{{ SubnetIds }}',
'{{ VpcEndpointType }}',
'{{ VpcId }}',
'{{ region }}';
version: 1
name: stack name
description: stack description
providers:
- aws
globals:
- name: region
value: '{{ vars.AWS_REGION }}'
resources:
- name: vpc_endpoint
props:
- name: PolicyDocument
value: {}
- name: PrivateDnsEnabled
value: '{{ PrivateDnsEnabled }}'
- name: RouteTableIds
value:
- '{{ RouteTableIds[0] }}'
- name: SecurityGroupIds
value:
- '{{ SecurityGroupIds[0] }}'
- name: ServiceName
value: '{{ ServiceName }}'
- name: SubnetIds
value:
- '{{ SubnetIds[0] }}'
- name: VpcEndpointType
value: '{{ VpcEndpointType }}'
- name: VpcId
value: '{{ VpcId }}'
DELETE
example
/*+ delete */
DELETE FROM aws.ec2.vpc_endpoints
WHERE data__Identifier = '<Id>'
AND region = 'us-east-1';
Permissions
To operate on the vpc_endpoints
resource, the following permissions are required:
Create
ec2:CreateVpcEndpoint,
ec2:DescribeVpcEndpoints
Read
ec2:DescribeVpcEndpoints
Update
ec2:ModifyVpcEndpoint,
ec2:DescribeVpcEndpoints
Delete
ec2:DeleteVpcEndpoints,
ec2:DescribeVpcEndpoints
List
ec2:DescribeVpcEndpoints