创建终端节点。
接口说明
CreateVpcEndpoint 接口属于异步接口,即系统会返回一个实例 ID,但该终端节点尚未创建完成,系统后台任务仍在进行中。您可以调用 GetVpcEndpointAttribute 查询终端节点的创建状态:
当终端节点处于 Creating 状态时,表示终端节点正在创建中。
当终端节点处于 Active 状态时,表示终端节点创建完成。
调试
您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。
调试
授权信息
|
操作 |
访问级别 |
资源类型 |
条件关键字 |
关联操作 |
|
privatelink:CreateVpcEndpoint |
create |
*VpcEndpoint
*SecurityGroup
*VSwitch
*VPC
|
|
无 |
请求参数
|
名称 |
类型 |
必填 |
描述 |
示例值 |
| RegionId |
string |
是 |
终端节点所在的地域 ID。 您可以通过调用 DescribeRegions 接口获取地域 ID。 |
cn-huhehaote |
| ClientToken |
string |
否 |
客户端 Token,用于保证请求的幂等性。 从您的客户端生成一个参数值,确保不同请求间该参数值唯一。ClientToken 只支持 ASCII 字符。 |
0c593ea1-3bea-11e9-b96b-88e9fe637760 |
| DryRun |
boolean |
否 |
是否只预检此次请求。取值:
|
false |
| EndpointName |
string |
否 |
终端节点名称。 长度为 2~128 个字符,以英文字母或中文开头,可包含数字、短划线(-)和下划线(_)。 |
test |
| EndpointType |
string |
否 |
终端节点类型。取值:
说明
支持反向终端节点的服务只能由阿里云和生态合作伙伴提供,默认不支持自己创建,如需自己创建,请联系客户经理申请。 |
Interface |
| ZonePrivateIpAddressCount |
integer |
否 |
每个可用区 ENI 的私网 IP 的数量。仅取值:1。 |
1 |
| EndpointDescription |
string |
否 |
终端节点描述。 描述长度为 2~256 个字符,开头不能为 |
This is my Endpoint. |
| VpcId |
string |
是 |
终端节点所属的专有网络。 |
vpc-hp356stwkxg3fn2xe**** |
| ServiceId |
string |
否 |
终端节点关联的终端节点服务。 |
epsrv-hp3xdsq46ael67lo**** |
| ServiceName |
string |
否 |
终端节点关联的终端节点服务的名称。 |
com.aliyuncs.privatelink.cn-huhehaote.epsrv-hp3vpx8yqxblby3i**** |
| Zone |
array<object> |
否 |
终端节点可用区列表。 |
|
|
object |
否 |
当前地域下的可用区 ID。 系统将在您指定的可用区下创建资源。 |
||
| VSwitchId |
string |
否 |
在可用区内要创建终端节点网卡的交换机。 您最多可以设置 10 个交换机。 |
vsw-hp3uf6045ljdhd5zr**** |
| ZoneId |
string |
否 |
终端节点服务对应的可用区。 您最多可以设置 10 个可用区。 |
cn-huhehaote-b |
| ip |
string |
否 |
指定终端节点可用区的 IP。 |
192.168.XX.XX |
| Ipv6Address |
string |
否 |
指定终端节点可用区的 IPv6 地址。 说明
仅 AddressIpVersion 属性取值为 DualStack 时,该参数才可指定。 |
2408:4005:34d:****:a58b:62a3:6b55:**** |
| SecurityGroupId |
array |
否 |
终端节点网卡关联的安全组列表。 |
sg-hp33bw6ynvm2yb0e**** |
|
string |
否 |
终端节点网卡关联的安全组,安全组可以管控 VPC 到终端节点网卡的数据通信。 |
sg-bp1fg655nh68xyz9**** |
|
| ProtectedEnabled |
boolean |
否 |
是否开启托管保护,STS 调用方式下生效。取值:
|
false |
| RegionId |
string |
是 |
终端节点所在的地域 ID。 您可以通过调用 DescribeRegions 接口获取地域 ID。 |
cn-huhehaote |
| Tag |
array<object> |
否 |
标签列表。 |
|
|
object |
否 |
标签列表。 |
||
| Key |
string |
否 |
标签键。 |
env |
| Value |
string |
否 |
标签值。 |
prod |
| ResourceGroupId |
string |
否 |
资源组 ID。 |
rg-acfmy***** |
| PolicyDocument |
string |
否 |
RAM 权限策略。关于策略定义的更多信息,请参见权限策略基本元素。 |
{ "Version": "1", "Statement": [ { "Effect": "Allow", "Action": [ "oss:List*", "oss:PutObject", "oss:GetObject" ], "Resource": [ "acs:oss:oss-*:*:pvl-policy-test/policy-test.txt" ], "Principal": { "RAM": [ "acs:ram::14199xxxxxx:*" ] } } ] } |
| AddressIpVersion |
string |
否 |
协议版本。取值:
说明
终端节点支持双栈,要求其连接的终端节点服务及终端节点所处的 VPC 均支持双栈。 枚举值:
|
IPv4 |
| ZoneAffinityEnabled |
boolean |
否 |
返回参数
|
名称 |
类型 |
描述 |
示例值 |
|
object |
|||
| EndpointDomain |
string |
终端节点域名。 |
ep-hp33b2e43fays7s8****.epsrv-hp3xdsq46ael67lo****.cn-huhehaote.privatelink.aliyuncs.com |
| RequestId |
string |
请求 ID。 |
0ED8D006-F706-4D23-88ED-E11ED28DCAC0 |
| CreateTime |
string |
终端节点的创建时间。 |
2022-01-02T19:11:12Z |
| EndpointBusinessStatus |
string |
终端节点的业务状态。取值:
|
Normal |
| EndpointDescription |
string |
终端节点描述。 |
This is my Endpoint. |
| ServiceId |
string |
终端节点关联的终端节点服务的 ID。 |
epsrv-hp3vpx8yqxblby3i**** |
| EndpointStatus |
string |
终端节点状态。取值:
|
Active |
| VpcId |
string |
终端节点所属的专有网络。 |
vpc-hp356stwkxg3fn2xe**** |
| EndpointName |
string |
终端节点名称。 |
test |
| ServiceName |
string |
终端节点关联的终端节点服务的名称。 |
com.aliyuncs.privatelink.cn-huhehaote.epsrv-hp3xdsq46ael67lo**** |
| Bandwidth |
integer |
终端节点的连接带宽,单位:Mbps。 |
200 |
| EndpointId |
string |
终端节点 ID。 |
ep-hp33b2e43fays7s8**** |
| ConnectionStatus |
string |
终端节点连接状态。取值:
|
Disconnected |
| AddressIpVersion |
string |
协议版本。取值:
|
IPv4 |
| ZoneAffinityEnabled |
boolean |
示例
正常返回示例
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",
"AddressIpVersion": "IPv4",
"ZoneAffinityEnabled": true
}
错误码
|
HTTP status code |
错误码 |
错误信息 |
描述 |
|---|---|---|---|
| 400 | EndpointExist | The specified Endpoint already exists. | 当前终端节点已经存在。 |
| 400 | EndpointZoneDuplicated | The zone is duplicated for the Endpoint. | 终端节点服务下面可用区不可以重复 |
| 400 | EndpointServiceNotFound | The specified Service does not exist. | 当前终端节点服务不存在 |
| 400 | EndpointServiceNotSupportedZone | The specified endpoint service does not support the zone. | 终端节点服务不支持当前可用区。 |
| 400 | VSwitchNotFound | The specified VSwitch does not exist. | |
| 400 | SecurityGroupNotFound | The specified security group does not exist. | 当前安全组未找到。 |
| 400 | VpcTunnelNotFound | The specified VPC tunnel does not exist. | 当前VPC信道未找到。 |
| 400 | VpcNotFound | The specified VPC does not exist. | 当前VPC未找到。 |
| 400 | GenerateResourceIdFailed | Failed to generate ResourceId. | 生成资源ID失败。 |
| 400 | QuotaMisMatched | The resource you applied for has exceeded the quota. | 申请的资源超过配额 |
| 400 | EndpointMustContainSecurityGroup | The specified endpoint must have at least one security group. | 终端节点需要至少加入一个安全组 |
| 400 | EndpointDuplicated | The endpoint of the service already exists and cannot be created again. | 此服务的终端节点已存在,不能重复创建 |
| 400 | EndpointServiceDeleted | The specified Service is already deleted. | 终端节点服务已经被删除 |
| 400 | EndpointServiceResourceNotFound | The specified service resource is not found. | 终端节点服务资源未找到 |
| 400 | SecurityGroupTypeNotSupport | The specified security group type is not supported. | 该安全组类型不支持 |
| 400 | EniIpUnavailable | The specified IP address is unavailable. | 指定的IP不可用 |
| 400 | EndpointServiceNotAuthorized | The specified endpoint service is not authorized to user. | 终端节点服务未授权给用户。 |
| 400 | SecurityGroupTypeOnlySingleTypeSupporteded | The specified security group only support one type. | 安全组只支持一种类型 |
| 400 | QuotaExceeded.IpQuotaPerEp | The quota of %s is exceeded, usage %s/%s. | |
| 400 | Mismatch.EndpointType | The %s is mismatched for %s and %s. | |
| 400 | IncorrectStatus.VpcEndpointService | The status of %s [%s] is incorrect. | |
| 400 | CheckServiceLinkRoleError | The ServiceLink role check error. | ServiceLinkRole校验错误 |
| 400 | ResourceNotEnough.VSwitchIp | The specified resource of VSwitchIp is not enough. | vswitchip数量不够 |
| 400 | VSwitchStatusNotAllowed | The specified vswitch status is not Available. | 交换机状态还未可用 |
| 400 | QuotaExceeded.epZonePerEndpoint | The quota of %s is exceeded, usage %s/%s. | 用户单个endpoint可用区限制 |
| 400 | QuotaExceeded.totalEpPerVpc | The quota of %s is exceeded, usage %s/%s. | 用户单个VPC终端节点数量限额。 |
| 400 | QuotaExceeded.totalIdleEndpoint | The quota of %s is exceeded, usage %s/%s. | 用户空闲未连接endpoint总数限制 |
| 400 | OperationDenied.EndpointPolicyNotSupport | The operation is not allowed because of EndpointPolicyNotSupport. | 操作不允许,终端节点策略不支持 |
| 400 | OperationDenied.PrivateDomainStatusNotSupport | The operation is not allowed because of %s. | 由于%s,操作不支持 |
| 400 | OperationDenied.PrivateDomainNotSupport | The operation is not allowed because of PrivateDomainNotSupport. | 由于%s,操作不支持 |
| 400 | DependencyViolation.PrivateDnsName | The specified resource of %s depends on %s, so the operation cannot be completed. | 资源%s依赖于%s,导致操作无法完成 |
| 400 | GatewayLoadBalancerNotSupportSecurityGroup | The gateway load balancer not support security group. | 网关型负载均衡类型不支持设置安全组 |
| 400 | GatewayLoadBalancerZoneCountDeny | The GatewayLoadBalancer zone count not support | 可用区数量不满足限制,无法操作。 |
| 400 | OperationDenied.EndpointTypeNotSupportDualstack | The specified endpoint type does not support dualstack, only the Interface and GatewayLoadBalancer types support dual stack. | 终端节点类型不支持双栈,仅Interface、GatewayLoadBalancer类型支持双栈。 |
| 400 | OperationDenied.EndpointServiceNotSupportDualstack | The specified endpoint service does not support dualstack. | 终端节点服务不支持双栈。 |
| 400 | OperationDenied.VSwitchNotSupportDualstack | The specified VSwitch does not support dualstack. | VSwitch不支持双栈。 |
| 400 | OperationDenied.AddressIpVersionNotSupportSpecifyIpv6 | The AddressIpVersion of the endpoint does not support specifying IPv6 address. | 终端节点的AddressIpVersion不支持指定IPv6地址。 |
| 400 | IllegalParam.Ip | The specified parameter IP is invalid. | 指定的IP地址格式不符合要求。 |
| 400 | IllegalParam.Ipv6Address | The specified parameter Ipv6Address is invalid. | 指定的IPv6地址格式不符合要求。 |
| 400 | IllegalParam.AddressIpVersion | The specified parameter AddressIpVersion is invalid. | 指定的参数AddressIpVersion 不符合要求。 |
| 400 | SpecifiedAlbNotSupport | The specified alb %s is not supported. | 指定的alb实例不支持。 |
访问错误中心查看更多错误码。
变更历史
更多信息,参考变更详情。