You need to enable JavaScript to run this app.
导航

CreateVpcEndpoint

最近更新时间2024.04.22 16:36:16

首次发布时间2023.03.17 21:09:37

调用CreateVpcEndpoint接口,创建一个终端节点。

调用该接口创建终端节点时,终端节点实例的状态变化为:Creating > Available。

调试

请求参数

下表中,Tags.N.a类型参数中的“N”表示标签信息的序号,需按照数字顺序从1开始填写,单次调用数量上限20个。多个标签之间使用&分隔。每个标签键对应一个标签值。

名称类型是否必选示例值描述
ActionStringCreateVpcEndpoint要执行的操作,取值为CreateVpcEndpoint。
VersionString2020-04-01API版本信息,当前版本为2020-04-01。
VpcIdStringvpc-bp15zkdt37pq72zv****终端节点所属VPC的ID。您可以调用DescribeVpcs接口获取VPC ID。

SecurityGroupIds.N

String

SecurityGroupIds.1=sg-bp67acfmxazb4p****&SecurityGroupIds.2=sg-bp1gxw6bznjjvhu3****

终端节点需要绑定的安全组的ID。 您可以调用DescribeSecurityGroups接口获取安全组ID。

  • 参数 - N:表示安全组ID的序号,取值范围为1~5。
  • 多个安全组ID之间使用“&”分隔。
ServiceIdStringepsvc-2fe630gurkl37k5gfuy33****待关联终端节点服务的ID。您可以调用DescribeVpcEndpointServices接口获取终端节点服务的ID。

Zones.N.SubnetId

String

Zones.1.SubnetId=subnet-bp15zckdt37pq72zv****&Zones.2.SubnetId=subnet-1g0f7rju1txj48ibuxxob****

待创建的终端节点网卡所属子网的ID。您可以调用DescribeSubnets接口获取子网ID。

  • 参数 - N:表示子网ID的序号,取值范围为1~10。
  • 多个子网ID之间使用“&”分隔。

Zones.N.ZoneId

String

Zones.1.ZoneId=cn-guangzhou-a&Zones.2.ZoneId=cn-guangzhou-b

待创建的终端节点网卡所属可用区的ID。更多可用区信息请参见地域与可用区

  • 参数 - N:表示可用区的序号,取值范围为1~10。
  • 多个可用区ID之间使用“&”分隔。

EndpointName

String

endpoint-01

终端节点的名称。

  • 必须以字母、数字或中文开头,可包含字母、数字、中文和以下特殊字符:点号(.)、下划线(_)和中划线(-)。
  • 长度限制为1 ~ 128个字符。
  • 不填默认为终端节点的ID。
ServiceNameStringcom.volces.privatelink.cn-guangzhou.epsvc-2fe630gurkl37k5gfuy33****待关联终端节点服务的名称。格式为:com.volces.privatelink.<地域ID>.<终端节点服务ID>

Zones.N.PrivateIpAddress

String

Zones.1.PrivateIpAddress=172..XX.XX.2&Zones.2.PrivateIpAddress=192..XX.XX.2

终端节点网卡的私网IP地址,应属于子网网段内。您可以调用DescribeSubnets接口获取子网的网段。

  • 参数 - N:表示私网IP地址的序号,取值范围为1~10。
  • 多个私网IP地址之间使用“&”分隔。

PrivateDNSEnabled

String

false

是否启用私有DNS名称。

  • false(默认值):不启用。
  • true:启用。

说明

  • 私网连接自定义域名功能正在邀测中,如需使用,请联系客户经理。
  • 终端节点服务的私有DNS名称验证状态为“verified”时才可以启用。您可以调用DescribeVpcEndpointServiceAttributes接口查看终端节点服务的私有DNS名称验证状态。
  • 启用后,终端节点的私有DNS名称默认为其关联的终端节点服务的私有DNS名称。

ClientToken

String

123e4567-e89b-12d3-a456-42665544****

客户端Token,用于保证请求的幂等性。

  • 该参数值由客户端自动生成,确保不同请求的取值唯一,避免当调用API超时或服务器内部错误时,客户端多次重试导致重复性操作。
  • 取值仅支持ASCII字符,最大不超过64个字符。
  • 未指定该参数值时,不进行幂等校验。

Description

String

Endpoint

终端节点的描述,默认值为空字符串。

  • 必须以字母、数字或中文开头,可包含字母、数字、中文和以下特殊字符:英文逗号(,)、点号(.)、下划线(_)、空格( )、等号(=)、中划线(-)、中文逗号(,)、中文句号(。)。
  • 长度限制为0 ~ 255个字符。
