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 the multi-cloud API. 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 address. If this parameter is not specified, the primary private address is returned. This parameter is required in read-only scenarios. | obe-4tw51gp7**** |
Response parameters
| Name | Type | Description | Example value |
|---|---|---|---|
| data | array[Object] | The list of tenant connection information. | |
| data.addressId | string | The ID of the address. | rs-private-intranet-vpc-xxxxx-OBPROXY-INTRANET-xxxxxxx |
| data.addressStatus | string | The status of the address. Valid values: |
PENDING_CREATE |
| data.addressType | string | The type of the address. Valid values: |
MASTER |
| data.connectionZones | array |
The connection regions. | ap-beijing-4 |
| data.networkType | string | The type of the address. 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 privilege. Valid values:
|
READWRITE |
| data.userNameFormat | string | The format of the username. 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.
- Make sure that the project ID corresponding to the specified instanceId is consistent with the specified project ID.
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
}