Description
This interface is used to modify the parameters of a tenant.
Call instructions
Interface constraints
The caller must have the permission to update the target tenant.
For more information about the permissions of the caller, see Overview of users and permissions.
The caller must be authenticated by using OCP.
Request path
PUT /api/v2/ob/clusters/{id}/tenants/{tenantId}/parameters
Request parameters
path:
Parameter |
Type |
Required |
Example value |
Description |
|---|---|---|---|---|
| id | Long | Yes | 1 | The cluster ID of the target tenant in OCP. |
| tenantId | Long | Yes | 12 | The tenant ID of the target tenant in OCP. |
body:
Parameter |
Type |
Required |
Example value |
Description |
|---|---|---|---|---|
| TenantParameterParam | Array | Yes | - | The list of TenantParameterParam objects. For more information, see TenantParameterParam data structure. |
TenantParameterParam data structure
Parameter |
Type |
Required |
Example value |
Description |
|---|---|---|---|---|
| name | String | Yes | ob_default_replica_num | The parameter name, which specifies the number of OceanBase Database replicas by default. |
| value | String | Yes | 2 | The parameter value. |
| parameterType | String | Yes | OB_SYSTEM_VARIABLE | The parameter type. Valid values: OB_SYSTEM_VARIABLE (variable) and OB_TENANT_PARAMETER (parameter). |
Response
Basic data structure
Parameter |
Type |
Description |
|---|---|---|
| successful | Boolean | Specifies whether the request is successful. |
| timestamp | Datetime | The timestamp when the server finishes processing the request. |
| duration | Integer | The time taken by the server to process the request, in milliseconds. |
| status | Integer | The HTTP status code that conforms to the HTTP standard. |
| traceId | String | The Trace ID of the request, which is used to troubleshoot issues. |
| server | String | The address of the application service that responds to the request. |
Examples
Request example
PUT /api/v2/ob/clusters/1/tenants/12/parameters
[
{
"name": "ob_default_replica_num",
"value": 2,
"parameterType": "OB_TENANT_PARAMETER"
}
]
Response example
{
"duration": 3464,
"server": "a83ad33525",
"status": 200,
"successful": true,
"timestamp": "2021-09-05T23:38:06.907+08:00",
"traceId": "9d3721be71e94f25"
}
