百度智能云

All Product Document

          Cloud Database MONGODB

          Modify Account Password

          Modify an Account Password

          Description

          Modify the password of the “root” account

          Request structure

          PUT /v{version}/instance/{dbInstanceId}?resetPassword  HTTP/1.1
          HOST: mongodb.bj.baidubce.com
          Authorization: authorization string
          {
              "accountPassword": accountPassword
          }

          Request header field

          No other special header fields are available except for the common header fields.

          Request parameter

          Parameter Name Type Required? Parameter Position Description
          version string Yes URL Parameter API version number
          dbInstanceId string Yes URL Parameter Designated instance Id
          accountPassword string Yes RequestBody parameter The password of the root account consists of 832 characters. English character(s), number(s), and symbol(s) must exist at the same time. The symbols are limited to “!”, “@”, “#”, “$”, “%”, “^”, “*”, and “()” only.
          The password needs to be encrypted and transmitted. All passwords are encrypted by the AES 128bit encryption algorithm. SK is used as the key, and the encrypted binary byte stream needs to be converted to the hexadecimal byte and passed to the server as a string. The operating steps are as follows:
          byte[] bCiphertext= AES(plaintext,SK) String strHex = HexStr(bCiphertext)

          Return header field

          There are no other special header fields except for the common header field.

          Return parameter

          No special return parameters are available.

          Request example

          PUT /v1/instance/m-qNlWTz?resetPassword HTTP/1.1
          HOST: mongodb.bj.baidubce.com
          Authorization: bce-auth-v1/f81d3b34e48048fbb2634dc7882d7e21/2017-11-21T04:17:29Z/3600/host/74c506f68c65e26c633bfa104c863fffac5190fdec1ec24b7c03eb5d67d2e1de
          {
              "accountPassword": "3869616F-7A68-6977-656E-4062BE16782"
          }

          Return example

          HTTP/1.1 200 OK
          x-bce-request-id: 7869616F-7A68-6977-656E-406261696475
          Content-Type: application/json
          Content-Length: 0
          Previous
          Add Sharded Cluster Instance Node
          Next
          Change Instance Name