UpdatePageBlob Method

Updates a page blob's size and/or sequence number.

Syntax

int UpdatePageBlob(const QString& qsPageBlob, qint64 lNewSize, int iSequenceNumAction, qint64 lNewSequenceNum);

Remarks

This method updates the size and/or sequence number of the specified PageBlob in the container currently selected by Container.

NewSize must either be -1 (to keep the page blob's current size), or a multiple of 512; i.e. NewSize % 512 == 0. If NewSize is less than the page blob's current size, all pages above the specified value are cleared.

SequenceNumAction determines how the page blob's sequence number should be changed; possible values are:

None (0) The page blob's sequence number remains unchanged. NewSequenceNum is ignored.
Increment (1) The page blob's sequence number is incremented by 1. NewSequenceNum is ignored.
Update (2) The page blob's sequence number is set to NewSequenceNum.
Use Greater (3) The page blob's sequence number is set to the greater of NewSequenceNum and the current sequence number.

In cases where NewSequenceNum is used, it must be a value in the range 0 to 2^63 - 1, inclusive.

If the specified blob has an active lease, its lease Id must be specified using LeaseId, or the request will fail.

Error Handling

This method returns a result code; 0 indicates success, while a non-zero error code indicates that this method encountered an error during its execution. If an error occurs, the GetLastError() method can be called to retrieve the associated error message. (Note: This method's result code can also be obtained by calling the GetLastErrorCode() method after it returns.)

Copyright (c) 2022 /n software inc. - All rights reserved.
IPWorks Cloud 2020 Qt Edition - Version 20.0 [Build 8265]