ModifyTenantUserPassword

2026-01-29 07:18:31  Updated

Applicability

Password modification is not supported for standby clusters in the current version.

Overview

You can call this API to modify the login password of a database account in a tenant.

API details

Constraints

The caller must have an AccessKey for accessing 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}/tenantUsers/{userName}/password

Request parameters

Query

Name Type Required Description Example value
instanceId string Yes The ID of the OceanBase cluster. ob317v4uif****
tenantId string Yes The ID of the tenant. t4pnum****
userName string Yes The name of the database account. Cannot use reserved keywords such as SYS and root. test

Body

Name Type Required Description Example value
instanceId string Yes The ID of the OceanBase cluster. ob317v4uif****
tenantId string Yes The ID of the tenant. t4pnum****
userName string Yes The name of the database account. Cannot use reserved keywords such as SYS and root. test
userPassword string Yes The password of the database account. Must contain uppercase letters, lowercase letters, numbers, and special characters, and be 10 to 32 characters in length. Special characters: !@#$%^&* ()_ +-= ob*********

Response parameters

Name Type Description Example value
success boolean Indicates whether the password is modified. true

Examples

Request example

curl -v  --request PUT \
  --digest   -u 'ak:sk' \
  --url 'https://api-cloud.oceanbase.com/api/v2/instances/{instanceId}/tenants/{tenantId}/tenantUsers/{userName}/password' \
  -H 'X-Ob-Project-Id: <Project ID>'
  --data \ '{"instanceId":"ob******82yhuo","tenantId":"t******9nltds","userName":"xxx", "userPassword": "******"}'

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

{
  "requestId":"c773fa32-****-****-b76e-cd428273dcbe",
  "success":true
}

Contact Us