建立終端節點。
介面說明
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 |
否 |
指定終端節點可用區的彈性網卡 IPv4 位址。 |
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 |
否 |
是否支援連線服務的終端節點域名就近解析,取值:
|
false |
| ServiceRegionId |
string |
否 |
終端節點服務所屬的地域 ID。缺省值為目前地域,即您建立終端節點所在地域。 |
cn-huhehaote |
| CrossRegionBandwidth |
integer |
否 |
跨地域頻寬值,僅當終端節點和終端節點服務跨地域時涉及該參數。單位:Mbps。取值:
說明
如需指定該參數,請確保您建立的是跨地域的終端節點。 |
1000 |
返回參數
|
名稱 |
類型 |
描述 |
樣本值 |
|
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 |
是否支援連線服務的終端節點域名就近解析,取值:
|
false |
| ServiceRegionId |
string |
終端節點服務所屬的地域 ID。 |
cn-huhehaote |
| CrossRegionBandwidth |
integer |
終端節點的跨地域頻寬值,僅當終端節點和終端節點服務跨地域時涉及該參數。單位:Mbps。 |
1000 |
樣本
正常返回樣本
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": false,
"ServiceRegionId": "cn-huhehaote",
"CrossRegionBandwidth": 1000
}
錯誤碼
|
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. | |
| 400 | VpcNotFound | The specified VPC does not exist. | |
| 400 | GenerateResourceIdFailed | Failed to generate ResourceId. | |
| 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. | |
| 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. | |
| 400 | ResourceNotEnough.VSwitchIp | The specified resource of VSwitchIp is not enough. | |
| 400 | VSwitchStatusNotAllowed | The specified vswitch status is not Available. | |
| 400 | QuotaExceeded.epZonePerEndpoint | The quota of %s is exceeded, usage %s/%s. | |
| 400 | QuotaExceeded.totalEpPerVpc | The quota of %s is exceeded, usage %s/%s. | |
| 400 | QuotaExceeded.totalIdleEndpoint | The quota of %s is exceeded, usage %s/%s. | |
| 400 | OperationDenied.EndpointPolicyNotSupport | The operation is not allowed because of EndpointPolicyNotSupport. | |
| 400 | OperationDenied.PrivateDomainStatusNotSupport | The operation is not allowed because of %s. | |
| 400 | OperationDenied.PrivateDomainNotSupport | The operation is not allowed because of PrivateDomainNotSupport. | |
| 400 | DependencyViolation.PrivateDnsName | The specified resource of %s depends on %s, so the operation cannot be completed. | |
| 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. | |
| 400 | OperationDenied.EndpointServiceNotSupportDualstack | The specified endpoint service does not support dualstack. | |
| 400 | OperationDenied.VSwitchNotSupportDualstack | The specified VSwitch does not support dualstack. | |
| 400 | OperationDenied.AddressIpVersionNotSupportSpecifyIpv6 | The AddressIpVersion of the endpoint does not support specifying IPv6 address. | |
| 400 | IllegalParam.Ip | The specified parameter IP is invalid. | |
| 400 | IllegalParam.Ipv6Address | The specified parameter Ipv6Address is invalid. | |
| 400 | IllegalParam.AddressIpVersion | The specified parameter AddressIpVersion is invalid. | |
| 400 | SpecifiedAlbNotSupport | The specified alb %s is not supported. |
訪問錯誤中心查看更多錯誤碼。
變更歷史
更多資訊,參考變更詳情。