文档

CreateVpcEndpoint - 创建终端节点

更新时间:

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

接口说明

CreateVpcEndpoint 接口属于异步接口,即系统会返回一个实例 ID,但该终端节点尚未创建完成,系统后台任务仍在进行中。您可以调用 GetVpcEndpointAttribute 查询终端节点的创建状态:

  • 当终端节点处于 Creating 状态时,表示终端节点正在创建中。
  • 当终端节点处于 Active 状态时,表示终端节点创建完成。

调试

您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。

授权信息

下表是API对应的授权信息,可以在RAM权限策略语句的Action元素中使用,用来给RAM用户或RAM角色授予调用此API的权限。具体说明如下:

  • 操作:是指具体的权限点。
  • 访问级别:是指每个操作的访问级别,取值为写入(Write)、读取(Read)或列出(List)。
  • 资源类型:是指操作中支持授权的资源类型。具体说明如下:
    • 对于必选的资源类型,用背景高亮的方式表示。
    • 对于不支持资源级授权的操作,用全部资源表示。
  • 条件关键字:是指云产品自身定义的条件关键字。
  • 关联操作:是指成功执行操作所需要的其他权限。操作者必须同时具备关联操作的权限,操作才能成功。
操作访问级别资源类型条件关键字关联操作
privatelink:CreateVpcEndpointWrite
  • VpcEndpoint
    acs:privatelink:{#regionId}:{#accountId}:vpcendpoint/*
  • SecurityGroup
    acs:ecs:{#regionId}:{#accountId}:securitygroup/{#SecurityGroupId}
  • VSwitch
    acs:vpc:{#regionId}:{#accountId}:vswitch/{#VSwitchId}
  • VPC
    acs:vpc:{#regionId}:{#accountId}:vpc/{#VpcId}
  • privatelink:VpcEndpointServiceId

请求参数

名称类型必填描述示例值
RegionIdstring

终端节点所在的地域 ID。

您可以通过调用 DescribeRegions 接口获取地域 ID。

cn-huhehaote
ClientTokenstring

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

从您的客户端生成一个参数值,确保不同请求间该参数值唯一。ClientToken 只支持 ASCII 字符。

0c593ea1-3bea-11e9-b96b-88e9fe637760
DryRunboolean

是否只预检此次请求。取值:

  • true:发送检查请求,不会创建终端节点。检查项包括是否填写了必需参数、请求格式、业务限制。如果检查不通过,则返回对应错误。如果检查通过,则返回错误码DryRunOperation
  • false(默认值):发送正常请求,通过检查后返回 HTTP 2xx 状态码并直接进行操作。
false
EndpointNamestring

终端节点名称。

长度为 2~128 个字符,以英文字母或中文开头,可包含数字、短划线(-)和下划线(_)。

test
EndpointTypestring

终端节点类型。

仅取值: Interface,表示接口终端节点,您可以添加应用型负载均衡 ALB(Application Load Balancer)、传统型负载均衡 CLB(Classic Load Balancer)和网络型负载均衡 NLB(Network Load Balancer )的服务资源类型。

Interface
ZonePrivateIpAddressCountlong

每个可用区 ENI 的私网 IP 的数量。仅取值:1

1
EndpointDescriptionstring

终端节点描述。

描述长度为 2~256 个字符,开头不能为http://https://

This is my Endpoint.
VpcIdstring

终端节点所属的专有网络。

vpc-hp356stwkxg3fn2xe****
ServiceIdstring

终端节点关联的终端节点服务。

epsrv-hp3xdsq46ael67lo****
ServiceNamestring

终端节点关联的终端节点服务的名称。

com.aliyuncs.privatelink.cn-huhehaote.epsrv-hp3vpx8yqxblby3i****
Zoneobject []

终端节点可用区列表。

VSwitchIdstring

在可用区内要创建终端节点网卡的交换机。 您最多可以设置 10 个交换机。

vsw-hp3uf6045ljdhd5zr****
ZoneIdstring

终端节点服务对应的可用区。

您最多可以设置 10 个可用区。

cn-huhehaote-b
ipstring

指定终端节点可用区的 IP。

您最多可以指定 10 个 IP。

192.168.XX.XX
SecurityGroupIdarray

终端节点网卡关联的安全组列表。

string

终端节点网卡关联的安全组,安全组可以管控 VPC 到终端节点网卡的数据通信。

sg-bp1fg655nh68xyz9****
ProtectedEnabledboolean

是否开启托管保护,STS 调用方式下生效。取值:

  • true:开启。开启托管保护后,只有和创建时相同的用户才能通过 STS 方式对该终端节点进行修改或者删除等操作。
  • false(默认值):不开启。
false
Tagobject []

标签列表。

Keystring

标签键。

env
Valuestring

标签值。

prod
ResourceGroupIdstring

资源组 ID。

rg-acfmy*****

返回参数

名称类型描述示例值
object
EndpointDomainstring

终端节点域名。

ep-hp33b2e43fays7s8****.epsrv-hp3xdsq46ael67lo****.cn-huhehaote.privatelink.aliyuncs.com
RequestIdstring

请求 ID。

0ED8D006-F706-4D23-88ED-E11ED28DCAC0
CreateTimestring

终端节点的创建时间。

2022-01-02T19:11:12Z
EndpointBusinessStatusstring

终端节点的业务状态。取值:

  • Normal:正常。

  • FinancialLocked:欠费锁定。

Normal
EndpointDescriptionstring

终端节点描述。

This is my Endpoint.
ServiceIdstring

终端节点关联的终端节点服务的 ID。

epsrv-hp3vpx8yqxblby3i****
EndpointStatusstring

终端节点状态。取值:

  • Creating:创建中。

  • Active:可用。

  • Pending:修改中。

  • Deleting:删除中。

Active
VpcIdstring

终端节点所属的专有网络。

vpc-hp356stwkxg3fn2xe****
EndpointNamestring

终端节点名称。

test
ServiceNamestring

终端节点关联的终端节点服务的名称。

com.aliyuncs.privatelink.cn-huhehaote.epsrv-hp3xdsq46ael67lo****
Bandwidthlong

终端节点的连接带宽,单位:Mbps。

200
EndpointIdstring

终端节点 ID。

ep-hp33b2e43fays7s8****
ConnectionStatusstring

终端节点连接状态。取值:

  • Pending:修改中。

  • Connecting:连接中。

  • Connected:已连接。

  • Disconnecting:断开连接中。

  • Disconnected:未连接。

  • Deleting:删除中。

Disconnected

示例

正常返回示例

JSON格式

{
  "EndpointDomain": "ep-hp33b2e43fays7s8****.epsrv-hp3xdsq46ael67lo****.cn-huhehaote.privatelink.aliyuncs.com",
  "RequestId": "0ED8D006-F706-4D23-88ED-E11ED28DCAC0",
  "CreateTime": "2022-01-02T19:11:12Z",
  "EndpointBusinessStatus": "Normal",
  "EndpointDescription": "This is my Endpoint.",
  "ServiceId": "epsrv-hp3vpx8yqxblby3i****",
  "EndpointStatus": "Active",
  "VpcId": "vpc-hp356stwkxg3fn2xe****",
  "EndpointName": "test",
  "ServiceName": "com.aliyuncs.privatelink.cn-huhehaote.epsrv-hp3xdsq46ael67lo****",
  "Bandwidth": 200,
  "EndpointId": "ep-hp33b2e43fays7s8****",
  "ConnectionStatus": "Disconnected"
}

错误码

HTTP status code错误码错误信息描述
400EndpointExistThe specified Endpoint already exists.当前终端节点已经存在。
400EndpointZoneDuplicatedThe zone is duplicated for the Endpoint.终端节点服务下面可用区不可以重复
400EndpointServiceNotFoundThe specified Service does not exist.当前终端节点服务不存在
400EndpointServiceNotSupportedZoneThe specified endpoint service does not support the zone.终端节点服务不支持当前可用区。
400VSwitchNotFoundThe specified VSwitch does not exist.当前虚拟交换机未找到。
400SecurityGroupNotFoundThe specified security group does not exist.当前安全组未找到。
400VpcTunnelNotFoundThe specified VPC tunnel does not exist.当前VPC信道未找到。
400VpcNotFoundThe specified VPC does not exist.当前VPC未找到。
400OperationDenied.AutoAllocatedResourceNotFoundThe operation is not allowed because auto allocated resource not found.-
400GenerateResourceIdFailedFailed to generate ResourceId.生成资源ID失败。
400QuotaMisMatchedThe resource you applied for has exceeded the quota.申请的资源超过配额
400EndpointMustContainSecurityGroupThe specified endpoint must have at least one security group.终端节点需要至少加入一个安全组
400EndpointDuplicatedThe endpoint of the service already exists and cannot be created again.此服务的终端节点已存在,不能重复创建
400EndpointServiceDeletedThe specified Service is already deleted.终端节点服务已经被删除
400EndpointServiceResourceNotFoundThe specified service resource is not found.终端节点服务资源未找到
400SecurityGroupTypeNotSupportThe specified security group type is not supported.该安全组类型不支持
400EniIpUnavailableThe specified IP address is unavailable.指定的IP不可用
400EndpointServiceNotAuthorizedThe specified endpoint service is not authorized to user.终端节点服务未授权给用户。
400SecurityGroupTypeOnlySingleTypeSupportededThe specified security group only support one type.安全组只支持一种类型
400QuotaExceeded.IpQuotaPerEpThe quota of %s is exceeded, usage %s/%s.配额%s已超额度限制,目前已使用%s,配额为%s。
400Mismatch.EndpointTypeThe %s is mismatched for %s and %s.%s在%s和%s中不匹配。
400IncorrectStatus.VpcEndpointServiceThe status of %s [%s] is incorrect.资源%s [%s]的状态无效。
400CheckServiceLinkRoleErrorThe ServiceLink role check error.-
400ResourceNotEnough.VSwitchIpThe specified resource of VSwitchIp is not enough.vswitchip数量不够
400VSwitchStatusNotAllowedThe specified vswitch status is not Available.交换机状态还未可用
400QuotaExceeded.epZonePerEndpointThe quota of %s is exceeded, usage %s/%s.用户单个endpoint可用区限制
400QuotaExceeded.totalEpPerVpcThe quota of %s is exceeded, usage %s/%s.用户单个VPC终端节点数量限额。
400QuotaExceeded.totalIdleEndpointThe quota of %s is exceeded, usage %s/%s.用户空闲未连接endpoint总数限制
400OperationDenied.EndpointPolicyNotSupportThe operation is not allowed because of EndpointPolicyNotSupport.操作不允许,终端节点策略不支持
400OperationDenied.PrivateDomainStatusNotSupportThe operation is not allowed because of %s.由于%s,操作不支持
400OperationDenied.PrivateDomainNotSupportThe operation is not allowed because of PrivateDomainNotSupport.由于%s,操作不支持
400DependencyViolation.PrivateDnsNameThe specified resource of %s depends on %s, so the operation cannot be completed.资源%s依赖于%s,导致操作无法完成

访问错误中心查看更多错误码。

变更历史

变更时间变更内容概要操作
2023-09-26OpenAPI 错误码发生变更、OpenAPI 入参发生变更看变更集
变更项变更内容
错误码OpenAPI 错误码发生变更
    删除错误码:400
入参OpenAPI 入参发生变更
    删除入参:PolicyDocument
2023-09-19OpenAPI 错误码发生变更看变更集
变更项变更内容
错误码OpenAPI 错误码发生变更
    错误码 400 变更
2023-09-05OpenAPI 错误码发生变更、OpenAPI 入参发生变更看变更集
变更项变更内容
错误码OpenAPI 错误码发生变更
    错误码 400 变更
入参OpenAPI 入参发生变更
    新增入参:PolicyDocument
2022-11-30OpenAPI 描述信息更新、OpenAPI 错误码发生变更、OpenAPI 入参发生变更看变更集
变更项变更内容
API 描述OpenAPI 描述信息更新
错误码OpenAPI 错误码发生变更
    删除错误码:400
入参OpenAPI 入参发生变更
    新增入参:Tag
2022-11-02OpenAPI 错误码发生变更看变更集
变更项变更内容
错误码OpenAPI 错误码发生变更
    删除错误码:400
2022-09-20OpenAPI 错误码发生变更、OpenAPI 入参发生变更看变更集
变更项变更内容
错误码OpenAPI 错误码发生变更
    删除错误码:400
入参OpenAPI 入参发生变更
    新增入参:ResourceGroupId
2022-07-26OpenAPI 错误码发生变更看变更集
变更项变更内容
错误码OpenAPI 错误码发生变更
    错误码 400 变更
2021-12-03OpenAPI 错误码发生变更看变更集
变更项变更内容
错误码OpenAPI 错误码发生变更
    错误码 400 变更
  • 本页导读 (1)
文档反馈