code: public CreateImageResponse createImage(CreateImageRequest request) {
          checkNotNull(request, "request should not be null.");
          if (Strings.isNullOrEmpty(request.getClientToken())) {
              request.setClientToken(this.generateClientToken());
          }
          checkStringNotEmpty(request.getImageName(), "request imageName should not be empty.");
          if (Strings.isNullOrEmpty(request.getInstanceId()) && Strings.isNullOrEmpty(request.getSnapshotId())) {
              throw new IllegalArgumentException("request instanceId or snapshotId should not be empty .");
          }
          InternalRequest internalRequest = this.createRequest(request, HttpMethodName.POST, IMAGE_PREFIX);
          internalRequest.addParameter("clientToken", request.getClientToken());
          fillPayload(internalRequest, request);
          return invokeHttpClient(internalRequest, CreateImageResponse.class);
      }
docs: Creating a customized image which can be used for creating instance in the future.
  
  <p>
  You can create an image from an instance or you can create from an snapshot.
  The parameters of instanceId and snapshotId can no be null simultaneously.
  when both instanceId and snapshotId are assigned,only instanceId will be used.
  <p>
  While creating an image from an instance,the instance must be Running or Stopped,
  otherwise,it's will get <code>409</code> errorCode.
  <p>
  You can create the image only  from system snapshot.
  While creating an image from a system snapshot,the snapshot must be Available,
  otherwise,it's will get <code>409</code> errorCode.
  
  This is an asynchronous interface,
  you can get the latest status by invoke {@link #getImage(GetImageRequest)}
  
  @param request The request containing all options for creating a new image.
  @return The response with id of image newly created.