Call the CreateVpcEndpoint to create an endpoint under the service account VPC to connect to the endpoint service under the user VPC to connect to the network in one direction.
For more information about this API operation, see Configure a private connection to an instance.
Debugging
Request headers
This operation uses only common request headers. For more information, see the topic about common request parameters.
Request syntax
POST /openapi/instances/{InstanceId}/vpc-endpoints HTTP/1.1
Request parameter
Parameter | Type | Position | Required | Example | Description |
---|---|---|---|---|---|
InstanceId | String | Path | Yes | es-cn-2r429tctl000d**** |
The ID of the instance. |
ClientToken | String | Query | No | 5FFD9ED4-C2EC-4E89-B22B-1ACB6FE1D*** |
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 | Query | No | false |
Specifies whether to precheck only this request. Valid values:
|
Object | Body | No |
The information about the endpoint service. |
||
serviceId | String | Body | No | epsrv-hp3xdsq46ael67lo**** |
The ID of the endpoint service that you created. The ID of this service to be associated with the service VPC-side endpoint. |
zoneId | String | Body | No | cn-hangzhou-i |
The zone ID of the endpoint service that you created. |
Response parameters
Parameter | Type | Example | Description |
---|---|---|---|
RequestId | String | F99407AB-2FA9-489E-A259-40CF6DCC47D9 |
The ID of the request. |
Result | Object |
The returned result details. |
|
serviceId | String | epsrv-bp1w0p3jdirbfmt6**** |
The ID of the user endpoint service associated with the endpoint. |
endpointDomain | String | ep-bp1tah7zbrwmkjef****.epsrv-bp1w0p3jdirbfmt6****.cn-hangzhou.privatelink.aliyuncs.com |
The endpoint domain name, which is used to configure the connection. |
endpointId | String | ep-bp1tah7zbrwmkjef**** |
The ID of the endpoint on the service VPC side. |
endpointName | String | vpcElasticSearchABC |
The name of the service VPC-side endpoint. |
Examples
Sample requests
POST /openapi/instances/es-cn-2r429tctl000d****/vpc-endpoints HTTP/1.1
Content-Type:application/json
{
"serviceId" : "epsrv-hp3xdsq46ael67lo****",
"zoneId" : "cn-hangzhou-i"
}
Sample success responses
JSON
format
HTTP/1.1 200 OK
Content-Type:application/json
{
"RequestId" : "F99407AB-2FA9-489E-A259-40CF6DCC47D9",
"Result" : {
"serviceId" : "epsrv-hp3vpx8yqxblby3i****",
"endpointName" : "vpcElasticSearchABC",
"endpointId" : "ep-hp33b2e43fays7s8****",
"endpointDomain" : "ep-hp33b2e43fays7s8****.epsrv-hp3xdsq46ael67lo****.cn-huhehaote.privatelink.aliyuncs.com"
}
}
Error codes
For a list of error codes, visit the API Error Center.