Overview
You can call this API to modify the display name of a tenant in the specified OceanBase cluster.
API details
Constraints
The caller must have an AccessKey for accessing the APIs of OceanBase Cloud. For information about how to obtain the AccessKey ID and AccessKey secret, see Manage AccessKeys.
Request path
PUT /api/v2/instances/{instanceId}/tenants/{tenantId}/tenantName
Request parameters
Path parameters
| Name |
Type |
Required |
Description |
Example value |
| instanceId |
String |
Yes |
The ID of the OceanBase instance. |
ob317v4uif**** |
| tenantId |
String |
Yes |
The ID of the tenant. |
t33h8y08k**** |
Query parameters
| Name |
Type |
Required |
Description |
Example value |
| requestId |
String |
Yes |
The ID of the request, which is used for tracing. |
dc302d76-66b5-48d8-ab53-a035******** |
Request body parameters
| Name |
Type |
Required |
Description |
Example value |
| tenantName |
String |
Yes |
The new name of the tenant. |
pay_tenant_new |
| patternCheck |
Boolean |
No |
Specifies whether to check the format of the new name. |
true |
Response parameters
| Name |
Type |
Description |
Example value |
| success |
Boolean |
Indicates whether the request was successful. |
true |
| data |
Object |
The returned data. |
|
| data.tenantId |
String |
The ID of the tenant. |
t33h8y08k**** |
| requestId |
String |
The ID of the request. |
dc302d76-66b5-48d8-ab53-a035******** |
| server |
String |
The address of the server that processed the request. |
xxx.xxx.x.xxx:xxxx |
Examples
Request example
curl -v --request PUT \
--url 'https://api-cloud.oceanbase.com/api/v2/instances/{instanceId}/tenants/{tenantId}/tenantName?requestId={requestId}' \
--digest -u '<your ak:sk>' \
-H 'X-Ob-Project-Id: {projectId}' \
-H 'Content-Type: application/json' \
--data '{"tenantName": "pay_tenant_new", "patternCheck": true}'
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
{
"success": true,
"data": {
"tenantId": "t33h8y08k****"
},
"requestId": "dc302d76-66b5-48d8-ab53-a035********",
"server": "xxx.xxx.x.xxx:xxxx"
}