vpc_endpoints
Creates, updates, deletes, gets or lists a vpc_endpoints resource.
Overview
| Name | vpc_endpoints |
| Type | Resource |
| Id | aws.ec2.vpc_endpoints |
Fields
The following fields are returned by SELECT queries:
- describe_vpc_endpoints
| Name | Datatype | Description |
|---|---|---|
creation_timestamp | string | The date and time that the endpoint was created. |
dns_entries | string | (Interface endpoint) The DNS entries for the endpoint. |
dns_options | string | The DNS options for the endpoint. |
failure_reason | string | Reason for the failure. |
groups | string | (Interface endpoint) Information about the security groups that are associated with the network interface. |
ip_address_type | string | The IP address type for the endpoint. |
ipv_4_prefixes | string | Array of IPv4 prefixes. |
ipv_6_prefixes | string | Array of IPv6 prefixes. |
last_error | string | The last error that occurred for endpoint. |
network_interface_ids | string | (Interface endpoint) The network interfaces for the endpoint. |
owner_id | string | The ID of the Amazon Web Services account that owns the endpoint. |
payer_responsibilities | string | The payer responsibility settings for the endpoint. |
policy_document | string | The policy document associated with the endpoint, if applicable. |
private_dns_enabled | boolean | (Interface endpoint) Indicates whether the VPC is associated with a private hosted zone. |
requester_managed | boolean | Indicates whether the endpoint is being managed by its service. |
resource_configuration_arn | string | The Amazon Resource Name (ARN) of the resource configuration. |
route_table_ids | string | (Gateway endpoint) The IDs of the route tables associated with the endpoint. |
service_name | string | The name of the service to which the endpoint is associated. |
service_network_arn | string | The Amazon Resource Name (ARN) of the service network. |
service_region | string | The Region where the service is hosted. |
state | string | The state of the endpoint. |
subnet_ids | string | (Interface endpoint) The subnets for the endpoint. |
tags | string | The tags assigned to the endpoint. |
vpc_endpoint_id | string | The ID of the endpoint. |
vpc_endpoint_type | string | The type of endpoint. |
vpc_id | string | The ID of the VPC to which the endpoint is associated. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
describe_vpc_endpoints | select | region | DryRun, VpcEndpointId, Filter, MaxResults, NextToken | 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. |
create_vpc_endpoint | insert | VpcId, region | DryRun, VpcEndpointType, ServiceName, PolicyDocument, RouteTableId, SubnetId, SecurityGroupId, IpAddressType, DnsOptions, ClientToken, PrivateDnsEnabled, TagSpecification, SubnetConfiguration, ServiceNetworkArn, ResourceConfigurationArn, ServiceRegion | 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. |
modify_vpc_endpoint_payer_responsibility | update | VpcEndpointId, PayerResponsibility, region | DryRun, ServiceId, Scope | Modifies the billing account for VPC endpoint usage/charges. |
modify_vpc_endpoint | update | VpcEndpointId, region | DryRun, ResetPolicy, PolicyDocument, AddRouteTableId, RemoveRouteTableId, AddSubnetId, RemoveSubnetId, AddSecurityGroupId, RemoveSecurityGroupId, IpAddressType, DnsOptions, PrivateDnsEnabled, SubnetConfiguration | Modifies 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_endpoints | delete | VpcEndpointId, region | DryRun | 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. |
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.
| Name | Datatype | Description |
|---|---|---|
PayerResponsibility | string | The Amazon Web Services account to which the usage of VPC endpoint is charged. |
VpcEndpointId | array | The IDs of the VPC endpoints. |
VpcId | string | The ID of the VPC. |
region | string | AWS region (default: us-east-1) |
AddRouteTableId | array | (Gateway endpoint) The IDs of the route tables to associate with the endpoint. |
AddSecurityGroupId | array | (Interface endpoint) The IDs of the security groups to associate with the endpoint network interfaces. |
AddSubnetId | array | (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. |
ClientToken | string | Unique, case-sensitive identifier that you provide to ensure the idempotency of the request. For more information, see How to ensure idempotency. |
DnsOptions | object | The DNS options for the endpoint. |
DryRun | boolean | Checks 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. |
Filter | array | The 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). |
IpAddressType | string | The IP address type for the endpoint. |
MaxResults | integer | The 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. |
NextToken | string | The token for the next set of items to return. (You received this token from a prior call.) |
PolicyDocument | string | (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. |
PrivateDnsEnabled | boolean | (Interface endpoint) Indicates whether a private hosted zone is associated with the VPC. |
RemoveRouteTableId | array | (Gateway endpoint) The IDs of the route tables to disassociate from the endpoint. |
RemoveSecurityGroupId | array | (Interface endpoint) The IDs of the security groups to disassociate from the endpoint network interfaces. |
RemoveSubnetId | array | (Interface endpoint) The IDs of the subnets from which to remove the endpoint. |
ResetPolicy | boolean | (Gateway endpoint) Specify true to reset the policy document to the default policy. The default policy allows full access to the service. |
ResourceConfigurationArn | string | The Amazon Resource Name (ARN) of a resource configuration that will be associated with the VPC endpoint of type resource. |
RouteTableId | array | (Gateway endpoint) The route table IDs. |
Scope | string | The scope of usage/charges for which the billing account is being modified. |
SecurityGroupId | array | (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. |
ServiceId | string | The ID of the VPC endpoint service. |
ServiceName | string | The name of the endpoint service. |
ServiceNetworkArn | string | The Amazon Resource Name (ARN) of a service network that will be associated with the VPC endpoint of type service-network. |
ServiceRegion | string | The Region where the service is hosted. The default is the current Region. |
SubnetConfiguration | array | The subnet configurations for the endpoint. |
SubnetId | array | (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. |
TagSpecification | array | The tags to associate with the endpoint. |
VpcEndpointId | array | The IDs of the VPC endpoints. |
VpcEndpointType | string | The type of endpoint. Default: Gateway |
SELECT examples
- describe_vpc_endpoints
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
- create_vpc_endpoint
- Manifest
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
;
# Description fields are for documentation purposes
- name: vpc_endpoints
props:
- name: VpcId
value: "{{ VpcId }}"
description: Required parameter for the vpc_endpoints resource.
- name: region
value: "{{ region }}"
description: Required parameter for the vpc_endpoints resource.
- name: DryRun
value: {{ DryRun }}
description: Checks 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.
description: Checks 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.
- name: VpcEndpointType
value: "{{ VpcEndpointType }}"
description: The type of endpoint. Default: Gateway
description: The type of endpoint. Default: Gateway
- name: ServiceName
value: "{{ ServiceName }}"
description: The name of the endpoint service.
description: The name of the endpoint service.
- name: PolicyDocument
value: "{{ PolicyDocument }}"
description: (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. If this parameter is not specified, we attach a default policy that allows full access to the service.
description: (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. If this parameter is not specified, we attach a default policy that allows full access to the service.
- name: RouteTableId
value: "{{ RouteTableId }}"
description: (Gateway endpoint) The route table IDs.
description: (Gateway endpoint) The route table IDs.
- name: SubnetId
value: "{{ SubnetId }}"
description: (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.
description: (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.
- name: SecurityGroupId
value: "{{ SecurityGroupId }}"
description: (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.
description: (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.
- name: IpAddressType
value: "{{ IpAddressType }}"
description: The IP address type for the endpoint.
description: The IP address type for the endpoint.
- name: DnsOptions
value: "{{ DnsOptions }}"
description: The DNS options for the endpoint.
description: The DNS options for the endpoint.
- name: ClientToken
value: "{{ ClientToken }}"
description: Unique, case-sensitive identifier that you provide to ensure the idempotency of the request. For more information, see How to ensure idempotency.
description: Unique, case-sensitive identifier that you provide to ensure the idempotency of the request. For more information, see How to ensure idempotency.
- name: PrivateDnsEnabled
value: {{ PrivateDnsEnabled }}
description: (Interface endpoint) Indicates 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. Use ModifyVpcAttribute to set the VPC attributes.
description: (Interface endpoint) Indicates 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. Use ModifyVpcAttribute to set the VPC attributes.
- name: TagSpecification
value: "{{ TagSpecification }}"
description: The tags to associate with the endpoint.
description: The tags to associate with the endpoint.
- name: SubnetConfiguration
value: "{{ SubnetConfiguration }}"
description: The subnet configurations for the endpoint.
description: The subnet configurations for the endpoint.
- name: ServiceNetworkArn
value: "{{ ServiceNetworkArn }}"
description: The Amazon Resource Name (ARN) of a service network that will be associated with the VPC endpoint of type service-network.
description: The Amazon Resource Name (ARN) of a service network that will be associated with the VPC endpoint of type service-network.
- name: ResourceConfigurationArn
value: "{{ ResourceConfigurationArn }}"
description: The Amazon Resource Name (ARN) of a resource configuration that will be associated with the VPC endpoint of type resource.
description: The Amazon Resource Name (ARN) of a resource configuration that will be associated with the VPC endpoint of type resource.
- name: ServiceRegion
value: "{{ ServiceRegion }}"
description: The Region where the service is hosted. The default is the current Region.
description: The Region where the service is hosted. The default is the current Region.
UPDATE examples
- modify_vpc_endpoint_payer_responsibility
- modify_vpc_endpoint
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;
Modifies 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.
UPDATE aws.ec2.vpc_endpoints
SET
-- No updatable properties
WHERE
VpcEndpointId = '{{ VpcEndpointId }}' --required
AND region = '{{ region }}' --required
AND DryRun = {{ DryRun}}
AND ResetPolicy = {{ ResetPolicy}}
AND PolicyDocument = '{{ PolicyDocument}}'
AND AddRouteTableId = '{{ AddRouteTableId}}'
AND RemoveRouteTableId = '{{ RemoveRouteTableId}}'
AND AddSubnetId = '{{ AddSubnetId}}'
AND RemoveSubnetId = '{{ RemoveSubnetId}}'
AND AddSecurityGroupId = '{{ AddSecurityGroupId}}'
AND RemoveSecurityGroupId = '{{ RemoveSecurityGroupId}}'
AND IpAddressType = '{{ IpAddressType}}'
AND DnsOptions = '{{ DnsOptions}}'
AND PrivateDnsEnabled = {{ PrivateDnsEnabled}}
AND SubnetConfiguration = '{{ SubnetConfiguration}}'
RETURNING
return;
DELETE examples
- delete_vpc_endpoints
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 }}'
;