呼叫 CreateVpcEndpointService 介面,建立終端節點服務。
介面說明
-
建立終端節點服務之前,請確保您已建立支援私網連接的負載平衡資源。具體操作,請參見建立負載平衡執行個體。
-
CreateVpcEndpointService 介面屬於非同步介面,即系統會返回一個執行個體 ID,但該終端節點服務尚未建立完成,系統後台任務仍在進行中。您可以呼叫 GetVpcEndpointServiceAttribute 查詢終端節點服務的建立狀態:
-
當終端節點服務處於 Creating 狀態時,表示終端節點服務正在建立。
-
當終端節點服務處於 Active 狀態時,表示終端節點服務建立完成。
-
調試
您可以在OpenAPI Explorer中直接運行該介面,免去您計算簽名的困擾。運行成功後,OpenAPI Explorer可以自動產生SDK程式碼範例。
調試
授權資訊
|
操作 |
存取層級 |
資源類型 |
條件關鍵字 |
關聯操作 |
|
privatelink:CreateVpcEndpointService |
create |
*VpcEndpointService
LoadBalancer
LoadBalancer
NatGateway
LoadBalancer
|
無 | 無 |
請求參數
|
名稱 |
類型 |
必填 |
描述 |
樣本值 |
| RegionId |
string |
是 |
終端節點服務所在的地域 ID。 您可以透過呼叫 DescribeRegions 介面取得地域 ID。 |
cn-huhehaote |
| ClientToken |
string |
否 |
用戶端 Token,用於保證請求的冪等性。 從您的用戶端產生一個參數值,確保不同請求間該參數值唯一。ClientToken 只支援 ASCII 字元。 |
0c593ea1-3bea-11e9-b96b-88e9fe637760 |
| DryRun |
boolean |
否 |
是否只預檢此次請求,取值:
|
false |
| ServiceDescription |
string |
否 |
終端節點服務的描述資訊。 |
This is my EndpointService. |
| AutoAcceptEnabled |
boolean |
否 |
是否自動接受終端節點連接,取值:
|
false |
| Payer |
string |
否 |
付費方,取值:
|
Endpoint |
| ZoneAffinityEnabled |
boolean |
否 |
是否支援連接服務的終端節點域名就近解析,取值:
|
false |
| ServiceResourceType |
string |
否 |
服務資源類型。取值:
說明
不支援存取 NLB 的 TCPSSL 類型監聽。 |
slb |
| Resource |
array<object> |
否 |
終端節點服務資源合集。建立時最多支援 10 個資源。建立後可透過為終端節點新增服務資源繼續新增。 |
|
|
object |
否 |
終端節點服務資源合集。 |
||
| ResourceType |
string |
否 |
新增到終端節點服務中的服務資源的類型,一個終端節點服務最多支援新增 20 個服務資源。取值:
|
slb |
| ResourceId |
string |
否 |
新增到終端節點服務中的服務資源 ID。 |
lb-hp32z1wp5peaoox2q**** |
| ZoneId |
string |
否 |
可用區 ID。 |
cn-huhehaote-a |
| RegionId |
string |
是 |
終端節點服務所在的地域 ID。 您可以透過呼叫 DescribeRegions 介面取得地域 ID。 |
cn-huhehaote |
ServiceSupportIPv6
deprecated
|
boolean |
否 |
終端節點服務是否支援 IPv6 功能。取值:
|
false |
| ResourceGroupId |
string |
否 |
資源群組 ID。 |
rg-acfmy***** |
| Tag |
array<object> |
否 |
標籤列表。 |
|
|
object |
否 |
標籤列表。 |
||
| Key |
string |
否 |
執行個體的標籤鍵。最多支援 20 個標籤鍵。一旦傳入該值,則不允許為空字串。 最多支援 64 個字元,不能以 |
env |
| Value |
string |
否 |
執行個體的標籤值。最多支援 20 個標籤值。一旦傳入該值,可以為空字串。 最多支援 128 個字元,不能以 |
prod |
| AddressIpVersion |
string |
否 |
協定版本。取值:
說明
目前僅後端資源類型為 nlb、gwlb 的終端節點服務支援指定 IP 位址協定為 DualStack。終端節點服務支援雙棧,要求其後端資源也需支援雙棧。 |
IPv4 |
| SupportedRegionList |
array |
否 |
終端節點服務支援的地域列表,服務使用方可從列表中的地域發起終端節點連接。 |
|
|
string |
否 |
終端節點服務支援的地域 ID。 |
cn-hangzhou |
返回參數
|
名稱 |
類型 |
描述 |
樣本值 |
|
object |
|||
| ServiceBusinessStatus |
string |
終端節點服務的業務狀態。取值:
|
Normal |
| RequestId |
string |
請求 ID。 |
8D8992C1-6712-423C-BAC5-E5E817484C6B |
| ServiceName |
string |
終端節點服務的名稱。 |
com.aliyuncs.privatelink.cn-huhehaote.epsrv-hp3vpx8yqxblby3i**** |
| ServiceStatus |
string |
終端節點服務的狀態。取值:
|
Active |
| ServiceDescription |
string |
終端節點服務的描述資訊。 |
This is my EndpointService. |
| CreateTime |
string |
終端節點服務的建立時間。 |
2022-01-02T19:11:12Z |
| ServiceDomain |
string |
終端節點服務的服務域名。 |
epsrv-hp3vpx8yqxblby3i****.cn-huhehaote.privatelink.aliyuncs.com |
| ZoneAffinityEnabled |
boolean |
是否支援連接服務的終端節點域名就近解析。取值:
|
false |
| AutoAcceptEnabled |
boolean |
是否自動接受終端節點連接。取值:
|
false |
| ServiceId |
string |
終端節點服務的 ID。 |
epsrv-hp3vpx8yqxblby3i**** |
ServiceSupportIPv6
deprecated
|
boolean |
終端節點服務是否支援 IPv6 功能。取值:
|
false |
| ResourceGroupId |
string |
資源群組 ID。 |
rg-acfmy***** |
| AddressIpVersion |
string |
協定版本。取值:
|
IPv4 |
| SupportedRegionSet |
array<object> |
終端節點服務支援的地域列表,服務使用方可從列表中的地域發起終端節點連接。 |
|
|
object |
|||
ServiceRegionId
deprecated
|
string |
||
| RegionServiceStatus |
string |
終端節點服務支援的地域的狀態。取值:
|
Available |
| RegionBusinessStatus |
string |
終端節點服務支援的地域的業務狀態。取值:
|
Normal |
| SupportedRegionId |
string |
終端節點服務支援的地域 ID。 |
cn-hangzhou |
樣本
正常返回樣本
JSON格式
{
"ServiceBusinessStatus": "Normal",
"RequestId": "8D8992C1-6712-423C-BAC5-E5E817484C6B",
"ServiceName": "com.aliyuncs.privatelink.cn-huhehaote.epsrv-hp3vpx8yqxblby3i****",
"ServiceStatus": "Active",
"ServiceDescription": "This is my EndpointService.",
"CreateTime": "2022-01-02T19:11:12Z",
"ServiceDomain": "epsrv-hp3vpx8yqxblby3i****.cn-huhehaote.privatelink.aliyuncs.com",
"ZoneAffinityEnabled": false,
"AutoAcceptEnabled": false,
"ServiceId": "epsrv-hp3vpx8yqxblby3i****",
"ServiceSupportIPv6": false,
"ResourceGroupId": "rg-acfmy*****",
"AddressIpVersion": "IPv4",
"SupportedRegionSet": [
{
"ServiceRegionId": "",
"RegionServiceStatus": "Available",
"RegionBusinessStatus": "Normal",
"SupportedRegionId": "cn-hangzhou"
}
]
}
錯誤碼
|
HTTP status code |
錯誤碼 |
錯誤資訊 |
描述 |
|---|---|---|---|
| 400 | EndpointServiceExist | The specified Endpoint Service already exists. | |
| 400 | AlbNotFound | The specified Alb does not exist. | |
| 400 | LoadBalancerNotFound | The specified load balancer does not exist. | |
| 400 | LoadBalancerNotSupportPrivateLink | The specified SLB does not support PrivateLink. | |
| 400 | GenerateResourceIdFailed | Failed to generate ResourceId. | |
| 400 | QuotaMisMatched | The resource you applied for has exceeded the quota. | |
| 400 | VSwitchNotFound | The specified VSwitch does not exist. | |
| 400 | EndpointServicePayerForbidden | The parameter EndpointServicePayer is forbidden. The user is not in the whitelist. | |
| 400 | NeedOpenProduct | The product is not activated. | |
| 400 | EndpointServiceNotSupportedZone | The specified endpoint service does not support the zone. | |
| 400 | IllegalParamFormat.%s | The param format of %s is illegal. | |
| 400 | MissingParam.%s | The param of %s is missing. | |
| 400 | ResourceNotFound.NatGateway | The specified resource %s is not found. | |
| 400 | Mismatch.ResourceType | The %s is mismatched for %s and %s. | |
| 400 | EndpointServiceNotSupportIpv6 | The param supportIpv6 of EndpointService is forbidden , resource is not support ipv6. | |
| 400 | OperationDenied.PrivateDomainNotSupport | The operation is not allowed because of PrivateDomainNotSupport. | |
| 400 | Conflict.ServiceName | The ServiceName %s is conflict. | |
| 400 | InvalidParam.PrivateDnsName | The parameter of PrivateDnsName is illegal, which needs to end with aliyun.com, aliyun-inc.com, or aliyuncs.com. | |
| 400 | OperationDenied.ZoneAffinityNotSupport | The operation is not allowed because of zone affinity not support. | |
| 400 | OperationDenied.RamPolicyNotSupport | The operation is not allowed because of RamPolicyNotSupport. | |
| 400 | OperationDenied.ResourceTypeNotSupportDualStack | The specified resource type does not support dualstack. | |
| 400 | OperationDenied.ServiceResourceIpVersionMismatch | The endpoint service and service resource AddressIpVersion do not match. | |
| 400 | IllegalParam.AddressIpVersion | The specified parameter AddressIpVersion is invalid. | |
| 400 | SpecifiedAlbNotSupport | The specified alb %s is not supported. |
訪問錯誤中心查看更多錯誤碼。
變更歷史
更多資訊,參考變更詳情。