Skip to main content

vpc_endpoints

Creates, updates, deletes, gets or lists a vpc_endpoints resource.

Overview

Namevpc_endpoints
TypeResource
Idaws.ec2.vpc_endpoints

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
creation_timestampstringThe date and time that the endpoint was created.
dns_entriesstring(Interface endpoint) The DNS entries for the endpoint.
dns_optionsstringThe DNS options for the endpoint.
failure_reasonstringReason for the failure.
groupsstring(Interface endpoint) Information about the security groups that are associated with the network interface.
ip_address_typestringThe IP address type for the endpoint.
ipv_4_prefixesstringArray of IPv4 prefixes.
ipv_6_prefixesstringArray of IPv6 prefixes.
last_errorstringThe last error that occurred for endpoint.
network_interface_idsstring(Interface endpoint) The network interfaces for the endpoint.
owner_idstringThe ID of the Amazon Web Services account that owns the endpoint.
payer_responsibilitiesstringThe payer responsibility settings for the endpoint.
policy_documentstringThe policy document associated with the endpoint, if applicable.
private_dns_enabledboolean(Interface endpoint) Indicates whether the VPC is associated with a private hosted zone.
requester_managedbooleanIndicates whether the endpoint is being managed by its service.
resource_configuration_arnstringThe Amazon Resource Name (ARN) of the resource configuration.
route_table_idsstring(Gateway endpoint) The IDs of the route tables associated with the endpoint.
service_namestringThe name of the service to which the endpoint is associated.
service_network_arnstringThe Amazon Resource Name (ARN) of the service network.
service_regionstringThe Region where the service is hosted.
statestringThe state of the endpoint.
subnet_idsstring(Interface endpoint) The subnets for the endpoint.
tagsstringThe tags assigned to the endpoint.
vpc_endpoint_idstringThe ID of the endpoint.
vpc_endpoint_typestringThe type of endpoint.
vpc_idstringThe ID of the VPC to which the endpoint is associated.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
describe_vpc_endpointsselectregionDryRun, VpcEndpointId, Filter, MaxResults, NextTokenDescribes your VPC endpoints. The default is to describe all your VPC endpoints. Alternatively, you can specify specific VPC endpoint IDs or filter the results to include only the VPC endpoints that match specific criteria.
create_vpc_endpointinsertVpcId, regionDryRun, VpcEndpointType, ServiceName, PolicyDocument, RouteTableId, SubnetId, SecurityGroupId, IpAddressType, DnsOptions, ClientToken, PrivateDnsEnabled, TagSpecification, SubnetConfiguration, ServiceNetworkArn, ResourceConfigurationArn, ServiceRegionCreates a VPC endpoint. A VPC endpoint provides a private connection between the specified VPC and the specified endpoint service. You can use an endpoint service provided by Amazon Web Services, an Amazon Web Services Marketplace Partner, or another Amazon Web Services account. For more information, see the Amazon Web Services PrivateLink User Guide.
modify_vpc_endpoint_payer_responsibilityupdateVpcEndpointId, PayerResponsibility, regionDryRun, ServiceId, ScopeModifies the billing account for VPC endpoint usage/charges.
modify_vpc_endpointupdateVpcEndpointId, regionDryRun, ResetPolicy, PolicyDocument, AddRouteTableId, RemoveRouteTableId, AddSubnetId, RemoveSubnetId, AddSecurityGroupId, RemoveSecurityGroupId, IpAddressType, DnsOptions, PrivateDnsEnabled, SubnetConfigurationModifies attributes of a specified VPC endpoint. The attributes that you can modify depend on the type of VPC endpoint (interface, gateway, or Gateway Load Balancer). For more information, see the Amazon Web Services PrivateLink Guide.
delete_vpc_endpointsdeleteVpcEndpointId, regionDryRunDeletes the specified VPC endpoints. When you delete a gateway endpoint, we delete the endpoint routes in the route tables for the endpoint. When you delete a Gateway Load Balancer endpoint, we delete its endpoint network interfaces. You can only delete Gateway Load Balancer endpoints when the routes that are associated with the endpoint are deleted. When you delete an interface endpoint, we delete its endpoint network interfaces.

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
PayerResponsibilitystringThe Amazon Web Services account to which the usage of VPC endpoint is charged.
VpcEndpointIdarrayThe IDs of the VPC endpoints.
VpcIdstringThe ID of the VPC.
regionstringAWS region (default: us-east-1)
AddRouteTableIdarray(Gateway endpoint) The IDs of the route tables to associate with the endpoint.
AddSecurityGroupIdarray(Interface endpoint) The IDs of the security groups to associate with the endpoint network interfaces.
AddSubnetIdarray(Interface and Gateway Load Balancer endpoints) The IDs of the subnets in which to serve the endpoint. For a Gateway Load Balancer endpoint, you can specify only one subnet.
ClientTokenstringUnique, case-sensitive identifier that you provide to ensure the idempotency of the request. For more information, see How to ensure idempotency.
DnsOptionsobjectThe DNS options for the endpoint.
DryRunbooleanChecks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation. Otherwise, it is UnauthorizedOperation.
FilterarrayThe filters. ip-address-type - The IP address type (ipv4 | ipv6). service-name - The name of the service. service-region - The Region of the service. tag:<key> - The key/value combination of a tag assigned to the resource. Use the tag key in the filter name and the tag value as the filter value. For example, to find all resources that have a tag with the key Owner and the value TeamA, specify tag:Owner for the filter name and TeamA for the filter value. tag-key - The key of a tag assigned to the resource. Use this filter to find all resources assigned a tag with a specific key, regardless of the tag value. vpc-id - The ID of the VPC in which the endpoint resides. vpc-endpoint-id - The ID of the endpoint. vpc-endpoint-state - The state of the endpoint (pendingAcceptance | pending | available | deleting | deleted | rejected | failed). vpc-endpoint-type - The type of VPC endpoint (Interface | Gateway | GatewayLoadBalancer | Resource | ServiceNetwork).
IpAddressTypestringThe IP address type for the endpoint.
MaxResultsintegerThe maximum number of items to return for this request. The request returns a token that you can specify in a subsequent call to get the next set of results. Constraint: If the value is greater than 1,000, we return only 1,000 items.
NextTokenstringThe token for the next set of items to return. (You received this token from a prior call.)
PolicyDocumentstring(Interface and gateway endpoints) A policy to attach to the endpoint that controls access to the service. The policy must be in valid JSON format.
PrivateDnsEnabledboolean(Interface endpoint) Indicates whether a private hosted zone is associated with the VPC.
RemoveRouteTableIdarray(Gateway endpoint) The IDs of the route tables to disassociate from the endpoint.
RemoveSecurityGroupIdarray(Interface endpoint) The IDs of the security groups to disassociate from the endpoint network interfaces.
RemoveSubnetIdarray(Interface endpoint) The IDs of the subnets from which to remove the endpoint.
ResetPolicyboolean(Gateway endpoint) Specify true to reset the policy document to the default policy. The default policy allows full access to the service.
ResourceConfigurationArnstringThe Amazon Resource Name (ARN) of a resource configuration that will be associated with the VPC endpoint of type resource.
RouteTableIdarray(Gateway endpoint) The route table IDs.
ScopestringThe scope of usage/charges for which the billing account is being modified.
SecurityGroupIdarray(Interface endpoint) 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.
ServiceIdstringThe ID of the VPC endpoint service.
ServiceNamestringThe name of the endpoint service.
ServiceNetworkArnstringThe Amazon Resource Name (ARN) of a service network that will be associated with the VPC endpoint of type service-network.
ServiceRegionstringThe Region where the service is hosted. The default is the current Region.
SubnetConfigurationarrayThe subnet configurations for the endpoint.
SubnetIdarray(Interface and Gateway Load Balancer endpoints) The IDs of the subnets in which to create endpoint network interfaces. For a Gateway Load Balancer endpoint, you can specify only one subnet.
TagSpecificationarrayThe tags to associate with the endpoint.
VpcEndpointIdarrayThe IDs of the VPC endpoints.
VpcEndpointTypestringThe type of endpoint. Default: Gateway

