Overview
You can call this API to modify the primary zone of a tenant for failover and load balancing.
API details
Constraints
The caller must have an AccessKey for accessing the 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}/primaryZone
Request parameters
Path
| Name | Type | Required | Description | Example value |
|---|---|---|---|---|
| instanceId | String | Yes | The ID of the OceanBase cluster. | obcluster-***** |
| tenantId | String | Yes | The ID of the tenant. | t4louaeei**** |
Query
| Name | Type | Required | Description | Example value |
|---|---|---|---|---|
| requestId | String | Yes | The request ID for tracking. | dc302d76-66b5-48d8-ab53-a035******** |
Body
| Name | Type | Required | Description | Example value |
|---|---|---|---|---|
| primaryZone | String | Yes | The primary zone of the tenant. | primaryZone_7766715fb478 |
| proxyAddressMasterZone | String | Yes | The primary zone of the link. | proxyAddressMasterZone_c0831d11a19e |
Response parameters
| Parameter | Type | Description |
|---|---|---|
| requestId | String | The request ID. |
| success | Boolean | Indicates whether the request was successful. |
Examples
Request example
curl --digest -u '<your ak:sk>' \
-X PUT \
'https://api-cloud.oceanbase.com/api/v2/instances/{instanceId}/tenants/{tenantId}/primaryZone?requestId={requestId}' \
-H 'Content-Type: application/json' \
--data '{
"primaryZone": "primaryZone_7766715fb478",
"proxyAddressMasterZone": "proxyAddressMasterZone_c0831d11a19e"
}'
Response example
JSON format
{
"requestId": "xxxxxx",
"success": true
}
Differences between public cloud and multi-cloud
The APIs on the public cloud and multi-cloud platforms are significantly different. On the public cloud, this API allows you to modify the primary zone of a tenant and the primary zone of the link. You need to specify the corresponding VPC and VSwitch.
