Creates a VPC endpoint¶
Description¶
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.
Usage¶
ec2_create_vpc_endpoint(DryRun, VpcEndpointType, VpcId, ServiceName,
PolicyDocument, RouteTableIds, SubnetIds, SecurityGroupIds,
IpAddressType, DnsOptions, ClientToken, PrivateDnsEnabled,
TagSpecifications, SubnetConfigurations, ServiceNetworkArn,
ResourceConfigurationArn, ServiceRegion)
Arguments¶
-
DryRunChecks 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. -
VpcEndpointTypeThe 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
-
VpcId[required] The ID of the VPC.
-
ServiceNameThe name of the endpoint service.
-
PolicyDocument(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.
-
RouteTableIds(Gateway endpoint) The route table IDs.
-
SubnetIds(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. -
SecurityGroupIds(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.
-
IpAddressTypeThe IP address type for the endpoint.
-
DnsOptionsThe DNS options for the endpoint.
-
ClientTokenUnique, case-sensitive identifier that you provide to ensure the idempotency of the request. For more information, see How to ensure idempotency.
-
PrivateDnsEnabled(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. Usemodify_vpc_attributeto set the VPC attributes. -
TagSpecificationsThe tags to associate with the endpoint.
-
SubnetConfigurationsThe subnet configurations for the endpoint.
-
ServiceNetworkArnThe Amazon Resource Name (ARN) of a service network that will be associated with the VPC endpoint of type service-network.
-
ResourceConfigurationArn(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. - For a Resource endpoint, you can specify a resource configuration that is of type
-
ServiceRegionThe Region where the service is hosted. The default is the current Region.
Value¶
A list with the following syntax:
list(
VpcEndpoint = list(
VpcEndpointId = "string",
VpcEndpointType = "Interface"|"Gateway"|"GatewayLoadBalancer"|"Resource"|"ServiceNetwork"|"Tunnel",
VpcId = "string",
ServiceName = "string",
State = "PendingAcceptance"|"Pending"|"Available"|"Deleting"|"Deleted"|"Rejected"|"Failed"|"Expired"|"Partial",
PolicyDocument = "string",
RouteTableIds = list(
"string"
),
SubnetIds = list(
"string"
),
Groups = list(
list(
GroupId = "string",
GroupName = "string"
)
),
IpAddressType = "ipv4"|"dualstack"|"ipv6",
DnsOptions = list(
DnsRecordIpType = "ipv4"|"dualstack"|"ipv6"|"service-defined",
PrivateDnsOnlyForInboundResolverEndpoint = TRUE|FALSE,
PrivateDnsPreference = "string",
PrivateDnsSpecifiedDomains = list(
"string"
)
),
PrivateDnsEnabled = TRUE|FALSE,
RequesterManaged = TRUE|FALSE,
NetworkInterfaceIds = list(
"string"
),
DnsEntries = list(
list(
DnsName = "string",
HostedZoneId = "string"
)
),
CreationTimestamp = as.POSIXct(
"2015-01-01"
),
Tags = list(
list(
Key = "string",
Value = "string"
)
),
OwnerId = "string",
LastError = list(
Message = "string",
Code = "string"
),
Ipv4Prefixes = list(
list(
SubnetId = "string",
IpPrefixes = list(
"string"
)
)
),
Ipv6Prefixes = list(
list(
SubnetId = "string",
IpPrefixes = list(
"string"
)
)
),
FailureReason = "string",
ServiceNetworkArn = "string",
ResourceConfigurationArn = "string",
ServiceRegion = "string",
PayerResponsibilities = list(
list(
Scope = "vpc-endpoint-charges"|"resource-gateway-charges",
PayerResponsibilityType = "vpc-endpoint-account"|"resource-gateway-account"|"vpc-endpoint-service-account"
)
)
),
ClientToken = "string"
)
Request syntax¶
svc$create_vpc_endpoint(
DryRun = TRUE|FALSE,
VpcEndpointType = "Interface"|"Gateway"|"GatewayLoadBalancer"|"Resource"|"ServiceNetwork"|"Tunnel",
VpcId = "string",
ServiceName = "string",
PolicyDocument = "string",
RouteTableIds = list(
"string"
),
SubnetIds = list(
"string"
),
SecurityGroupIds = list(
"string"
),
IpAddressType = "ipv4"|"dualstack"|"ipv6",
DnsOptions = list(
DnsRecordIpType = "ipv4"|"dualstack"|"ipv6"|"service-defined",
PrivateDnsOnlyForInboundResolverEndpoint = TRUE|FALSE,
PrivateDnsPreference = "string",
PrivateDnsSpecifiedDomains = list(
"string"
)
),
ClientToken = "string",
PrivateDnsEnabled = TRUE|FALSE,
TagSpecifications = list(
list(
ResourceType = "capacity-reservation"|"client-vpn-endpoint"|"customer-gateway"|"carrier-gateway"|"coip-pool"|"declarative-policies-report"|"dedicated-host"|"dhcp-options"|"egress-only-internet-gateway"|"elastic-ip"|"elastic-gpu"|"export-image-task"|"export-instance-task"|"fleet"|"fpga-image"|"host-reservation"|"image"|"image-usage-report"|"import-image-task"|"import-snapshot-task"|"instance"|"instance-event-window"|"internet-gateway"|"ipam"|"ipam-pool"|"ipam-scope"|"ipv4pool-ec2"|"ipv6pool-ec2"|"key-pair"|"launch-template"|"local-gateway"|"local-gateway-route-table"|"local-gateway-virtual-interface"|"local-gateway-virtual-interface-group"|"local-gateway-route-table-vpc-association"|"local-gateway-route-table-virtual-interface-group-association"|"natgateway"|"network-acl"|"network-interface"|"network-insights-analysis"|"network-insights-path"|"network-insights-access-scope"|"network-insights-access-scope-analysis"|"outpost-lag"|"placement-group"|"prefix-list"|"replace-root-volume-task"|"reserved-instances"|"route-table"|"security-group"|"security-group-rule"|"service-link-virtual-interface"|"snapshot"|"spot-fleet-request"|"spot-instances-request"|"subnet"|"subnet-cidr-reservation"|"traffic-mirror-filter"|"traffic-mirror-session"|"traffic-mirror-target"|"transit-gateway"|"transit-gateway-attachment"|"transit-gateway-connect-peer"|"transit-gateway-multicast-domain"|"transit-gateway-policy-table"|"transit-gateway-metering-policy"|"transit-gateway-route-table"|"transit-gateway-route-table-announcement"|"volume"|"vpc"|"vpc-endpoint"|"vpc-endpoint-connection"|"vpc-endpoint-service"|"vpc-endpoint-service-permission"|"vpc-peering-connection"|"vpn-connection"|"vpn-gateway"|"vpc-flow-log"|"capacity-reservation-fleet"|"traffic-mirror-filter-rule"|"vpc-endpoint-connection-device-type"|"verified-access-instance"|"verified-access-group"|"verified-access-endpoint"|"verified-access-policy"|"verified-access-trust-provider"|"vpn-connection-device-type"|"vpc-block-public-access-exclusion"|"vpc-encryption-control"|"route-server"|"route-server-endpoint"|"route-server-peer"|"ipam-resource-discovery"|"ipam-resource-discovery-association"|"instance-connect-endpoint"|"verified-access-endpoint-target"|"ipam-external-resource-verification-token"|"capacity-block"|"mac-modification-task"|"ipam-prefix-list-resolver"|"ipam-policy"|"ipam-prefix-list-resolver-target"|"ipam-internet-registry-association"|"secondary-interface"|"secondary-network"|"secondary-subnet"|"capacity-manager-data-export"|"vpn-concentrator"|"ipam-pool-allocation"|"capacity-reservation-cancellation-quote"|"application-status-check"|"capacity-reservation-modification-quote",
Tags = list(
list(
Key = "string",
Value = "string"
)
)
)
),
SubnetConfigurations = list(
list(
SubnetId = "string",
Ipv4 = "string",
Ipv6 = "string"
)
),
ServiceNetworkArn = "string",
ResourceConfigurationArn = "string",
ServiceRegion = "string"
)