API to create full disk image in the cloud
I am trying to write a routine that will create a full disk image and upload it to Azure or S3. I can create the image on disk, and then upload it in a separate step, but I am hoping to find a way skip the local copy and stream the disk image directly to the cloud. Is there an API to create the disk image that allows me to process the data of the disk image as it is created without the need to write it to disk first?
I'm a bit out of my depth here, so hopefully I'm being clear with what I'm trying to do. Thanks for any help in pointing me in the right direction.