PUT /v2/databases/{database_cluster_uuid}/users/{username}
To update an existing database user, send a PUT request to /v2/databases/$DATABASE_ID/users/$USERNAME
with the desired settings.
Note: only settings
can be updated via this type of request. If you wish to change the name of a user,
you must recreate a new user.
The response will be a JSON object with a key called user
. The value of this will be an
object that contains the name of the update database user, along with the settings
object that
has been updated.
Servers
- https://api.digitalocean.com
Path parameters
Name | Type | Required | Description |
---|---|---|---|
username |
String | Yes |
The name of the database user. |
database_cluster_uuid |
String | Yes |
A unique identifier for a database cluster. |
Request headers
Name | Type | Required | Description |
---|---|---|---|
Content-Type |
String | Yes |
The media type of the request body.
Default value: "application/json" |
Request body fields
Name | Type | Required | Description |
---|---|---|---|
settings |
Object | Yes | |
settings.mongo_user_settings |
Object | No |
MongoDB-specific settings for the user. This option is not currently supported for other database engines. |
settings.mongo_user_settings.databases[] |
Array | No |
A list of databases to which the user should have access. When the database is set to |
settings.mongo_user_settings.role |
String | No |
The role to assign to the user with each role mapping to a MongoDB built-in role. Possible values:
|
settings.pg_allow_replication |
Boolean | No |
For Postgres clusters, set to |
settings.opensearch_acl[] |
Array | No |
ACLs (Access Control Lists) specifying permissions on index within a OpenSearch cluster. |
settings.opensearch_acl[].permission |
String | No |
Permission set applied to the ACL. 'read' allows user to read from the index. 'write' allows for user to write to the index. 'readwrite' allows for both 'read' and 'write' permission. 'deny'(default) restricts user from performing any operation over an index. 'admin' allows for 'readwrite' as well as any operations to administer the index. Possible values:
|
settings.opensearch_acl[].index |
String | No |
A regex for matching the indexes that this ACL should apply to. |
settings.acl[] |
Array | No |
ACLs (Access Control Lists) specifying permissions on topics within a Kafka cluster. |
settings.acl[].id |
String | No |
An identifier for the ACL. Will be computed after the ACL is created/updated. |
settings.acl[].permission |
String | Yes |
Permission set applied to the ACL. 'consume' allows for messages to be consumed from the topic. 'produce' allows for messages to be published to the topic. 'produceconsume' allows for both 'consume' and 'produce' permission. 'admin' allows for 'produceconsume' as well as any operations to administer the topic (delete, update). Possible values:
|
settings.acl[].topic |
String | Yes |
A regex for matching the topic(s) that this ACL should apply to. |
How to start integrating
- Add HTTP Task to your workflow definition.
- Search for the API you want to integrate with and click on the name.
- This loads the API reference documentation and prepares the Http request settings.
- Click Test request to test run your request to the API and see the API's response.