pydo.databases.reset_auth()

Generated on 30 Jun 2025 from pydo version v0.12.0

Description

To reset the password for a database user, send a POST request to /v2/databases/$DATABASE_ID/users/$USERNAME/reset_auth.

For mysql databases, the authentication method can be specifying by including a key in the JSON body called mysql_settings with the auth_plugin value specified.

The response will be a JSON object with a user key. This will be set to an object containing the standard database user attributes.

Parameters

Name Type Required Description Default Value
database_cluster_uuid string True A unique identifier for a database cluster.
username string True The name of the database user.
body JSON or IO[bytes] True

Request Sample

import os
from pydo import Client

client = Client(token=os.environ.get("DIGITALOCEAN_TOKEN"))

req = {
  "mysql_settings": {
    "auth_plugin": "caching_sha2_password"
  }
}

get_resp = client.databases.reset_auth(database_cluster_uuid="a7a8bas", username="admin", body=req)

More Information

See the API spec for this endpoint to view additional detail on responses, headers, parameters, and more.

We can't find any results for your search.

Try using different keywords or simplifying your search terms.