Overview
You can call this API to query the connection information of a tenant.
Note
This API is not supported for Alibaba Cloud instances.
API details
Constraints
The caller must have an AccessKey for accessing APIs of OceanBase Cloud. For information about how to obtain the AccessKey ID and AccessKey secret, see Manage AccessKeys.
Request path
GET /api/v2/instances/{instanceId}/tenants/{tenantsId}/privatelink
Request parameters
| Name | Type | Required | Description | Example value |
|---|---|---|---|---|
| instanceId | String | Yes | The ID of the OceanBase cluster. | ob317v4uif**** |
| tenantId | String | Yes | The ID of the tenant. | t33h8y08k**** |
| addressId | String | No | The ID of the endpoint. If not specified, the primary private endpoint is returned. In read-only scenarios, this parameter is required. | obe-4tw51gp7**** |
Response parameters
| Parameter | Type | Description | Example value |
|---|---|---|---|
| data | array[Object] | The list of tenant connection information. | |
| data.addressId | string | The endpoint ID. | rs-private-intranet-vpc-xxxxx-OBPROXY-INTRANET-xxxxxxx |
| data.addressStatus | string | The endpoint status. Valid values: |
PENDING_CREATE |
| data.addressType | string | The endpoint type. Valid values: |
MASTER |
| data.connectionZones | array |
The connection regions. | ap-beijing-4 |
| data.networkType | string | The endpoint type. Valid values: |
INTRANET |
| data.privateLinkEndpointId | string | The endpoint ID. | vpce-xxxxxx |
| data.privateLinkServiceAccount | string | The account ID. | 10003xxxxxx |
| data.privateLinkServiceId | string | The service ID. | vpcsvc-xxxxx |
| data.privateLinkUserAccount | string | The user account. | 10002xxxxxx |
| data.role | string | The tenant role. Valid values:
|
READWRITE |
| data.userNameFormat | string | The username connection string format. The format is as follows: USER_AND_TENANT: username@tenant name. |
USER_AND_TENANT |
| data.statement | string | The connection status.
|
READWRITE |
| requestId | string | The request ID. | 8fb87c78-****-****-****-00b1c8e5af7b |
| success | string | Whether the query operation is successful. Valid values: |
true |
Examples
Request example
curl --digest -u 'ak:sk' \
--request GET \
-H 'X-Ob-Project-Id: <Project ID>' \
-G -d 'addressId=xxxx' \
'https://api-cloud.oceanbase.com/api/v2/instances/{instanceId}/tenants/{tenantsId}/privatelink'
Note
A project ID uniquely identifies a project. For information about how to obtain the project ID of an instance, see Manage projects.
Response example
JSON format
{
"data":[{
"addressId":"rs-private-intranet-vpc-xxxxx-OBPROXY-INTRANET-xxxxxxx",
"addressStatus":"PENDING_CREATE",
"addressType":"MASTER",
"connectionZones":[
"ap-beijing-4"
],
"intranetPort":3306,
"networkType":"INTRANET",
"privateLinkEndpointId":"vpce-xxxxxx",
"privateLinkServiceAccount":"10003xxxxxx",
"privateLinkServiceId":"vpcsvc-xxxxx",
"privateLinkStatus":"WAIT_CONFIRMATION",
"privateLinkUserAccount":"10002xxxxxx",
"role":"READWRITE",
"serviceType":"OBPROXY_INTRANET",
"tenantId":"xxxxxx",
"userNameFormat":"USER_AND_TENANT"
}],
"requestId":"8fb87c78-****-****-****-00b1c8e5af7b",
"success":true
}