Skip to content
This repository has been archived by the owner on May 5, 2023. It is now read-only.

Equivalent call in Azure Storage Node SDK for PutPage REST API #3017

Closed
karungithub opened this issue Jun 15, 2018 · 6 comments
Closed

Equivalent call in Azure Storage Node SDK for PutPage REST API #3017

karungithub opened this issue Jun 15, 2018 · 6 comments
Labels
customer-reported This issue was reported by a customer.

Comments

@karungithub
Copy link

karungithub commented Jun 15, 2018

Hi,
I am sure I am missing something here: what is the equivalent node call for PutPage blob service API.
Here is the REST API: https://docs.microsoft.com/en-us/rest/api/storageservices/put-page

I cannot find the equivalent call in in SDK documentation at:
https://docs.microsoft.com/en-us/javascript/api/azure-storage/BlobService?view=azure-node-latest

Please can you treat this as urgent as we stuck implementing our functionality.

@RikkiGibson
Copy link
Member

@XiaoningLiu do you know the answer to this?

@karungithub
Copy link
Author

@RikkiGibson or @XiaoningLiu - Can one of you help me out here? Is there a node.js implementation of the putpage API?

@XiaoningLiu
Copy link
Member

XiaoningLiu commented Jun 19, 2018

@karungithub Please see createPagesFromStream(container, blob, readStream, rangeStart, rangeEnd, options, callback) You need to make sure the page blob has been created then call this method.

@karungithub
Copy link
Author

@XiaoningLiu - Here is what I am trying to do:

  1. I am trying to getpagesrangesdiff between two snapshots
  2. Apply these pages on another pageblob.

For step#2, if I am using createPagesFromStream API, the "container" parameter would be the pageblob container where the pages are added, the "blob" would be the name of the blob where the pages are added. What is the readStream paramter? Is the source blob from where the pages are read?
Can you give me an example of usage?

@karungithub
Copy link
Author

@XiaoningLiu - can you please respond to my request above or if you can point me to the documentation that can help me?

@XiaoningLiu
Copy link
Member

XiaoningLiu commented Jun 21, 2018

Hi @karungithub

Sorry for the late response, I have tons of GitHub notifications per day : (

For your question:

  1. Put Page operation needs a body storing the data you want to put. The readStream is the stream points to the data you want to put to page(s) between rangeStart and rangeEnd. createPagesFromStream doesn't care where is the data from.

  2. According to your description. After getpagesrangesdiff of 2 snapshots, you will get a list of pages. For every sequential pages, you need to download these pages with methods like createReadStream(container, blob, options, callback), with the options rangeStart and rangeEnd. And then call createPagesFromStream

@ghost ghost added this to the Sprint-127 milestone Nov 5, 2018
@ghost ghost added the customer-reported This issue was reported by a customer. label Dec 4, 2018
@ghost ghost removed this from the Sprint-127 milestone Dec 4, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
customer-reported This issue was reported by a customer.
Projects
None yet
Development

No branches or pull requests

4 participants