Modifying an Account (a V3 API)
Function
This API is used to change the permissions or associated schemas of a DDM account.
Constraints
At least one of the following parameters must be configured: base_authority, description, databases, or password_lifetime.
API Calling
For details, see Calling APIs.
Authorization Information
Each account has permissions to call all APIs, but IAM users must have the required permissions specifically assigned.
- If you are using role/policy-based authorization, see the required permissions in Permissions Policies and Supported Actions.
- If you are using identity policy-based authorization, the following identity policy-based permissions are required.
URI
PUT /v3/{project_id}/instances/{instance_id}/users/{username}
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| project_id | Yes | String | Definition Project ID of a tenant in a region To obtain this value, see Obtaining a Project ID. Constraints N/A Range The value can contain 32 characters. Only letters and digits are supported. Default Value N/A |
| instance_id | Yes | String | Definition Instance ID, which uniquely identifies an instance Constraints N/A Range The value contains 36 characters with a suffix of in09. Only letters and digits are allowed. Default Value N/A |
| username | Yes | String | Definition Name of the account to be modified. Constraints N/A Range N/A Default Value N/A |
Request Parameters
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| X-Auth-Token | Yes | String | Definition User token. Constraints N/A Range N/A Default Value N/A |
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| base_authority | No | Array of strings | Definition Basic permissions of the DDM account Constraints None Range Any combination of CREATE, DROP, ALTER, INDEX, INSERT, DELETE, UPDATE, and SELECT Default Value N/A |
| description | No | String | Definition Instance account description Constraints Range N/A Default Value N/A |
| password_lifetime | No | Long | Definition Password validity period of a DDM account Constraints N/A Range The value is an integer ranging from 0 to 65535, in days. The value 0 or null indicates that the password never expires. Default Value The default value is null, indicating that the password never expires. |
| databases | No | Array of UpdateUserRelatedLogicDbV3 objects | Associated schemas The databases field is optional. You can create a DDM account without associating it with any schema. |
Example Request
-
Changing the permissions of an account
PUT https://{endpoint}/v3/619d3e78f61b4be68bc5aa0b59edcf7b/instances/61a4ea66210545909d74a05c27a7179ein09/users/testuser { "base_authority" : [ "CREATE", "DROP", "ALTER", "INDEX", "INSERT", "DELETE", "UPDATE", "SELECT" ] } -
Changing the description of an account
PUT https://{endpoint}/v3/619d3e78f61b4be68bc5aa0b59edcf7b/instances/61a4ea66210545909d74a05c27a7179ein09/users/testuser { "description" : "new description" } -
Changing the password validity period of an account
PUT https://{endpoint}/v3/619d3e78f61b4be68bc5aa0b59edcf7b/instances/61a4ea66210545909d74a05c27a7179ein09/users/testuser { "password_lifetime" : 60 }
Example Response
- Normal response example
{ } - Abnormal response
For details, see Abnormal Request Results.
Status Code
- Normal
- Abnormal
For details, see Status Codes.
Error Codes
For details, see Error Codes.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot