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 eu-west-1

The region ID of the endpoint. You can call the DescribeRegions operation to query the most recent region list.

SecurityGroupId.N RepeatList Yes sg-hp33bw6ynvm2yb0e****

The ID of the security group that is associated with the elastic network interface (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.

ServiceId String Yes epsrv-hp3xdsq46ael67lo****

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

VpcId String Yes vpc-hp356stwkxg3fn2xe****

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

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 ClientToken parameter can contain only ASCII characters and cannot exceed 64 characters in length.

DryRun Boolean No false

Specifies whether to precheck this 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 checks whether the AccessKey pair is valid, whether the RAM user is authorized, and whether the required parameters are specified. If the request fails the precheck, the corresponding error message is returned. If the request passes the precheck, the DryRunOperation error code is returned.

false: sends the API request. After the request passes the check, a 2XX HTTP status code is returned, and the endpoint is created. This is the default value.

EndpointName String No test

The name of the endpoint.

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

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://.

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

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

Zone.N.VSwitchId String No vsw-hp3uf6045ljdhd5zr****

The ID of the vSwitch within which you want to create an endpoint ENI.

Valid values of N: 1 to 10.

Zone.N.ZoneId String No eu-west-1a

The zone ID 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.

Response parameters

Parameter Type Example Description
Bandwidth Long 1024

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

ConnectionStatus String Disconnected

The status of the endpoint connection. Valid values:

  • Pending: The endpoint connection is being modified.
  • Connecting: The endpoint is waiting for the endpoint service to accept the connection request.
  • Connected: The endpoint is connected to the endpoint service.
  • Disconnecting: The endpoint is disconnecting from the endpoint service.
  • Disconnected: The endpoint is disconnected from the endpoint service.
  • Deleting: The endpoint connection is being deleted.
CreateTime String 2020-01-02T19:11:12Z

The time when the endpoint was created.

EndpointBusinessStatus String Normal

The business status of the endpoint. Valid values:

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

The description of the endpoint.

EndpointDomain String ep-hp33b2e43fays7s8****.epsrv-hp3xdsq46ael67lo****.cn-huhehaote.privatelink.aliyuncs.com

The domain name of the endpoint.

EndpointId String ep-hp33b2e43fays7s8****

The ID of the endpoint.

EndpointName String test

The name of the endpoint.

EndpointStatus String Active

The status of the endpoint. Valid values:

  • Creating: The endpoint is being created.
  • Active: The endpoint is available.
  • Pending: The endpoint is being modified.
  • Deleting: The endpoint is being deleted.
RequestId String 0ED8D006-F706-4D23-88ED-E11ED28DCAC0

The ID of the request.

ServiceId String epsrv-hp3vpx8yqxblby3i****

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

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

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

VpcId String vpc-hp356stwkxg3fn2xe****

The ID of the VPC to which the endpoint belongs.

Examples

Sample requests

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

Sample success responses

XML format

<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>1024</Bandwidth>
  <EndpointId>ep-hp33b2e43fays7s8****</EndpointId>
  <ConnectionStatus>Disconnected</ConnectionStatus>
</CreateVpcEndpointResponse>

JSON format

{
    "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": 1024,
    "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 zone is unavailable for the endpoint service.
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 exceeded the quota.
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.

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