users
Overview
Name | users |
Type | Resource |
Id | digitalocean.databases.users |
Fields
Name | Datatype | Description |
---|---|---|
name | string | The name of a database user. |
mysql_settings | object | |
password | string | A randomly generated password for the database user. |
role | string | A string representing the database user's role. The value will be either "primary" or "normal". |
Methods
Name | Accessible by | Required Params | Description |
---|---|---|---|
get_user | SELECT | database_cluster_uuid, username | To show information about an existing database user, send a GET request to/v2/databases/$DATABASE_ID/users/$USERNAME .Note: User management is not supported for Redis clusters. The response will be a JSON object with a user key. This will be set to an objectcontaining the standard database user attributes. For MySQL clusters, additional options will be contained in the mysql_settings object. |
list_users | SELECT | database_cluster_uuid | To list all of the users for your database cluster, send a GET request to/v2/databases/$DATABASE_ID/users .Note: User management is not supported for Redis clusters. The result will be a JSON object with a users key. This will be set to an arrayof database user objects, each of which will contain the standard database user attributes. For MySQL clusters, additional options will be contained in the mysql_settings object. |
add_user | INSERT | database_cluster_uuid, data__name | To add a new database user, send a POST request to /v2/databases/$DATABASE_ID/users with the desired username. Note: User management is not supported for Redis clusters. When adding a user to a MySQL cluster, additional options can be configured in the mysql_settings object.The response will be a JSON object with a key called user . The value of this will be anobject that contains the standard attributes associated with a database user including its randomly generated password. |
delete_user | DELETE | database_cluster_uuid, username | To remove a specific database user, send a DELETE request to/v2/databases/$DATABASE_ID/users/$USERNAME .A status of 204 will be given. This indicates that the request was processed successfully, but that no response body is needed. Note: User management is not supported for Redis clusters. |
_get_user | EXEC | database_cluster_uuid, username | To show information about an existing database user, send a GET request to/v2/databases/$DATABASE_ID/users/$USERNAME .Note: User management is not supported for Redis clusters. The response will be a JSON object with a user key. This will be set to an objectcontaining the standard database user attributes. For MySQL clusters, additional options will be contained in the mysql_settings object. |
_list_users | EXEC | database_cluster_uuid | To list all of the users for your database cluster, send a GET request to/v2/databases/$DATABASE_ID/users .Note: User management is not supported for Redis clusters. The result will be a JSON object with a users key. This will be set to an arrayof database user objects, each of which will contain the standard database user attributes. For MySQL clusters, additional options will be contained in the mysql_settings object. |
reset_auth | EXEC | database_cluster_uuid, username | 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 byincluding 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 anobject containing the standard database user attributes. |