DatabaseAsAService/modify userattributes
Overview
At present, when a Cloud Database user creates a username, password and hostname for a database user, he does not have the ability to modify these user attributes. This API enables the Cloud DB user to modify one or more of these user attributes (username,hostname,password).
API Restrictions
At least one of the attributes needs to be specified for the purpose of modification, else an error response - 400 (Bad Request) is thrown. If an attribute is not specified, then it is not updated.
Field Name | Description | Maximum Length | |
---|---|---|---|
Name | Name of the user for the database | 16 | |
Password | User password for database access | unlimited | |
Hostname | Specifies the host from which a user is allowed to connect to the database.Possible values are a string containing an IPv4 address or "%" to allow connecting from any host. | IPv4 address or "%" |
API Details
Verb | URI | Description |
---|---|---|
PUT | /instances/{instance_id}/users/{userid} | Modify the details of a single user referred to by userid. Userid in this case is user or user@host, whichever is appropriate. |
Request:
{ "user": { "name": <new name>, "host": <new host>, "password": <new password> } }
Response : 202 Accepted ( no body)
XML Request:
<user host="10.0.0.1" password="password" name="dbuser1"/>