Calls the CreateVpcEndpointService operation to create an endpoint service.
Operation description
-
Before you create an endpoint service, make sure that you have created a load balancing resource that supports PrivateLink. For more information, see Create a load balancer instance.
-
CreateVpcEndpointService is an asynchronous operation. After a request is sent, the system returns an instance ID, but the endpoint service is not yet created. The background node is still running. You can invoke GetVpcEndpointServiceAttribute to query the creation status of the endpoint service:
-
If the endpoint service is in the Creating state, the endpoint service is being created.
-
If the endpoint service is in the Active state, the endpoint service is created.
-
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
privatelink:CreateVpcEndpointService |
create |
*VpcEndpointService
LoadBalancer
LoadBalancer
NatGateway
LoadBalancer
|
None | None |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| RegionId |
string |
Yes |
The region ID of the endpoint service. You can call the DescribeRegions operation to query the most recent region list. |
cn-huhehaote |
| ClientToken |
string |
No |
The client token that is used to ensure the idempotence of the request. You can use the client to generate the token, but you must make sure that the token is unique among different requests. The token can contain only ASCII characters. |
0c593ea1-3bea-11e9-b96b-88e9fe637760 |
| DryRun |
boolean |
No |
Specifies whether to perform only a dry run, without performing the actual request. Valid values:
|
false |
| ServiceDescription |
string |
No |
The description of the endpoint service. |
This is my EndpointService. |
| AutoAcceptEnabled |
boolean |
No |
Specifies whether to automatically accept endpoint connections. Valid values:
|
false |
| Payer |
string |
No |
The payer. Valid values:
|
Endpoint |
| ZoneAffinityEnabled |
boolean |
No |
Specifies whether to support zone affinity for the endpoint domain name of the endpoint service. Valid values:
|
false |
| ServiceResourceType |
string |
No |
The EPS resource type. Valid values:
Note
Access to TCPSSL listeners of NLB is not supported. |
slb |
| Resource |
array<object> |
No |
The service resources of the endpoint service. You can add up to 10 resources during creation. After creation, you can add more resources by adding service resources to the endpoint. |
|
|
object |
No |
The service resources of the endpoint service. |
||
| ResourceType |
string |
No |
The EPS resource type to add to the endpoint service. You can add up to 20 service resources to an endpoint service. Valid values:
|
slb |
| ResourceId |
string |
No |
The ID of the service resource to add to the endpoint service. |
lb-hp32z1wp5peaoox2q**** |
| ZoneId |
string |
No |
The zone ID. |
cn-huhehaote-a |
| RegionId |
string |
Yes |
The region ID of the endpoint service. You can call the DescribeRegions operation to query the most recent region list. |
cn-huhehaote |
ServiceSupportIPv6
deprecated
|
boolean |
No |
Specifies whether the endpoint service supports IPv6. Valid values:
|
false |
| ResourceGroupId |
string |
No |
The resource group ID. |
rg-acfmy***** |
| Tag |
array<object> |
No |
The list of tags. |
|
|
object |
No |
The list of tags. |
||
| Key |
string |
No |
The tag key of the instance. You can specify up to 20 tag keys. The tag key cannot be an empty string. The tag key can be up to 64 characters in length and cannot start with |
env |
| Value |
string |
No |
The tag value of the instance. You can specify up to 20 tag values. The tag value can be an empty string. The tag value can be up to 128 characters in length and cannot start with |
prod |
| AddressIpVersion |
string |
No |
The protocol version. Valid values:
Note
Only endpoint services whose backend resource type is nlb or gwlb support the DualStack IP address protocol. If the endpoint service supports dual-stack, the backend resources must also support dual-stack. |
IPv4 |
| SupportedRegionList |
array |
No |
The list of regions supported by the endpoint service. Service consumers can initiate endpoint connections from the regions in the list. |
|
|
string |
No |
The ID of the region supported by the endpoint service. |
cn-hangzhou |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
|||
| ServiceBusinessStatus |
string |
The business status of the endpoint service. Valid values:
|
Normal |
| RequestId |
string |
The request ID. |
8D8992C1-6712-423C-BAC5-E5E817484C6B |
| ServiceName |
string |
The service name of the endpoint service. |
com.aliyuncs.privatelink.cn-huhehaote.epsrv-hp3vpx8yqxblby3i**** |
| ServiceStatus |
string |
The endpoint service status. Valid values:
|
Active |
| ServiceDescription |
string |
The description of the endpoint service. |
This is my EndpointService. |
| CreateTime |
string |
The time when the endpoint service was created. |
2022-01-02T19:11:12Z |
| ServiceDomain |
string |
The service domain name of the endpoint service. |
epsrv-hp3vpx8yqxblby3i****.cn-huhehaote.privatelink.aliyuncs.com |
| ZoneAffinityEnabled |
boolean |
Indicates whether zone affinity is supported for the endpoint domain name of the endpoint service. Valid values:
|
false |
| AutoAcceptEnabled |
boolean |
Indicates whether the endpoint service is configured to automatically accept endpoint connections. Valid values:
|
false |
| ServiceId |
string |
The ID of the endpoint service. |
epsrv-hp3vpx8yqxblby3i**** |
ServiceSupportIPv6
deprecated
|
boolean |
Indicates whether the endpoint service supports IPv6. Valid values:
|
false |
| ResourceGroupId |
string |
The resource group ID. |
rg-acfmy***** |
| AddressIpVersion |
string |
The protocol version. Valid values:
|
IPv4 |
| SupportedRegionSet |
array<object> |
The list of regions supported by the endpoint service. Service consumers can initiate endpoint connections from the regions in the list. |
|
|
object |
|||
ServiceRegionId
deprecated
|
string |
||
| RegionServiceStatus |
string |
The status of the region supported by the endpoint service. Valid values:
|
Available |
| RegionBusinessStatus |
string |
The business status of the region supported by the endpoint service. Valid values:
|
Normal |
| SupportedRegionId |
string |
The ID of the region supported by the endpoint service. |
cn-hangzhou |
Examples
Success response
JSON format
{
"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"
}
]
}
Error codes
|
HTTP status code |
Error code |
Error message |
Description |
|---|---|---|---|
| 400 | EndpointServiceExist | The specified Endpoint Service already exists. | The specified Endpoint Service already exists. |
| 400 | AlbNotFound | The specified Alb does not exist. | The specified Alb does not exist. |
| 400 | LoadBalancerNotFound | The specified load balancer does not exist. | The specified Alb does not exist. |
| 400 | LoadBalancerNotSupportPrivateLink | The specified SLB does not support PrivateLink. | The specified SLB does not support PrivateLink. |
| 400 | GenerateResourceIdFailed | Failed to generate ResourceId. | Failed to generate ResourceId. |
| 400 | QuotaMisMatched | The resource you applied for has exceeded the quota. | 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. | The product is not activated. |
| 400 | EndpointServiceNotSupportedZone | The specified endpoint service does not support the zone. | The specified endpoint service does not support the zone. |
| 400 | IllegalParamFormat.%s | The param format of %s is illegal. | The parameter format of %s is illegal. |
| 400 | MissingParam.%s | The param of %s is missing. | The parameter %s is missing. |
| 400 | ResourceNotFound.NatGateway | The specified resource %s is not found. | |
| 400 | Mismatch.ResourceType | The %s is mismatched for %s and %s. | The %s is mismatched for %s and %s. |
| 400 | EndpointServiceNotSupportIpv6 | The param supportIpv6 of EndpointService is forbidden , resource is not support ipv6. | The endpoint service does 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. | The operation is not allowed because zone affinity is not supported. |
| 400 | OperationDenied.RamPolicyNotSupport | The operation is not allowed because of RamPolicyNotSupport. | The operation is not allowed because ram policy are not supported. |
| 400 | OperationDenied.ResourceTypeNotSupportDualStack | The specified resource type does not support dualstack. | The specified resource type does not support dualstack. |
| 400 | OperationDenied.ServiceResourceIpVersionMismatch | The endpoint service and service resource AddressIpVersion do not match. | The endpoint service and service resource AddressIpVersion do not match. |
| 400 | IllegalParam.AddressIpVersion | The specified parameter AddressIpVersion is invalid. | The specified parameter AddressIpVersion does not meet the requirements. |
| 400 | SpecifiedAlbNotSupport | The specified alb %s is not supported. | the specified alb instance is not supported. |
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.