Creates an endpoint.
Operation description
CreateVpcEndpoint is an asynchronous operation. After a request is sent, the system returns a request ID and runs the task in the background. You can call the GetVpcEndpointAttribute operation to check whether the endpoint is created.
- If the endpoint is in the Creating state, the endpoint is being created.
- If the endpoint is in the Active state, the endpoint 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:CreateVpcEndpoint | Write |
|
| none |
Request parameters
Parameter | Type | Required | Description | Example |
---|---|---|---|---|
RegionId | string | Yes | The region ID of the endpoint. 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 |
EndpointName | string | No | The name of the endpoint. The name must be 2 to 128 characters in length, and can contain digits, underscores (_), and hyphens (-). The name must start with a letter. | test |
EndpointType | string | No | The type of the endpoint. Set the value to Interface. Then, you can specify Application Load Balancer (ALB) and Classic Load Balancer (CLB) instances as service resources for the endpoint service. | Interface |
ZonePrivateIpAddressCount | long | No | The number of private IP addresses that are assigned to an elastic network interface (ENI) in each zone. Set the value to 1. | 1 |
EndpointDescription | string | No | The description of the endpoint. The description must be 2 to 256 characters in length, and cannot start with | This is my Endpoint. |
VpcId | string | Yes | The ID of the virtual private cloud (VPC) to which the endpoint belongs. | vpc-hp356stwkxg3fn2xe**** |
ServiceId | string | Yes | The ID of the endpoint service with which the endpoint is associated. | epsrv-hp3xdsq46ael67lo**** |
ServiceName | string | No | The name of the endpoint service with which the endpoint is associated. | com.aliyuncs.privatelink.cn-huhehaote.epsrv-hp3vpx8yqxblby3i**** |
Zone | object [] | No | The zones where the endpoint is deployed. | |
VSwitchId | string | No | The ID of the vSwitch where you want to create the endpoint ENI in the zone. You can specify up to 10 vSwitch IDs. | vsw-hp3uf6045ljdhd5zr**** |
ZoneId | string | No | The ID of the zone in which the endpoint is deployed. You can specify up to 10 zone IDs. | cn-huhehaote-b |
ip | string | No | The IP address of the zone in which the endpoint is deployed. You can specify up to 10 IP addresses. | 192.168.XX.XX |
SecurityGroupId | array | No | The IDs of security groups that are associated with the endpoint elastic network interface (ENI). | |
string | No | The ID of the security group that is associated with the endpoint ENI. The security group can be used to control data transfer between the virtual private cloud (VPC) and the endpoint ENI. | sg-bp1fg655nh68xyz9**** | |
ProtectedEnabled | boolean | No | Specifies whether to enable user authentication. This parameter is available in Security Token Service (STS) mode. Valid values:
| false |
Tag | object [] | No | The tags to add to the resource. | |
Key | string | No | The key of the tag to add to the resource. | env |
Value | string | No | The value of the tag to add to the resource. | prod |
ResourceGroupId | string | No | The resource group ID. | rg-acfmy***** |
Response parameters
Examples
Sample success responses
JSON
format
{
"EndpointDomain": "ep-hp33b2e43fays7s8****.epsrv-hp3xdsq46ael67lo****.cn-huhehaote.privatelink.aliyuncs.com",
"RequestId": "0ED8D006-F706-4D23-88ED-E11ED28DCAC0",
"CreateTime": "2022-01-02T19:11:12Z",
"EndpointBusinessStatus": "Normal",
"EndpointDescription": "This is my Endpoint.",
"ServiceId": "epsrv-hp3vpx8yqxblby3i****",
"EndpointStatus": "Active",
"VpcId": "vpc-hp356stwkxg3fn2xe****",
"EndpointName": "test",
"ServiceName": "com.aliyuncs.privatelink.cn-huhehaote.epsrv-hp3xdsq46ael67lo****",
"Bandwidth": 200,
"EndpointId": "ep-hp33b2e43fays7s8****",
"ConnectionStatus": "Disconnected"
}
Error codes
HTTP status code | Error code | Error message | Description |
---|---|---|---|
400 | EndpointExist | The specified Endpoint already exists. | The specified Endpoint already exists. |
400 | EndpointZoneDuplicated | The zone is duplicated for the Endpoint. | The zone is duplicated for the Endpoint. |
400 | EndpointServiceNotFound | The specified Service does not exist. | The specified Service does not exist. |
400 | EndpointServiceNotSupportedZone | The specified endpoint service does not support the zone. | The specified endpoint service does not support the zone. |
400 | VSwitchNotFound | The specified VSwitch does not exist. | The vSwitch is not found. |
400 | SecurityGroupNotFound | The specified security group does not exist. | The specified security group does not exist. |
400 | VpcTunnelNotFound | The specified VPC tunnel does not exist. | The specified VPC tunnel does not exist. |
400 | VpcNotFound | The specified VPC does not exist. | The specified VPC does not exist. |
400 | OperationDenied.AutoAllocatedResourceNotFound | The operation is not allowed because auto allocated resource not found. | - |
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 | EndpointMustContainSecurityGroup | The specified endpoint must have at least one security group. | The specified endpoint must have at least one security group. |
400 | EndpointDuplicated | The endpoint of the service already exists and cannot be created again. | - |
400 | EndpointServiceDeleted | The specified Service is already deleted. | The specified Service is already deleted. |
400 | EndpointServiceResourceNotFound | The specified service resource is not found. | - |
400 | SecurityGroupTypeNotSupport | The specified security group type is not supported. | - |
400 | EniIpUnavailable | The specified IP address is unavailable. | The specified IP address is unavailable. |
400 | EndpointServiceNotAuthorized | The specified endpoint service is not authorized to user. | The specified endpoint service is not authorized to user. |
400 | SecurityGroupTypeOnlySingleTypeSupporteded | The specified security group only support one type. | - |
400 | QuotaExceeded.IpQuotaPerEp | The quota of %s is exceeded, usage %s/%s. | - |
400 | Mismatch.EndpointType | The %s is mismatched for %s and %s. | - |
400 | IncorrectStatus.VpcEndpointService | The status of %s [%s] is incorrect. | - |
400 | CheckServiceLinkRoleError | The ServiceLink role check error. | - |
400 | ResourceNotEnough.VSwitchIp | The specified resource of VSwitchIp is not enough. | The number of vSwitch IP addresses is insufficient. |
400 | VSwitchStatusNotAllowed | The specified vswitch status is not Available. | The status of the vSwitch is not available. |
400 | QuotaExceeded.epZonePerEndpoint | The quota of %s is exceeded, usage %s/%s. | The number of endpoints in a zone has reached the upper limit. |
400 | QuotaExceeded.totalEpPerVpc | The quota of %s is exceeded, usage %s/%s. | The number of VPC endpoints has reached the upper limit. |
400 | QuotaExceeded.totalIdleEndpoint | The quota of %s is exceeded, usage %s/%s. | The total number of idle endpoints has reached the upper limit. |
400 | OperationDenied.EndpointPolicyNotSupport | The operation is not allowed because of EndpointPolicyNotSupport. | - |
400 | OperationDenied.PrivateDomainStatusNotSupport | The operation is not allowed because of %s. | - |
400 | OperationDenied.PrivateDomainNotSupport | The operation is not allowed because of PrivateDomainNotSupport. | - |
400 | DependencyViolation.PrivateDnsName | The specified resource of %s depends on %s, so the operation cannot be completed. | - |
For a list of error codes, visit the Service error codes.
Change history
Change time | Summary of changes | Operation | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
2023-09-26 | The Error code has changed. The request parameters of the API has changed | see changesets | ||||||||||
| ||||||||||||
2023-09-19 | The Error code has changed | see changesets | ||||||||||
| ||||||||||||
2023-09-05 | The Error code has changed. The request parameters of the API 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 | ||||||||||
| ||||||||||||
2022-11-02 | The Error code has changed | see changesets | ||||||||||
| ||||||||||||
2022-09-20 | The Error code has changed. The request parameters of the API has changed | see changesets | ||||||||||
| ||||||||||||
2022-07-26 | The Error code has changed | see changesets | ||||||||||
| ||||||||||||
2021-12-03 | The Error code has changed | see changesets | ||||||||||
|