PageBlobClient.UploadPagesFromUri Method

Definition

The UploadPagesFromUri(Uri, HttpRange, HttpRange, PageBlobUploadPagesFromUriOptions, CancellationToken) operation writes a range of pages to a page blob where the contents are read from sourceUri.

For more information, see Put Page From URL.

public virtual Azure.Response<Azure.Storage.Blobs.Models.PageInfo> UploadPagesFromUri (Uri sourceUri, Azure.HttpRange sourceRange, Azure.HttpRange range, Azure.Storage.Blobs.Models.PageBlobUploadPagesFromUriOptions options = default, System.Threading.CancellationToken cancellationToken = default);
abstract member UploadPagesFromUri : Uri * Azure.HttpRange * Azure.HttpRange * Azure.Storage.Blobs.Models.PageBlobUploadPagesFromUriOptions * System.Threading.CancellationToken -> Azure.Response<Azure.Storage.Blobs.Models.PageInfo>
override this.UploadPagesFromUri : Uri * Azure.HttpRange * Azure.HttpRange * Azure.Storage.Blobs.Models.PageBlobUploadPagesFromUriOptions * System.Threading.CancellationToken -> Azure.Response<Azure.Storage.Blobs.Models.PageInfo>
Public Overridable Function UploadPagesFromUri (sourceUri As Uri, sourceRange As HttpRange, range As HttpRange, Optional options As PageBlobUploadPagesFromUriOptions = Nothing, Optional cancellationToken As CancellationToken = Nothing) As Response(Of PageInfo)

Parameters

sourceUri
Uri

Specifies the Uri of the source blob. The value may be a Uri of up to 2 KB in length that specifies a blob. The source blob must either be public or must be authenticated via a shared access signature. If the source blob is public, no authentication is required to perform the operation.

sourceRange
HttpRange

Optionally only upload the bytes of the blob in the sourceUri in the specified range.

range
HttpRange

Specifies the range to be written as a page. Both the start and end of the range must be specified and can be up to 4MB in size. Given that pages must be aligned with 512-byte boundaries, the start of the range must be a modulus of 512 and the end of the range must be a modulus of 512 – 1. Examples of valid byte ranges are 0-511, 512-1023, etc.

cancellationToken
CancellationToken

Optional CancellationToken to propagate notifications that the operation should be cancelled.

Returns

A Response<T> describing the state of the updated pages.

Remarks

A RequestFailedException will be thrown if a failure occurs.

Applies to