code: public GalleryImageInner createOrUpdate(String resourceGroupName, String labAccountName, String galleryImageName, GalleryImageInner galleryImage) {
          return createOrUpdateWithServiceResponseAsync(resourceGroupName, labAccountName, galleryImageName, galleryImage).toBlocking().single().body();
      }
docs: Create or replace an existing Gallery Image.
  
  @param resourceGroupName The name of the resource group.
  @param labAccountName The name of the lab Account.
  @param galleryImageName The name of the gallery Image.
  @param galleryImage Represents an image from the Azure Marketplace
  @throws IllegalArgumentException thrown if parameters fail the validation
  @throws CloudException thrown if the request is rejected by server
  @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent
  @return the GalleryImageInner object if successful.