Help Center/ GeminiDB/ API Reference/ APIs v3 (Recommended)/ Managing Databases and Accounts/ Resetting the Password of a Database Account
Updated on 2024-08-08 GMT+08:00

Resetting the Password of a Database Account

Function

This API is used to reset the password for a GeminiDB Redis database account.

Constraints

  • Only the GeminiDB Redis API is supported.
  • This operation cannot be performed when the instance is in any of the following states: creating, changing specifications, changing database port, frozen, or abnormal.

URI

PUT /v3/{project_id}/redis/instances/{instance_id}/db-users/password

Table 1 Path parameters

Parameter

Mandatory

Type

Description

project_id

Yes

String

Project ID. To obtain this value, see Obtaining a Project ID.

instance_id

Yes

String

Instance ID.

Request Parameters

Table 2 Request header parameters

Parameter

Mandatory

Type

Description

X-Auth-Token

Yes

String

User token.

Table 3 Request body parameters

Parameter

Mandatory

Type

Description

name

Yes

String

Account name.

password

Yes

String

Password to be reset. The password:

  • Can contain 8 to 32 characters.
  • Must contain at least two of the following types: uppercase letters, lowercase letters, digits, and special characters. The following special characters are allowed: ~!@#%^*-_=+?$()&

Response Parameters

Status code: 204

No response parameters

Example Requests

  • URI example
    PUT https://gaussdb-nosql.ap-southeast-1.myhuaweicloud.com/v3/054e292c9880d4992f02c0196d3ea468/redis/instances/3d39c18788b54a919bab633874c159dfin12/db-users/password 
  • Resetting the password of user db_user1
    { 
      "name" : "db_user1", 
      "password" : "********" 
    }

Example Responses

None

Status Codes

For details, see Status Codes.

Error Codes

For details, see Error Codes.