ProjectNameStringdefault终端节点所属项目的名称。

Tags.N.Key

String

Tags.1.Key=k1&Tags.2.Key=k2

终端节点用户标签的标签键。

  • 长度限制为1~128个字符。
  • 大小写敏感,不能以volc:sys:的任意大小写组合开头。
  • 不能以空格开头或结尾。
  • 允许包含字母、数字、空格()、下划线(_)、点号(.)、半角冒号(:)、斜杠(/)、等号(=)、加号(+)、减号(-)和@。

说明

同一资源的标签键不允许重复。

Tags.N.Value

String

Tags.1.Value=v1&Tags.2.Value=v2

终端节点用户标签的标签值。

  • 长度限制为0~256个字符。
  • 大小写敏感,不能以空格开头或结尾。
  • 允许包含字母、数字、空格()、下划线(_)、点号(.)、半角冒号(:)、斜杠(/)、等号(=)、加号(+)、减号(-)和@。

说明

如果传入该参数,则必须先传入Tags.N.Key

返回数据

名称类型示例值描述
RequestIdString0ED8D006-F706-4D23-88ED-E11ED28D****请求ID。
EndpointIdStringep-273yuq6q7bgn47fap8squ****终端节点的ID。

请求示例

GET /?Action=CreateVpcEndpoint&Version=2020-04-01&VpcId=vpc-bp15zkdt37pq72zv****&SecurityGroupIds.1=sg-bp67acfmxazb4p****&SecurityGroupIds.2=sg-bp1gxw6bznjjvhu3****&ServiceId=epsvc-2fe630gurkl37k5gfuy33****&Zones.1.SubnetId=subnet-bp15zckdt37pq72zv****&Zones.2.SubnetId=subnet-1g0f7rju1txj48ibuxxob****&Zones.1.ZoneId=cn-guangzhou-a&Zones.2.ZoneId=cn-guangzhou-b HTTP/1.1
Host: open.volcengineapi.com
Service: privatelink
Region: cn-guangzhou

返回示例

{
    "ResponseMetadata": {
        "RequestId": "0ED8D006-F706-4D23-88ED-E11ED28D****",
        "Action": "CreateVpcEndpoint",
        "Version": "2020-04-01",
        "Service": "privatelink",
        "Region": "cn-guangzhou"
    },
    "Result": {
        "RequestId": "0ED8D006-F706-4D23-88ED-E11ED28D****",
        "EndpointId": "ep-273yuq6q7bgn47fap8squ****"
    }
}

错误码

此处仅展示当前API的错误码,更多错误码请参见公共错误码

HttpCode错误码错误信息描述

400

MissingParameter

The request is missing a required parameter. Ensure that you have supplied all the required parameters for the request; for example, the 'XXX'.

该请求缺少必要参数。请确保发起请求已提供全部必要参数,比如XXX。

说明

其中,XXX表示缺少的参数名称。

400EndpointServiceNotAuthorizedThe specified endpoint service is not authorized to user.终端节点服务未授权给用户。
400EndpointZoneDuplicatedThe specified zone is duplicated for the Endpoint.终端节点服务的可用区重复。
400InvalidName.MalformedThe specified Name is malformed.指定的Name参数格式不合法。
400InvalidDescription.MalformedThe specified Description is malformed.指定的Description参数格式不合法。
400InvalidIP.MalformedThe specified IP is malformed.指定的IP参数格式不合法。
400InsufficientIpInSubnetThe specified subnet does not contain enough free private IP addresses to fulfill your request.指定子网下可用IP不足。
400InvalidClientToken.MalformedThe specified ClientToken is malformed.指定的 ClientToken 参数格式不合法。
400IdempotentParameterMismatchThe request uses the same ClientToken as a previous, but non-identical request. Do not reuse a ClientToken with different requests, unless the requests are identical.该请求使用了与另外请求相同的 ClientToken,请不要在不同请求中复用相同的 ClientToken。
400InvalidEndpointService.InvalidLockThe operation is refused by the endpoint service.终端节点服务无法支持该操作。
400InvalidPrivateDNS.UnsupportedOperationThe request on the specified PrivateDNS is denied due to the PrivateDNS is disabled.因为未开启 PrivateDNS 功能,该请求被拒绝。
400LimitExceed.SecurityGroupNumberYou've reached the limit on the number of security groups that you can operate.已达到单次可操作的安全组的数量上限。
400LimitExceed.ZoneNumberYou've reached the limit on the number of zones that you can operate.已达到单次可操作的可用区的数量上限。
400LimitExceeded.PrivateIpsPerEniYou've reached the limit on the number of private IPs per ENI that you can assign.已达到网卡可分配的辅助IP的数量上限。
400InvalidSecurityGroup.ConflictThe specified security group is duplicated.指定的安全组重复。
400InvalidZone.ConflictThe specified zone is duplicated.指定的可用区重复。
400InvalidZone.DisorderThe specified zone index orders are malformed.指定的可用区条目的序号不合法。
400ServiceLinkRoleNotAuthorizedThe service role for Private Link has not been authorized.请先授权私网连接的服务关联角色。
400ErrEndpointServiceNotSupportedZoneThe specified endpoint service does not support the zone.指定的终端节点服务不支持当前可用区。
400QuotaExceed.EndpointNumberYou've reached the limit on the number of endpoint instances that you can create.已达到可创建的终端节点的数量的配额上限。
400QuotaExceed.EndpointEachVpcYou've reached the limit on the number of endpoint instances that you can create in the specified VPC.已达到指定VPC下可创建的终端节点的配额上限。
400QuotaExceeded.SecurityGroupThe number of security groups bound to the ENI exceeded quota.已达到当前网卡可绑定安全组的数量上限。
400QuotaExceeded.EniSecurityGroupYou've reached the limit on the number of elastic network interfaces that a security group can associate.已达到安全组可关联的弹性网卡数量上限
400QuotaExceeded.EniENI number exceeded quota.已达到可创建网卡的数量上限。
400QuotaExceeded.SecurityGroupIpThe number of IP addresses bound to the security group exceeded quota.已达到安全组可绑定IP地址的数量上限。
400QuotaExceed.EndpointZoneEachInstanceYou've reached the limit on the number of service zones of endpoint service instances that you can create.已达到每个终端节点服务实例下创建服务资源所属可用区的数量的配额上限。
400InvalidSecurityGroup.VpcMismatchThe specified security group and endpoint are not in the same VPC.指定的安全组和终端节点不在同一个 VPC。
400OrderError.PreOrderFailed to create a preorder.下单失败。
400UnsupportedOperation.AccountArrearsThe request on the specified instance is denied due to the account in arrears status.因账户处于欠费状态,对于该实例的操作请求被拒绝。
400OrderError.OrderInOneStepFailed to create an order in one step.创建订单并支付失败。
400InvalidServiceResource.InvalidLockFailed to lock service resource.终端节点服务内部服务资源无法支持该操作。
400InvalidServiceZone.InvalidLockThe operation is refused by the internal service zones of the endpoint service.终端节点服务内部服务可用区无法支持该操作。
400InvalidServiceZone.InvalidLockThe operation is refused by the internal service zones of the endpoint service.终端节点服务内部服务可用区无法支持该操作。
400InvalidProjectName.MalformedThe specified ProjectName is malformed.指定的 ProjectName 参数格式不合法。
400InvalidIncorrectOrder.MalformedThe specified index order is malformed.指定的索引顺序参数格式不合法。
400InvalidTagKey.MalformedThe specified TagKey is malformed.指定的 TagKey 参数格式不合法。
400InvalidTagValue.MalformedThe specified TagValue is malformed.指定的 TagValue 参数格式不合法。
400LimitExceeded.TagOperationYou've reached the limit on the number of tags that you can operate at a time.已达到单次可操作的标签条目数量上限。
403Forbidden.SpecifiedSecurityGroupYou are not authorized to perform operations on the specified security group.The specified security group is a service-managed security group.无权限对指定安全组进行操作。指定的安全组为云产品托管的安全组。
403ForbiddenYou are not authorized to perform operations on the specified service.无权限对指定服务进行操作。
404InvalidEndpointService.NotFoundThe specified EndpointService does not exist.指定的终端节点服务不存在。
404InvalidSubnet.NotFoundThe specified subnet does not exist.指定的子网不存在。
404InvalidSecurityGroupId.NotFoundThe specified security group does not exist.指定的安全组不存在。
404InvalidProject.NotFoundThe specified Project does not exist.指定的项目不存在。
404InvalidVpc.NotFoundThe specified vpc does not exist.指定的私有网络不存在。
409InvalidIpAddress.InUseThe specified IP address is in use.指定的IP地址已被占用。
409InvalidVpcPrivateDNSName.ConflictThe specified PrivateDNSName in single vpc and single endpoint service already exists.指定的私网 DNS 名称在同一个 VPC 和同一个终端节点服务下已存在。
412IdempotentProcessingThe request uses the same ClientToken as a previous one that is still in process.幂等请求处理中。
500NetworkInterfaceCreateFailedThe network interface create failed.可用区下的网卡创建失败。