code: public void rebuildInstance(String instanceId, String imageId, String adminPass) throws BceClientException {
          this.rebuildInstance(new RebuildInstanceRequest().withInstanceId(instanceId)
                  .withImageId(imageId).withAdminPass(adminPass));
      }
docs: Rebuilding the instance owned by the user.
  
  After rebuilding the instance,
  all of snapshots created from original instance system disk will be deleted,
  all of customized images will be saved for using in the future.
  
  This is an asynchronous interface,
  you can get the latest status by invoke {@link #getInstance(GetInstanceRequest)}
  
  @param instanceId The id of the instance.
  @param imageId The id of the image which is used to rebuild the instance.
  @param adminPass The admin password to login the instance.
  The admin password will be encrypted in AES-128 algorithm
  with the substring of the former 16 characters of user SecretKey.
  See more detail on
  <a href = "https://bce.baidu.com/doc/BCC/API.html#.7A.E6.31.D8.94.C1.A1.C2.1A.8D.92.ED.7F.60.7D.AF">
  BCE API doc</a>
  @throws BceClientException