Skip to content

EC2  >  Operations  >  create_vpc_endpoint

create_vpc_endpoint

Operation

create_vpc_endpoint async

create_vpc_endpoint(input: CreateVpcEndpointInput, plugins: list[Plugin] | None = None) -> CreateVpcEndpointOutput

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.

Parameters:

Name Type Description Default
input CreateVpcEndpointInput

An instance of CreateVpcEndpointInput.

required
plugins list[Plugin] | None

A list of callables that modify the configuration dynamically. Changes made by these plugins only apply for the duration of the operation execution and will not affect any other operation invocations.

None

Returns:

Type Description
CreateVpcEndpointOutput

An instance of CreateVpcEndpointOutput.

Input

CreateVpcEndpointInput dataclass

Bases: _SerdeShape

Dataclass for CreateVpcEndpointInput structure.

Attributes

client_token class-attribute instance-attribute
client_token: str | None = ...

Unique, case-sensitive identifier that you provide to ensure the idempotency of the request. For more information, see How to ensure idempotency.

dns_options class-attribute instance-attribute
dns_options: DnsOptionsSpecification | None = ...

The DNS options for the endpoint.

dry_run class-attribute instance-attribute
dry_run: bool | None = ...

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.

ip_address_type class-attribute instance-attribute
ip_address_type: str | None = ...

The IP address type for the endpoint.

policy_document class-attribute instance-attribute
policy_document: str | None = ...

(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.

private_dns_enabled class-attribute instance-attribute
private_dns_enabled: bool | None = ...

(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.

resource_configuration_arn class-attribute instance-attribute
resource_configuration_arn: str | None = ...

(Resource and Tunnel endpoints only) The Amazon Resource Name (ARN) of a resource configuration associated with the VPC endpoint. The type of resource configuration depends on the endpoint type:

  • For a Resource endpoint, you can specify a resource configuration that is of type SINGLE, GROUP, or ARN. To reach a resource that belongs to a group, specify the parent GROUP resource configuration.

  • For a Tunnel endpoint, you can specify a resource configuration that is of type CIDR.

For more information about the types of resource configurations, see Types of resource configurations in the Amazon Web Services PrivateLink User Guide.

This request fails if a VPC endpoint owned by a different Amazon Web Services account already exists on a resource gateway that is enabled for ResourceGatewayCharges payer responsibility.

route_table_ids class-attribute instance-attribute
route_table_ids: list[str] | None = ...

(Gateway endpoint) The route table IDs.

security_group_ids class-attribute instance-attribute
security_group_ids: list[str] | None = ...

(Interface, Resource, ServiceNetwork, and Tunnel endpoints only) 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.

service_name class-attribute instance-attribute
service_name: str | None = ...

The name of the endpoint service.

service_network_arn class-attribute instance-attribute
service_network_arn: str | None = ...

The Amazon Resource Name (ARN) of a service network that will be associated with the VPC endpoint of type service-network.

service_region class-attribute instance-attribute
service_region: str | None = ...

The Region where the service is hosted. The default is the current Region.

subnet_configurations class-attribute instance-attribute
subnet_configurations: list[SubnetConfiguration] | None = ...

The subnet configurations for the endpoint.

subnet_ids class-attribute instance-attribute
subnet_ids: list[str] | None = ...

(Interface, Gateway Load Balancer endpoints, Resource, ServiceNetwork, and Tunnel endpoints only) The IDs of the subnets in which to create endpoint network interfaces. For a Gateway Load Balancer endpoint, you can specify only one subnet. For a Tunnel endpoint, the subnets must be in the Availability Zones of the resource gateway associated with the shared resource configuration. An endpoint network interface is created only in an Availability Zone that the resource gateway is also in.

tag_specifications class-attribute instance-attribute
tag_specifications: list[TagSpecification] | None = ...

The tags to associate with the endpoint.

vpc_endpoint_type class-attribute instance-attribute
vpc_endpoint_type: str | None = ...

The type of endpoint.

For more information about the types of VPC endpoints, see VPC endpoints in the Amazon Web Services PrivateLink User Guide.

Default: Gateway

vpc_id class-attribute instance-attribute
vpc_id: str | None = ...

The ID of the VPC.

Output

CreateVpcEndpointOutput dataclass

Bases: _SerdeShape

Dataclass for CreateVpcEndpointOutput structure.

Attributes

client_token class-attribute instance-attribute
client_token: str | None = ...

Unique, case-sensitive identifier that you provide to ensure the idempotency of the request.

response_metadata class-attribute instance-attribute
response_metadata: ResponseMetadata = ...

Metadata about the response that produced this output. Use this to recover the request identifiers a service's support team needs in order to investigate a call. Members of the metadata are individually optional.

vpc_endpoint class-attribute instance-attribute
vpc_endpoint: VpcEndpoint | None = ...

Information about the endpoint.