SELECT examples

Describes your VPC endpoints. The default is to describe all your VPC endpoints. Alternatively, you can specify specific VPC endpoint IDs or filter the results to include only the VPC endpoints that match specific criteria.

SELECT
creation_timestamp,
dns_entries,
dns_options,
failure_reason,
groups,
ip_address_type,
ipv_4_prefixes,
ipv_6_prefixes,
last_error,
network_interface_ids,
owner_id,
payer_responsibilities,
policy_document,
private_dns_enabled,
requester_managed,
resource_configuration_arn,
route_table_ids,
service_name,
service_network_arn,
service_region,
state,
subnet_ids,
tags,
vpc_endpoint_id,
vpc_endpoint_type,
vpc_id
FROM aws.ec2.vpc_endpoints
WHERE region = '{{ region }}' -- required
AND DryRun = '{{ DryRun }}'
AND VpcEndpointId = '{{ VpcEndpointId }}'
AND Filter = '{{ Filter }}'
AND MaxResults = '{{ MaxResults }}'
AND NextToken = '{{ NextToken }}'
;

INSERT examples

Creates a VPC endpoint. A VPC endpoint provides a private connection between the specified VPC and the specified endpoint service. You can use an endpoint service provided by Amazon Web Services, an Amazon Web Services Marketplace Partner, or another Amazon Web Services account. For more information, see the Amazon Web Services PrivateLink User Guide.

