create_vpc_endpoint
async
¶
create_vpc_endpoint(
*,
config_overrides: Optional[AsyncEC2ClientConfig] = 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/async_ec2.py
15000 15001 15002 15003 15004 15005 15006 15007 15008 15009 15010 15011 15012 15013 15014 15015 15016 15017 15018 15019 15020 15021 15022 15023 15024 15025 15026 15027 15028 15029 15030 15031 15032 15033 15034 15035 15036 15037 15038 15039 15040 15041 15042 15043 15044 15045 15046 15047 15048 15049 15050 15051 15052 15053 15054 15055 15056 15057 15058 15059 15060 15061 15062 15063 15064 15065 15066 15067 15068 15069 15070 15071 15072 15073 15074 15075 15076 15077 15078 15079 15080 15081 15082 15083 15084 15085 15086 15087 15088 15089 15090 15091 15092 15093 15094 15095 15096 15097 15098 15099 15100 15101 15102 15103 15104 15105 15106 15107 15108 15109 15110 15111 15112 15113 15114 15115 15116 15117 15118 15119 15120 15121 15122 15123 15124 15125 15126 15127 | |