Changing the Password
Function
This API is used to change the password of a DCS instance.
URI
PUT /v2/{project_id}/instances/{instance_id}/password
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
instance_id |
Yes |
String |
Parameter description: Instance ID. It can be viewed on the instance details page on the DCS console. Constraints: N/A Value range: N/A Default value: N/A |
|
project_id |
Yes |
String |
Parameter description: Project ID. For details, see Obtaining a Project ID. Constraints: N/A Value range: N/A Default value: N/A |
Request Parameters
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
old_password |
Yes |
String |
Definition Old instance password. Constraints The password contains 8 to 32 characters. Range Contains at least three types of the following characters:
Default Value N/A |
|
new_password |
Yes |
String |
Definition New instance password. Constraints The new password must be different from the old one. It contains 8 to 32 characters. Range Contains at least three types of the following characters:
Default Value N/A |
Response Parameters
Status code: 200
|
Parameter |
Type |
Description |
|---|---|---|
|
lock_time |
String |
Parameter description: Lockout duration, in minutes. After 5 consecutive incorrect password attempts, the account will be locked. Passwords cannot be changed or reset during the lockout period. Value range: 0–5 |
|
result |
String |
Parameter description: Password change result. Value range:
|
|
lock_time_left |
String |
Parameter description: Lockout remaining time, in minutes. Value range: 0–5 |
|
retry_times_left |
String |
Parameter description: Number of remaining password attempts. Value range: N/A |
|
message |
String |
Parameter description: Modification result description. Value range: N/A |
Status code: 400
|
Parameter |
Type |
Description |
|---|---|---|
|
error_msg |
String |
Parameter description: Error message. Value range: N/A. |
|
error_code |
String |
Parameter description: Error code. Value range: For details, see Error Codes. |
|
error_ext_msg |
String |
Parameter description: Extended error information. This parameter is not used currently and is set to null. Value range: N/A. |
Status code: 500
|
Parameter |
Type |
Description |
|---|---|---|
|
error_msg |
String |
Parameter description: Error message. Value range: N/A. |
|
error_code |
String |
Parameter description: Error code. Value range: For details, see Error Codes. |
|
error_ext_msg |
String |
Parameter description: Extended error information. This parameter is not used currently and is set to null. Value range: N/A. |
Example Requests
Changing the password of the DCS instance by entering the old and new passwords
PUT https://{dcs_endpoint}/v2/{project_id}/instances/{instance_id}/password
{
"old_password" : "XXXXXX",
"new_password" : "XXXXXX"
}
Example Responses
Status code: 200
The password is successfully changed.
{
"lock_time" : "0",
"result" : "success",
"lock_time_left" : "0",
"retry_times_left" : "5",
"message" : "Modify DCSInstance password success."
}
Status Codes
|
Status Code |
Description |
|---|---|
|
200 |
The password is successfully changed. |
|
400 |
Invalid request. |
|
500 |
Internal service error. |
Error Codes
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