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

CreateVpcEndpointService

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

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

调用CreateVpcEndpointService接口,创建一个终端节点服务。

调用说明

单个终端节点服务在每个可用区默认最多可添加100个服务资源。

调试

请求参数

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

名称类型是否必选示例值描述
ActionStringCreateVpcEndpointService要执行的操作,取值为CreateVpcEndpointService。
VersionString2020-04-01API版本信息,当前版本为2020-04-01。

ServiceNameSuffix

String

tos

终端节点服务的名称后缀。
设置名称后缀后,系统会按照“com.volces.privatelink.<地域ID>.<名称后缀>”的格式生成终端节点服务的名称。

说明

该参数正在邀测中,如需使用不同名称后缀区分业务,请联系客户经理。

ServiceResourceType

String

CLB

服务资源的类型。取值如下:

  • CLB:负载均衡CLB。

Resources.N.ResourceId

String

Resources.1.ResourceId=clb-bp1o94dp5i6ea****&Resources.2.ResourceId=clb-bp1b6c719dfa08ex****

待添加到终端节点服务中的服务资源ID。您可以调用DescribeLoadBalancers接口获取CLB实例的ID。

  • 参数 - N:表示服务资源的序号,取值范围为1~20。
  • 多个服务资源间使用“&”分隔。

AutoAcceptEnabled

Boolean

false

是否自动接受终端节点连接。取值如下:

  • true:终端节点服务自动接受终端节点连接。
  • false(默认值):终端节点服务不会自动接受终端节点连接,需要调用EnableVpcEndpointConnection接口手动接受。

PrivateDNSEnabled

Boolean

false

是否为终端节点服务启用私有DNS名称。

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

说明

私网连接自定义域名功能正在邀测中,如需使用,请联系客户经理。

PrivateDNSName

String

www.example.com

终端节点的私有DNS名称,即公网域名。

  • 参数PrivateDNSEnabled取值为“true”时,必须传入该参数。
  • 若传入公网域名为泛域名 *.www.example.com,则该泛域名及其根域名 www.example.com 均支持解析。

ClientToken

String

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

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

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

Description

String

EndpointService

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

  • 必须以字母、数字或中文开头,可包含字母、数字、中文和以下特殊字符:英文逗号(,)、点号(.)、下划线(_)、空格( )、等号(=)、中划线(-)、中文逗号(,)、中文句号(。)。
  • 长度限制为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~255个字符。
  • 大小写敏感,不能以空格开头或结尾。
  • 允许包含字母、数字、空格()、下划线(_)、点号(.)、半角冒号(:)、斜杠(/)、等号(=)、加号(+)、减号(-)和@。

说明

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

返回数据

名称类型示例值描述
RequestIdString0ED8D006-F706-4D23-88ED-E11ED28D****请求ID。
ServiceIdStringepsvc-2fe630gurkl37k5gfuy33****终端节点服务的ID。

请求示例

GET /?Action=CreateVpcEndpointService&Version=2020-04-01&ServiceResourceType=CLB&Resources.1.ResourceId=clb-bp1o94dp5i6ea****&Resources.2.ResourceId=clb-bp1b6c719dfa08ex**** HTTP/1.1
Host: open.volcengineapi.com
Service: privatelink
Region: cn-guangzhou

返回示例

{
    "ResponseMetadata": {
        "RequestId": "0ED8D006-F706-4D23-88ED-E11ED28D****",
        "Action": "CreateVpcEndpointService",
        "Version": "2020-04-01",
        "Service": "privatelink",
        "Region": "cn-guangzhou"
    },
    "Result": {
        "RequestId": "0ED8D006-F706-4D23-88ED-E11ED28D****",
        "ServiceId": "epsvc-2fe630gurkl37k5gfuy33****"
    }
}

错误码

此处仅展示当前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表示缺少的参数名称。

400InvalidDescription.MalformedThe specified Description is malformed.指定的参数Description格式不合法。
400InvalidResource.DisorderThe specified resource index orders are malformed.指定的资源条目的序号不合法。
400InvalidServiceResource.MalformedThe specified ServiceResource is malformed.指定的 ServiceResource 参数格式不合法。
400InvalidServiceResourceType.MalformedThe specified ServiceResourceType is malformed.指定的参数ServiceResourceType格式不合法。
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。
400InvalidResource.ConflictThe specified resource is duplicated.指定的资源重复。
400ErrPrivateLinkServiceNotSupportedZoneThe PrivateLink service does not support the zone.终端节点服务不支持添加该可用区的服务资源。
400InsufficientIpInSubnetThe specified subnet does not contain enough free private IP addresses to fulfill your request.指定子网下可用IP不足。
400LimitExceeded.PrivateIpsPerEniYou've reached the limit on the number of private IPs per ENI that you can assign.已达到网卡可分配的辅助IP的数量上限。
400LimitExceed.ServiceResourceNumberYou've reached the limit on the number of service resources that you can operate.已达到单次可操作的服务资源的数量上限。
400QuotaExceed.EndpointServiceNumberYou've reached the limit on the number of endpoint service instances that you can create.已达到可创建终端节点服务实例数量的配额上限。
400QuotaExceed.ServiceZoneEachInstanceYou've reached the limit on the number of service zones that you can create.已达到每个终端节点服务实例下可创建服务资源所属可用区的数量的配额上限。
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.SecurityGroupIpThe number of IP addresses bound to the security group exceeded quota.已达到安全组可绑定IP地址的数量上限。
400QuotaExceed.ServiceResourceEachZoneYou've reached the limit on the number of service resources in the zone that you can create.已达到单个可用区可创建服务资源的数量的配额上限。
400InvalidServiceResource.MalformedThe specified ServiceResource is malformed.指定的 ServiceResource 参数格式不合法。
400InvalidServiceResource.InvalidStatusThe specified ServiceResource is not in the correct status for the request.指定的服务资源所处的状态无法响应该请求。
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.已达到单次可操作的标签条目数量上限。
400InvalidAccountServiceNameMapping.InvalidStatusThe specified account service name mapping is not in the correct status for the request.指定的服务名称映射表的状态无法响应该请求。
400InvalidPrivateDNSEnabled.PrivateDNSNameMismatchThe specified PrivateDNSEnabled and PrivateDNSName are mismatched.指定的参数 PrivateDNSEnabled 与 PrivateDNSName 无法匹配。
400InvalidPrivateDNSName.MalformedThe specified PrivateDNSName is malformed.指定的 PrivateDNSName 参数格式不合法。
400InvalidServiceNameSuffix.MalformedThe specified ServiceNameSuffix is malformed.指定的 ServiceNameSuffix 参数格式不合法。
400ServiceNameSuffixExistThe specified service name suffix already exists.指定的服务名称后缀已经存在。
403ForbiddenYou are not authorized to perform operations on the specified service.无权限对指定服务进行操作。
404InvalidProject.NotFoundThe specified Project does not exist.指定的项目不存在。
404InvalidLoadBalancer.NotFoundThe specified LoadBalancer does not exist.指定的负载均衡不存在。
404InvalidServiceNameSuffix.NotFoundThe specified ServiceNameSuffix does not exist.指定的服务名称后缀不存在。
409InvalidPrivateDNSName.ConflictThe specified private dns name repeated.指定的私网 DNS 名称重复。
412IdempotentProcessingThe request uses the same ClientToken as a previous one that is still in process.幂等请求处理中。