INSERT INTO aws.ec2.vpc_endpoints (
VpcId,
region,
DryRun,
VpcEndpointType,
ServiceName,
PolicyDocument,
RouteTableId,
SubnetId,
SecurityGroupId,
IpAddressType,
DnsOptions,
ClientToken,
PrivateDnsEnabled,
TagSpecification,
SubnetConfiguration,
ServiceNetworkArn,
ResourceConfigurationArn,
ServiceRegion
)
SELECT
'{{ VpcId }}',
'{{ region }}',
'{{ DryRun }}',
'{{ VpcEndpointType }}',
'{{ ServiceName }}',
'{{ PolicyDocument }}',
'{{ RouteTableId }}',
'{{ SubnetId }}',
'{{ SecurityGroupId }}',
'{{ IpAddressType }}',
'{{ DnsOptions }}',
'{{ ClientToken }}',
'{{ PrivateDnsEnabled }}',
'{{ TagSpecification }}',
'{{ SubnetConfiguration }}',
'{{ ServiceNetworkArn }}',
'{{ ResourceConfigurationArn }}',
'{{ ServiceRegion }}'
RETURNING
creation_timestamp,
dns_entries,
dns_options,
failure_reason,
groups,
ip_address_type,
ipv_4_prefixes,
ipv_6_prefixes,
last_error,
network_interface_ids,
owner_id,
payer_responsibilities,
policy_document,
private_dns_enabled,
requester_managed,
resource_configuration_arn,
route_table_ids,
service_name,
service_network_arn,
service_region,
state,
subnet_ids,
tags,
vpc_endpoint_id,
vpc_endpoint_type,
vpc_id
;

UPDATE examples

Modifies the billing account for VPC endpoint usage/charges.

UPDATE aws.ec2.vpc_endpoints
SET
-- No updatable properties
WHERE
VpcEndpointId = '{{ VpcEndpointId }}' --required
AND PayerResponsibility = '{{ PayerResponsibility }}' --required
AND region = '{{ region }}' --required
AND DryRun = {{ DryRun}}
AND ServiceId = '{{ ServiceId}}'
AND Scope = '{{ Scope}}'
RETURNING
payer_responsibilities,
vpc_endpoint_id;

DELETE examples

Deletes the specified VPC endpoints. When you delete a gateway endpoint, we delete the endpoint routes in the route tables for the endpoint. When you delete a Gateway Load Balancer endpoint, we delete its endpoint network interfaces. You can only delete Gateway Load Balancer endpoints when the routes that are associated with the endpoint are deleted. When you delete an interface endpoint, we delete its endpoint network interfaces.

DELETE FROM aws.ec2.vpc_endpoints
WHERE VpcEndpointId = '{{ VpcEndpointId }}' --required
AND region = '{{ region }}' --required
AND DryRun = '{{ DryRun }}'
;