create_vpc_endpoint
¶
create_vpc_endpoint(
*,
config_overrides: Optional[EC2ClientConfig] = None,
dry_run: Optional[Boolean] = None,
vpc_endpoint_type: Optional[VpcEndpointType] = None,
vpc_id: Optional[VpcId] = None,
service_name: Optional[String] = None,
policy_document: Optional[String] = None,
route_table_ids: Optional[VpcEndpointRouteTableIdList] = None,
subnet_ids: Optional[VpcEndpointSubnetIdList] = None,
security_group_ids: Optional[VpcEndpointSecurityGroupIdList] = None,
ip_address_type: Optional[IpAddressType] = None,
dns_options: Optional[DnsOptionsSpecification] = None,
client_token: Optional[String] = None,
private_dns_enabled: Optional[Boolean] = None,
tag_specifications: Optional[TagSpecificationList] = None,
subnet_configurations: Optional[SubnetConfigurationsList] = None,
service_network_arn: Optional[ServiceNetworkArn] = None,
resource_configuration_arn: Optional[ResourceConfigurationArn] = None,
service_region: Optional[String] = None,
) -> CreateVpcEndpointResult
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:
-
dry_run(Optional[Boolean], default: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 isUnauthorizedOperation. -
vpc_endpoint_type(Optional[VpcEndpointType], default: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(Optional[VpcId], default:None) –The ID of the VPC.
-
service_name(Optional[String], default:None) –The name of the endpoint service.
-
policy_document(Optional[String], default: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.
-
route_table_ids(Optional[VpcEndpointRouteTableIdList], default:None) –(Gateway endpoint) The route table IDs.
-
subnet_ids(Optional[VpcEndpointSubnetIdList], default: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
Tunnelendpoint, 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. -
security_group_ids(Optional[VpcEndpointSecurityGroupIdList], default: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.
-
ip_address_type(Optional[IpAddressType], default:None) –The IP address type for the endpoint.
-
dns_options(Optional[DnsOptionsSpecification], default:None) –The DNS options for the endpoint.
-
client_token(Optional[String], default:None) –Unique, case-sensitive identifier that you provide to ensure the idempotency of the request. For more information, see How to ensure idempotency.
-
private_dns_enabled(Optional[Boolean], default: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:enableDnsHostnamesandenableDnsSupport. Use ModifyVpcAttribute to set the VPC attributes. -
tag_specifications(Optional[TagSpecificationList], default:None) –The tags to associate with the endpoint.
-
subnet_configurations(Optional[SubnetConfigurationsList], default:None) –The subnet configurations for the endpoint.
-
service_network_arn(Optional[ServiceNetworkArn], default:None) –The Amazon Resource Name (ARN) of a service network that will be associated with the VPC endpoint of type service-network.
-
resource_configuration_arn(Optional[ResourceConfigurationArn], default: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, orARN. To reach a resource that belongs to a group, specify the parentGROUPresource 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
ResourceGatewayChargespayer responsibility. -
-
service_region(Optional[String], default:None) –The Region where the service is hosted. The default is the current Region.
Raises:
-
UnknownServiceError–The service returned an error code this client does not model.
Source code in docs_src/capo_ec2/_services/ec2.py
14820 14821 14822 14823 14824 14825 14826 14827 14828 14829 14830 14831 14832 14833 14834 14835 14836 14837 14838 14839 14840 14841 14842 14843 14844 14845 14846 14847 14848 14849 14850 14851 14852 14853 14854 14855 14856 14857 14858 14859 14860 14861 14862 14863 14864 14865 14866 14867 14868 14869 14870 14871 14872 14873 14874 14875 14876 14877 14878 14879 14880 14881 14882 14883 14884 14885 14886 14887 14888 14889 14890 14891 14892 14893 14894 14895 14896 14897 14898 14899 14900 14901 14902 14903 14904 14905 14906 14907 14908 14909 14910 14911 14912 14913 14914 14915 14916 14917 14918 14919 14920 14921 14922 14923 14924 14925 14926 14927 14928 14929 14930 14931 14932 14933 14934 14935 14936 14937 14938 14939 14940 14941 14942 14943 14944 14945 14946 | |