Overview
You can call this API to create a tenant address.
API details
Constraints
The caller must have an AccessKey for accessing multi-cloud APIs. For information about how to obtain the AccessKey ID and AccessKey secret, see Manage AccessKeys.
Request path
PUT /api/v2/instances/{instanceId}/tenants/{tenantId}/address
Request parameters
Path
| Name | Type | Required | Description | Example value |
|---|---|---|---|---|
| instanceId | string | Yes | The ID of the OceanBase cluster. | ob317v4uif**** |
| tenantId | string | Yes | The ID of the tenant. | ob2mr3oae0**** |
Query
| Name | Type | Required | Description | Example value |
|---|---|---|---|---|
| requestId | String | Yes | The request ID | 6e87d618-854e-4ca1-ae1f-babc******** |
Body
| Name | Type | Required | Description | Example value |
|---|---|---|---|---|
| vipServiceType | String | Yes | The address type. | OBPROXY_INTRANET, OBPROXY_INTERNET, OBPROXY_READONLY, OBPROXY_READWRITE...... |
| vpcConnectionInfoId | Long | No | The ID of the peering connection, which is not provided by the cloud service provider. If the value of the vipServiceType parameter is OBPROXY_INTRANET_PEERING, you must specify this parameter. | 0 |
Response parameters
| Name | Type | Description | Example value |
|---|---|---|---|
| success | boolean | Indicates whether the operation succeeded. | true/false |
| errorCode | string | The error code. | "E001" |
| errorMessage | string | The error message. | "Operation succeeded" |
| data | object | The business data. | {...} |
| data.addressId | string | The VIP service group name. | "12345" |
| cost | integer[int64] | The time consumed (in milliseconds) | 150 |
| server | string | The server address. | "xx.xxx.xx.xxx" |
| requestId | string | The request ID. | "req_20250811_001" |
| totalCount | integer[int64] | The total number. | 100 |
| extra | object | The additional information. | {"key1": "value1"} |
Examples
Request example
curl --digest -u 'ak:sk' \
--request POST \
--url 'https://api-cloud.oceanbase.com/api/v2/instances/{instanceId}/tenants/{tenantId}/address?projectId=xxx'\
-H 'X-Ob-Project-Id: <Project ID>'\
--data \ '{"vipServiceType":"OBPROXY_INTERNET"}'
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-internet-751bc080-d862-4917-972e-48ae3d22****-OBPROXY-INTERNET-t6zffysc2bg2o-****"
},
"requestId": "6e87d618-854e-4ca1-ae1f-babcffd70000",
"success": true
}