建立終端節點。
介面說明
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 |
否 |
是否支援串連服務的終端節點網域名稱就近解析,取值:
|
false |
返回參數
|
名稱 |
類型 |
描述 |
樣本值 |
|
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執行個體不支援。 |
訪問錯誤中心查看更多錯誤碼。
變更歷史
更多資訊,參考變更詳情。