調用CreateVpcEndpointService介面,建立終端節點服務。
介面說明
-
建立終端節點服務之前,請確保您已建立支援私網串連的負載平衡資源。具體操作,請參見建立Server Load Balancer執行個體。
-
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 個服務資源。取值:
說明
在支援私網串連功能的地區內,專用網路類型的傳統型負載平衡 CLB 執行個體均支援作為終端節點服務的服務資源。 |
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 |
否 |
返回參數
|
名稱 |
類型 |
描述 |
樣本值 |
|
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 |
string |
||
| RegionServiceStatus |
string |
||
| RegionBusinessStatus |
string |
樣本
正常返回樣本
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": "",
"RegionBusinessStatus": ""
}
]
}
錯誤碼
|
HTTP status code |
錯誤碼 |
錯誤資訊 |
描述 |
|---|---|---|---|
| 400 | EndpointServiceExist | The specified Endpoint Service already exists. | 當前終端節點服務已經存在。 |
| 400 | AlbNotFound | The specified Alb does not exist. | ALI負載平衡不存在。 |
| 400 | LoadBalancerNotFound | The specified load balancer does not exist. | 負載平衡不存在。 |
| 400 | LoadBalancerNotSupportPrivateLink | The specified SLB does not support PrivateLink. | 當前負載平衡不支援Privatelink。 |
| 400 | GenerateResourceIdFailed | Failed to generate ResourceId. | 產生資源ID失敗。 |
| 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. | 指定的%s格式無效。請檢查參數約束,並在修改後重試。 |
| 400 | MissingParam.%s | The param of %s is missing. | 參數%s缺失。 |
| 400 | ResourceNotFound.NatGateway | The specified resource %s is not found. | |
| 400 | Mismatch.ResourceType | The %s is mismatched for %s and %s. | %s在%s和%s中不匹配。 |
| 400 | EndpointServiceNotSupportIpv6 | The param supportIpv6 of EndpointService is forbidden , resource is not support ipv6. | 終端節點服務不支援IPv6 |
| 400 | OperationDenied.PrivateDomainNotSupport | The operation is not allowed because of PrivateDomainNotSupport. | 由於%s,操作不支援 |
| 400 | Conflict.ServiceName | The ServiceName %s is conflict. | 服務名稱%s衝突 |
| 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. | 不允許操作,因為不支援ram策略。 |
| 400 | OperationDenied.ResourceTypeNotSupportDualStack | The specified resource type does not support dualstack. | 服務後端資源類型不支援雙棧。 |
| 400 | OperationDenied.ServiceResourceIpVersionMismatch | The endpoint service and service resource AddressIpVersion do not match. | 終端節點服務與後端資源AddressIpVersion不匹配 |
| 400 | IllegalParam.AddressIpVersion | The specified parameter AddressIpVersion is invalid. | 指定的參數AddressIpVersion 不符合要求。 |
| 400 | SpecifiedAlbNotSupport | The specified alb %s is not supported. | 指定的alb執行個體不支援。 |
訪問錯誤中心查看更多錯誤碼。
變更歷史
更多資訊,參考變更詳情。