Creates an endpoint service.
Operation description
-
Before you create an endpoint service, make sure that you have created a Server Load Balancer (SLB) instance that supports PrivateLink. For more information, see CreateLoadBalancer .
-
CreateVpcEndpointService is an asynchronous operation. After a request is sent, the system returns a request ID and an instance ID and runs the task 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 state, the endpoint service is being created.
- If the endpoint service is in the Active state, the endpoint service is created.
Debugging
Authorization information
The following table shows the authorization information corresponding to the API. The authorization information can be used in the Action
policy element to grant a RAM user or RAM role the permissions to call this API operation. Description:
- Operation: the value that you can use in the Action element to specify the operation on a resource.
- Access level: the access level of each operation. The levels are read, write, and list.
- Resource type: the type of the resource on which you can authorize the RAM user or the RAM role to perform the operation. Take note of the following items:
- The required resource types are displayed in bold characters.
- If the permissions cannot be granted at the resource level,
All Resources
is used in the Resource type column of the operation.
- Condition Key: the condition key that is defined by the cloud service.
- Associated operation: other operations that the RAM user or the RAM role must have permissions to perform to complete the operation. To complete the operation, the RAM user or the RAM role must have the permissions to perform the associated operations.
Operation | Access level | Resource type | Condition key | Associated operation |
---|---|---|---|---|
privatelink:CreateVpcEndpointService | Write |
|
| 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.
| false |
ServiceDescription | string | No | The description of the endpoint service. | This is my EndpointService. |
AutoAcceptEnabled | boolean | No | Specifies whether to automatically accept endpoint connection requests. Valid values:
| false |
Payer | string | No | The payer of the endpoint service. Valid values:
Note
By default, the feature of allowing the service provider to pay is unavailable. To use this feature, log on to the Quota Center console and click Privileges in the left-side navigation pane. On the Privileges page, enter the quota ID privatelink_whitelist/epsvc_payer_mode , and click Apply in the Actions column.
| Endpoint |
ZoneAffinityEnabled | boolean | No | Specifies whether to first resolve the domain name of the nearest endpoint that is associated with the endpoint service. Valid values:
| false |
ServiceResourceType | string | No | The type of the service resource. Valid values:
| slb |
Resource | object [] | No | The service resources of the endpoint service. | |
ResourceType | string | No | The type of the service resource that is added to the endpoint service. You can add up to 20 service resources to the endpoint service. Valid values:
Note
In regions where PrivateLink is supported, CLB instances deployed in virtual private clouds (VPCs) can serve as the service resources of the endpoint service.
| slb |
ResourceId | string | No | The ID of the service resource that is added to the endpoint service. You can specify up to 20 service resource IDs. | lb-hp32z1wp5peaoox2q**** |
ZoneId | string | No | The zone ID. | cn-huhehaote-a |
ServiceSupportIPv6 | boolean | No | Specifies whether to enable IPv6 for the endpoint service. Valid values:
| false |
ResourceGroupId | string | No | The resource group ID. | rg-acfmy***** |
Tag | object [] | No | The tags to add to the resource. | |
Key | string | No | The key of the tag to add to the resource. 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 contain | env |
Value | string | No | The value of the tag to add to the resource. 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 contain | prod |
Response parameters
Examples
Sample success responses
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*****"
}
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. | The vSwitch is not found. |
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. | - |
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. | - |
For a list of error codes, visit the Service error codes.
Change history
Change time | Summary of changes | Operation | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
2023-09-19 | The Error code has changed | see changesets | ||||||||||
| ||||||||||||
2022-11-30 | API Description Update. The Error code has changed. The request parameters of the API has changed | see changesets | ||||||||||
|