{"command":{"effect":"write","timeoutSeconds":30,"inputSchema":{"type":"object","description":"To update an existing database user, send a PUT request to `/v2/databases/$DATABASE_ID/users/$USERNAME`\nwith the desired settings.\n\n**Note**: only `settings` can be updated via this type of request. If you wish to change the name of a user,\nyou must recreate a new user.\n\nFor PostgreSQL clusters, you can update `settings.pg_allow_replication` to enable or\ndisable replication privileges for the user. When omitted, the value defaults to `false`.\n\nFor Kafka and OpenSearch clusters, additional options can be configured in the\n`settings` object (for example, topic or index ACLs).\n\nUpdating users is supported for PostgreSQL, Kafka, and OpenSearch clusters. For\nother engines, the request returns a 422. MongoDB roles and database access are\nset with `settings.mongo_user_settings` when creating a user and cannot be\nchanged afterward; recreate the user to apply different roles or databases.\n\nThe response will be a JSON object with a key called `user`. The value of this will be an\nobject that contains the name of the updated database user, along with the `settings` object that\nhas been updated.\n","properties":{"path":{"type":"object","properties":{"database_cluster_uuid":{"type":"string","format":"uuid","examples":["9cc10173-e9ea-4176-9dbc-a4cee4c4ff30"],"description":"A unique identifier for a database cluster."},"username":{"type":"string","examples":["app-01"],"description":"The name of the database user."}},"required":["database_cluster_uuid","username"],"additionalProperties":false},"body":{"allOf":[{"type":"object","properties":{"settings":{"$ref":"#/definitions/user_settings_update"}}}],"required":["settings"],"examples":[{"settings":{"pg_allow_replication":true}}]}},"required":["path","body"],"additionalProperties":false,"definitions":{"user_settings_update":{"type":"object","description":"User settings that can be updated via the Update a Database User endpoint.\nSupported for PostgreSQL, Kafka, and OpenSearch clusters. For other engines,\nthe request returns a 422. MongoDB user roles and database access\n(`mongo_user_settings`) cannot be updated after creation; recreate the user\nto change them.\n","properties":{"pg_allow_replication":{"type":"boolean","description":"For PostgreSQL clusters, set to `true` to grant the user replication\nprivileges. When omitted on create or update, the value defaults to\n`false` and replication privileges are not granted. This option is not\ncurrently supported for other database engines.\n","examples":[true]},"opensearch_acl":{"type":"array","items":{"type":"object","properties":{"index":{"type":"string","description":"A regex for matching the indexes that this ACL should apply to.","examples":["index-abc.*"]},"permission":{"type":"string","enum":["deny","admin","read","readwrite","write"],"description":"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.","examples":["read"]}}},"description":"ACLs (Access Control Lists) specifying permissions on index within a OpenSearch cluster."},"acl":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"An identifier for the ACL. Will be computed after the ACL is created/updated.","examples":["aaa"]},"topic":{"type":"string","description":"A regex for matching the topic(s) that this ACL should apply to.","examples":["topic-abc.*"]},"permission":{"type":"string","enum":["admin","consume","produce","produceconsume"],"description":"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).","examples":["consume"]}},"required":["topic","permission"]},"description":"ACLs (Access Control Lists) specifying permissions on topics within a Kafka cluster."}}}}},"name":"Update a Database User","id":"digitalocean.databases_update_user","example":{"path":{"database_cluster_uuid":"9cc10173-e9ea-4176-9dbc-a4cee4c4ff30","username":"app-01"},"body":{"settings":{"pg_allow_replication":true}}},"maxRequests":1,"summary":false}}