Overview
Call ConnectPrivatelinkService to connect to the database through a Private Link endpoint.
API details
Constraints
The caller must have an AccessKey for accessing APIs of multi-cloud services. For information about how to obtain the AccessKey ID and AccessKey secret, see Manage AccessKeys.
Request path
POST /api/v2/instances/{instanceId}/tenants/{tenantId}/privatelink/connection
Request parameters
Path
Name |
Type |
Required |
Description |
Example value |
|---|---|---|---|---|
| instanceId | String | Yes | The ID of the OceanBase Cloud instance. | ob317v4uif**** |
| tenantId | String | Yes | The ID of the tenant. | t33h8y08k**** |
Query
Name |
Type |
Required |
Description |
Example value |
|---|---|---|---|---|
| requestId | String | Yes | The ID of the request, which is used for tracing. | dc302d76-66b5-48d8-ab53-a035******** |
Body
Name |
Type |
Required |
Description |
Example value |
|---|---|---|---|---|
| endpointId | String | Yes | The ID of the endpoint you created in your VPC. | ep-xxxxxx |
| addressId | String | No | The ID of the address. This parameter is required in read-only scenarios. | obe-4tw51gp7**** |
| userEndpointAddress | String | No | The address of the endpoint. |
Response parameters
Parameter |
Type |
Description |
|---|---|---|
| requestId | string | The ID of the request. |
| success | string | Indicates whether the connection operation succeeded. Valid values: |
Examples
Request example
curl --digest -u '<your ak:sk>' \
--request POST \
-H 'Content-Type: application/json' \
-H 'X-Ob-Project-Id: <Project ID>' \
--data '{"endpointId": "ep-xxxxxx", "addressId": "obe-4tw51gp7****", "userEndpointAddress": ""}' \
'https://api-cloud.oceanbase.com/api/v2/instances/{instanceId}/tenants/{tenantId}/privatelink/connection?requestId={requestId}'
Note
- A project ID uniquely identifies a project. For information about how to obtain the project ID of an instance, see Manage projects.
- Make sure that the project ID corresponding to the specified instanceId is consistent with the specified project ID.
Response example
JSON format
{
"data": {},
"requestId": "ecf10c08-****-****-****-8a2e57897f74",
"success": true
}