Creates an endpoint.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer. OpenAPI Explorer dynamically generates the sample code of the operation for different SDKs.

Request parameters

Parameter Type Required Example Description
Action String Yes CreateVpcEndpoint

The operation that you want to perform. Set the value to CreateVpcEndpoint.

RegionId String Yes cn-huhehaote

The region ID of the endpoint.

You can call the DescribeRegions operation to query the most recent region list.

ClientToken String No 0c593ea1-3bea-11e9-b96b-88e9fe637760

The client token that is used to ensure the idempotence of the request.

You can use the client to generate the value, but you must make sure that it is unique among different requests. The token can contain only ASCII characters and cannot exceed 64 characters in length.

DryRun Boolean No false

Specifies whether to only precheck the request. Valid values:

  • true: prechecks the API request. If you select this option, the endpoint is not created after the request passes the precheck. The system prechecks the required parameters, request syntax, and limits. If the request fails to pass the precheck, an error message is returned. If the request passes the precheck, the DryRunOperation error code is returned.
  • false (default): sends the API request. If the request passes the precheck, a 2xx HTTP status code is returned and the operation is performed.
EndpointName String No test

The name of the endpoint.

The name must be 2 to 128 characters, and can contain digits, underscores (_), and hyphens (-). The name must start with a letter.

EndpointType String No Interface

The type of the endpoint.

Set the value to Interface, which specifies slb for the ServiceId parameter. The value slb specifies the Classic Load Balancer (CLB) endpoint type.

ZonePrivateIpAddressCount Long No 1

The number of private IP addresses that can be used by an elastic network interface (ENI) in each zone. Set the value to 1.

EndpointDescription String No This is my Endpoint.

The description of the endpoint.

The description must be 2 to 256 characters in length, and cannot start with http:// or https://.

VpcId String Yes vpc-hp356stwkxg3fn2xe****

The virtual private cloud (VPC) to which the endpoint belongs.

ServiceId String Yes epsrv-hp3xdsq46ael67lo****

The endpoint service with which the endpoint is associated.

ServiceName String No com.aliyuncs.privatelink.cn-huhehaote.epsrv-hp3vpx8yqxblby3i****

The name of the endpoint service with which the endpoint is associated.

ProtectedEnabled Boolean No false

Specifies whether to enable user authentication. This parameter is available in Security Token Service (STS) mode. Valid values:

  • true: yes After user authentication is enabled, only the user who creates the endpoint can modify or delete the endpoint in STS mode.
  • false (default): no
Zone.N.VSwitchId String No vsw-hp3uf6045ljdhd5zr****

The vSwitch where you want to create the ENI in the zone.

Valid values of N: 1 to 10.

Zone.N.ZoneId String No cn-huhehaote-b

The zone of the endpoint service.

Valid values of N: 1 to 10.

Zone.N.ip String No 192.168.XX.XX

The IP address of the zone in which the endpoint is deployed.

Valid values of N: 1 to 10.

SecurityGroupId.N String Yes sg-bp1fg655nh68xyz9****

The ID of the security group that is associated with the ENI of the endpoint. Security groups can be used to control data transfer between the VPC and the endpoint ENI.

Valid values of N: 1 to 10.

Response parameters

Parameter Type Example Description
EndpointDomain String ep-hp33b2e43fays7s8****.epsrv-hp3xdsq46ael67lo****.cn-huhehaote.privatelink.aliyuncs.com

The domain name of the endpoint.

RequestId String 0ED8D006-F706-4D23-88ED-E11ED28DCAC0

The ID of the request.

CreateTime String 2020-01-02T19:11:12Z

The time when the endpoint was created.

EndpointBusinessStatus String Normal

The business status of the endpoint service. Valid values:

  • Normal: normal
  • FinacialLocked: locked due to overdue payments
EndpointDescription String This is my Endpoint.

The description of the endpoint.

ServiceId String epsrv-hp3vpx8yqxblby3i****

The ID of the endpoint service with which the endpoint is associated.

EndpointStatus String Active

The status of the endpoint. Valid values:

  • Creating: being created
  • Active: available
  • Pending: being modified
  • Deleting: being deleted
VpcId String vpc-hp356stwkxg3fn2xe****

The VPC to which the endpoint belongs.

EndpointName String test

The name of the endpoint.

ServiceName String com.aliyuncs.privatelink.cn-huhehaote.epsrv-hp3xdsq46ael67lo****

The name of the endpoint service with which the endpoint is associated.

Bandwidth Long 200

The maximum bandwidth of the endpoint connection. Unit: Mbit/s.

EndpointId String ep-hp33b2e43fays7s8****

The ID of the endpoint.

ConnectionStatus String Disconnected

The status of the endpoint connection. Valid values:

  • Pending: being modified
  • Connecting: connecting
  • Connected: connected
  • Disconnecting: disconnecting
  • Disconnected: disconnected
  • Deleting: being deleted

