Creates 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 an SLB instance.
-
CreateVpcEndpointService is an asynchronous operation. After a request is sent, the system returns an instance ID and creates the endpoint service in the background. You can call the GetVpcEndpointServiceAttribute operation to query the status of the endpoint service.
-
If the endpoint service is in the Creating status, it is being created.
-
If the endpoint service is in the Active status, it 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. Call DescribeRegions to obtain the region ID. |
cn-huhehaote |
| ClientToken |
string |
No |
The client token that is used to ensure the idempotence of the request. Generate a value from your client to make sure that the value is unique among different requests. ClientToken can contain only ASCII characters. |
0c593ea1-3bea-11e9-b96b-88e9fe637760 |
| DryRun |
boolean |
No |
Specifies whether to perform a dry run. 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 enable zone affinity. Valid values:
|
false |
| ServiceResourceType |
string |
No |
The type of the service resource. Valid values:
Note
NLB listeners of the TCPSSL type are not supported. |
slb |
| Resource |
array<object> |
No |
The service resources. You can add up to 10 service resources when you create an endpoint service. After the endpoint service is created, you can add more service resources. |
|
|
object |
No |
The service resources. |
||
| ResourceType |
string |
No |
The type of the service resource. You can add up to 20 service resources to an endpoint service. Valid values:
Note
In regions that support PrivateLink, all CLB instances in a virtual private cloud (VPC) can be used as service resources for an endpoint service. |
slb |
| ResourceId |
string |
No |
The ID of the service resource. |
lb-hp32z1wp5peaoox2q**** |
| ZoneId |
string |
No |
The ID of the zone. |
cn-huhehaote-a |
| RegionId |
string |
Yes |
The region ID of the endpoint service. Call DescribeRegions to obtain the region ID. |
cn-huhehaote |
ServiceSupportIPv6
deprecated
|
boolean |
No |
Specifies whether the endpoint service supports IPv6. Valid values:
|
false |
| ResourceGroupId |
string |
No |
The ID of the resource group. |
rg-acfmy***** |
| Tag |
array<object> |
No |
The list of tags. |
|
|
object |
No |
The list of tags. |
||
| Key |
string |
No |
The tag key. 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. 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 IP version. Valid values:
Note
Currently, only endpoint services that use NLB or GWLB instances as service resources support DualStack. If you set the value to DualStack, the service resources must also support dual-stack. Valid values:
|
IPv4 |
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 name of the endpoint service. |
com.aliyuncs.privatelink.cn-huhehaote.epsrv-hp3vpx8yqxblby3i**** |
| ServiceStatus |
string |
The status of the endpoint service. 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 domain name of the endpoint service. |
epsrv-hp3vpx8yqxblby3i****.cn-huhehaote.privatelink.aliyuncs.com |
| ZoneAffinityEnabled |
boolean |
Indicates whether zone affinity is enabled. Valid values:
|
false |
| AutoAcceptEnabled |
boolean |
Indicates whether endpoint connections are automatically accepted. Valid values:
|
false |
| ServiceId |
string |
The ID of the endpoint service. |
epsrv-hp3vpx8yqxblby3i**** |
ServiceSupportIPv6
deprecated
|
boolean |
Indicates whether IPv6 is enabled for the endpoint service. Valid values:
|
false |
| ResourceGroupId |
string |
The ID of the resource group. |
rg-acfmy***** |
| AddressIpVersion |
string |
The IP version. Valid values:
|
IPv4 |
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"
}
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.