Overview
You can call this API to create a singleTunnelSLB address for a tenant.
Note
This API applies only to tenants in instances of Alibaba Cloud.
API details
Constraints
The caller must have an AccessKey for accessing the APIs of multiple cloud vendors. For information about how to obtain the AccessKey ID and AccessKey secret, see Manage AccessKeys.
Request path
POST /api/v2/instances/{instanceId}/tenants/{tenantId}/tenantSingleTunnelSLBAddress
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 | Request ID | 6e87d618-854e-4ca1-ae1f-babc******** |
Body
| Name | Type | Required | Description | Example value |
|---|---|---|---|---|
| userVpcId | String | Yes | The ID of the user's VPC. | your-vpc-id |
| userVpcOwnerId | String | Yes | The ID of the VPC owner. | your-vpc-owner-id |
| userVswitchId | String | Yes | The ID of the user's VSwitch. | your-vswitch-id |
| vipServiceType | String | Yes | The type of the address. | OBPROXY_INTRANET, OBPROXY_INTERNET, OBPROXY_READONLY, OBPROXY_READWRITE...... |
| zoneIdList | List |
No | The zones selected by the user. | ["cn-bj-d"] |
| trafficStrategy | Traffic strategy | No | AVAILABLE_ZONE_PRIORITY: prioritize the same zone, AUTO_BALANCE: automatically balance, CUSTOM_WEIGHT: custom weight | |
| replicaParams | String | No | The replicas selected. | [{"Value":"FULL", "weight": 0,"readOnlyReplicaType": ""}] |
| disasterRecoveryReplicaParams | String | No | The disaster recovery replicas selected. | Same as above |
| balancedStrategy | String | No | The balancing strategy. | AVAILABLE_ZONE_PRIORITY: prioritize the same zone, AUTO_BALANCE: automatically balance, CUSTOM_WEIGHT: custom weight |
| disasterRecoveryStrategy | String | No | The disaster recovery strategy. If the replicas are unavailable, the primary replicas are automatically selected. | YES |
Response parameters
| Name | Type | Description | Example value |
|---|---|---|---|
| success | boolean | Whether the operation succeeded | true/false |
| errorCode | string | Error code | "E001" |
| errorMessage | string | Error message | "The operation was successful." |
| data | object | Business data | {...} |
| data.addressId | string | The VIP service group name. | "12345" |
| cost | integer[int64] | The time consumed (ms) | 150 |
| server | string | Server address | "xx.xxx.xx.xxx" |
| requestId | string | Request ID | "req_20250811_001" |
| totalCount | integer[int64] | Total number | 100 |
| extra | object | 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}/tenantSingleTunnelSLBAddress'\
-H 'X-Ob-Project-Id: <Project ID>'\
--data \ '{"userVpcId":"xxx", "userVpcOwnerId": "xxx", "userVswitchId": "xxx", "vipServiceType": "OBPROXY_INTRANET"}'
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
}