Examples

Sample requests

http(s)://[Endpoint]/?Action=CreateVpcEndpoint
&RegionId=cn-huhehaote
&SecurityGroupId.1=sg-hp33bw6ynvm2yb0e****
&ServiceId=epsrv-hp3xdsq46ael67lo****
&VpcId=vpc-hp356stwkxg3fn2xe****
&<Common request parameters>

Sample success responses

XML format

HTTP/1.1 200 OK
Content-Type:application/xml

<CreateVpcEndpointResponse>
    <EndpointDomain>ep-hp33b2e43fays7s8****.epsrv-hp3xdsq46ael67lo****.cn-huhehaote.privatelink.aliyuncs.com</EndpointDomain>
    <RequestId>0ED8D006-F706-4D23-88ED-E11ED28DCAC0</RequestId>
    <CreateTime>2020-01-02T19:11:12Z</CreateTime>
    <EndpointBusinessStatus>Normal</EndpointBusinessStatus>
    <EndpointDescription>This is my Endpoint.</EndpointDescription>
    <ServiceId>epsrv-hp3vpx8yqxblby3i****</ServiceId>
    <EndpointStatus>Active</EndpointStatus>
    <VpcId>vpc-hp356stwkxg3fn2xe****</VpcId>
    <EndpointName>test</EndpointName>
    <ServiceName>com.aliyuncs.privatelink.cn-huhehaote.epsrv-hp3xdsq46ael67lo****</ServiceName>
    <Bandwidth>200</Bandwidth>
    <EndpointId>ep-hp33b2e43fays7s8****</EndpointId>
    <ConnectionStatus>Disconnected</ConnectionStatus>
</CreateVpcEndpointResponse>

JSON format

HTTP/1.1 200 OK
Content-Type:application/json

{
  "EndpointDomain" : "ep-hp33b2e43fays7s8****.epsrv-hp3xdsq46ael67lo****.cn-huhehaote.privatelink.aliyuncs.com",
  "RequestId" : "0ED8D006-F706-4D23-88ED-E11ED28DCAC0",
  "CreateTime" : "2020-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

HttpCode Error code Error message Description
400 EndpointExist The specified Endpoint already exists. The error message returned because the specified endpoint already exists.
400 EndpointZoneDuplicated The zone is duplicated for the Endpoint. The error message returned because duplicate zones exist.
400 EndpointServiceNotFound The specified Service does not exist. The error message returned because the specified endpoint service does not exist.
400 EndpointServiceNotSupportedZone The specified endpoint service does not support the zone. The error message returned because the endpoint service is not supported in the zone.
400 VSwitchNotFound The specified VSwitch does not exist. The error message returned because the specified vSwitch is not found.
400 SecurityGroupNotFound The specified security group does not exist. The error message returned because the specified security group does not exist.
400 VpcTunnelNotFound The specified VPC tunnel does not exist. The error message returned because the specified VPC tunnel is not found.
400 VpcNotFound The specified VPC does not exist. The error message returned because the specified VPC does not exist.
400 GenerateResourceIdFailed Failed to generate ResourceId. The error message returned because the system failed to generate the resource ID.
400 QuotaMisMatched The resource you applied for has exceeded the quota. The error message returned because the requested amount of resources has reached the upper limit.
400 EndpointMustContainSecurityGroup The specified endpoint must have at least one security group. The error message returned because the endpoint must be associated with at least one security group.
400 EndpointDuplicated The endpoint of the service already exists and cannot be created again. The error message returned because a duplicate endpoint exists.
400 EndpointServiceDeleted The specified Service is already deleted. The error message returned because the specified endpoint service is deleted.
400 EndpointServiceResourceNotFound The specified service resource is not found. The error message returned because the specified service resource for the endpoint service is not found.
400 SecurityGroupTypeNotSupport The specified security group type is not supported. The error message returned because the specified security group type is not supported.
400 EniIpUnavailable The specified IP address is unavailable. The error message returned because the specified IP address is unavailable.
400 EndpointServiceNotAuthorized The specified endpoint service is not authorized to user. The error message returned because the specified user is not authorized to use the endpoint service.
400 SecurityGroupTypeOnlySingleTypeSupporteded The specified security group only support one type. The error message returned because security groups support only one type.
400 QuotaExceeded.IpQuotaPerEp The quota of %s is exceeded, usage %s/%s. The error message returned because the usage %s has exceeded the quota %s.
400 Mismatch.EndpointType The %s is mismatched for %s and %s. The error message returned because %s does not correspond to %s and %s.
400 IncorrectStatus.VpcEndpointService The status of %s [%s] is incorrect. The error message returned because the status of the specified resource %s [%s] is invalid.

For a list of error codes, visit the API Error Center.