Class PageBlobClient
The PageBlobClient allows you to manipulate Azure Storage page blobs.
Page blobs are a collection of 512-byte pages optimized for random read and write operations. To create a page blob, you initialize the page blob and specify the maximum size the page blob will grow. To add or update the contents of a page blob, you write a page or pages by specifying an offset and a range that align to 512-byte page boundaries. A write to a page blob can overwrite just one page, some pages, or up to 4 MB of the page blob. Writes to page blobs happen in-place and are immediately committed to the blob. The maximum size for a page blob is 8 TB.
Inherited Members
Namespace: System.Dynamic.ExpandoObject
Assembly: Azure.Storage.Blobs.dll
Syntax
public class PageBlobClient : Azure.Storage.Blobs.Specialized.BlobBaseClient
Constructors
PageBlobClient()
Initializes a new instance of the PageBlobClient class for mocking.
Declaration
protected PageBlobClient ();
PageBlobClient(Uri, BlobClientOptions)
Initializes a new instance of the PageBlobClient class.
Declaration
public PageBlobClient (Uri blobUri, Azure.Storage.Blobs.BlobClientOptions options = null);
Parameters
System.Uri
blobUri
A System.Uri referencing the page blob that includes the name of the account, the name of the blob container, and the name of the blob. |
BlobClientOptions
options
Optional client options that define the transport pipeline policies for authentication, retries, etc., that are applied to every request. |
PageBlobClient(String, String, String)
Initializes a new instance of the PageBlobClient class.
Declaration
public PageBlobClient (string connectionString, string blobContainerName, string blobName);
Parameters
System.String
connectionString
A connection string includes the authentication information required for your application to access data in an Azure Storage account at runtime. For more information Configure Azure Storage connection strings |
System.String
blobContainerName
The name of the container containing this page blob. |
System.String
blobName
The name of this page blob. |
PageBlobClient(Uri, AzureSasCredential, BlobClientOptions)
Initializes a new instance of the PageBlobClient class.
Declaration
public PageBlobClient (Uri blobUri, Azure.AzureSasCredential credential, Azure.Storage.Blobs.BlobClientOptions options = null);
Parameters
System.Uri
blobUri
A System.Uri referencing the page blob that includes the name of the account, the name of the blob container, and the name of the blob. Must not contain shared access signature, which should be passed in the second parameter. |
Azure.AzureSasCredential
credential
The shared access signature credential used to sign requests. |
BlobClientOptions
options
Optional client options that define the transport pipeline policies for authentication, retries, etc., that are applied to every request. |
Remarks
This constructor should only be used when shared access signature needs to be updated during lifespan of this client.
PageBlobClient(Uri, TokenCredential, BlobClientOptions)
Initializes a new instance of the PageBlobClient class.
Declaration
public PageBlobClient (Uri blobUri, Azure.Core.TokenCredential credential, Azure.Storage.Blobs.BlobClientOptions options = null);
Parameters
System.Uri
blobUri
A System.Uri referencing the page blob that includes the name of the account, the name of the blob container, and the name of the blob. |
Azure.Core.TokenCredential
credential
The token credential used to sign requests. |
BlobClientOptions
options
Optional client options that define the transport pipeline policies for authentication, retries, etc., that are applied to every request. |
PageBlobClient(Uri, StorageSharedKeyCredential, BlobClientOptions)
PageBlobClient(String, String, String, BlobClientOptions)
Initializes a new instance of the PageBlobClient class.
Declaration
public PageBlobClient (string connectionString, string blobContainerName, string blobName, Azure.Storage.Blobs.BlobClientOptions options);
Parameters
System.String
connectionString
A connection string includes the authentication information required for your application to access data in an Azure Storage account at runtime. For more information, Configure Azure Storage connection strings |
System.String
blobContainerName
The name of the container containing this page blob. |
System.String
blobName
The name of this page blob. |
BlobClientOptions
options
Optional client options that define the transport pipeline policies for authentication, retries, etc., that are applied to every request. |
Properties
PageBlobMaxUploadPagesBytes
Gets the maximum number of bytes that can be sent in a call to the UploadPagesAsync(Stream, Int64, Byte[], PageBlobRequestConditions, IProgress<Int64>, CancellationToken) operation.
Declaration
public virtual int PageBlobMaxUploadPagesBytes { get; }
Property Value
System.Int32
|
PageBlobPageBytes
Gets the number of bytes in a page (512).
Declaration
public virtual int PageBlobPageBytes { get; }
Property Value
System.Int32
|
Methods
ClearPages(HttpRange, PageBlobRequestConditions, CancellationToken)
The ClearPages(HttpRange, PageBlobRequestConditions, CancellationToken) operation clears one or more
pages from the page blob, as specificed by the range
.
For more information, see Put Page.
Declaration
public virtual Azure.Response<Azure.Storage.Blobs.Models.PageInfo> ClearPages (Azure.HttpRange range, Azure.Storage.Blobs.Models.PageBlobRequestConditions conditions = null, System.Threading.CancellationToken cancellationToken = null);
Parameters
Azure.HttpRange
range
Specifies the range of bytes to be cleared. Both the start and end of the range must be specified. For a page clear operation, the page range can be up to the value of the blob's full 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. |
PageBlobRequestConditions
conditions
Optional PageBlobRequestConditions to add conditions on clearing pages from this page blob. |
System.Threading.CancellationToken
cancellationToken
Optional System.Threading.CancellationToken to propagate notifications that the operation should be cancelled. |
Returns
Azure.Response<PageInfo>
A Azure.Response describing the state of the updated pages. |
Remarks
A Azure.RequestFailedException will be thrown if a failure occurs.
ClearPagesAsync(HttpRange, PageBlobRequestConditions, CancellationToken)
The ClearPagesAsync(HttpRange, PageBlobRequestConditions, CancellationToken) operation clears one or more
pages from the page blob, as specificed by the range
.
For more information, see Put Page.
Declaration
[System.Diagnostics.DebuggerStepThrough]
public virtual System.Threading.Tasks.Task<Azure.Response<Azure.Storage.Blobs.Models.PageInfo>> ClearPagesAsync (Azure.HttpRange range, Azure.Storage.Blobs.Models.PageBlobRequestConditions conditions = null, System.Threading.CancellationToken cancellationToken = null);
Parameters
Azure.HttpRange
range
Specifies the range of bytes to be cleared. Both the start and end of the range must be specified. For a page clear operation, the page range can be up to the value of the blob's full 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. |
PageBlobRequestConditions
conditions
Optional PageBlobRequestConditions to add conditions on clearing pages from this page blob. |
System.Threading.CancellationToken
cancellationToken
Optional System.Threading.CancellationToken to propagate notifications that the operation should be cancelled. |
Returns
System.Threading.Tasks.Task<Azure.Response<PageInfo>>
A Azure.Response describing the state of the updated pages. |
Remarks
A Azure.RequestFailedException will be thrown if a failure occurs.
Create(Int64, Nullable<Int64>, BlobHttpHeaders, IDictionary<String,String>, PageBlobRequestConditions, CancellationToken)
The Create(Int64, Nullable<Int64>, BlobHttpHeaders, IDictionary<String,String>, PageBlobRequestConditions, CancellationToken)
operation creates a new page blob of the specified size
. The content of any
existing blob is overwritten with the newly initialized page blob
To add content to the page blob, call the
UploadPages(Stream, Int64, Byte[], PageBlobRequestConditions, IProgress<Int64>, CancellationToken) operation.
For more information, see https://docs.microsoft.com/rest/api/storageservices/put-blob.
Declaration
[System.ComponentModel.EditorBrowsable]
public virtual Azure.Response<Azure.Storage.Blobs.Models.BlobContentInfo> Create (long size, Nullable<long> sequenceNumber = null, Azure.Storage.Blobs.Models.BlobHttpHeaders httpHeaders = null, System.Collections.Generic.IDictionary<string,string> metadata = null, Azure.Storage.Blobs.Models.PageBlobRequestConditions conditions = null, System.Threading.CancellationToken cancellationToken = null);
Parameters
System.Int64
size
Specifies the maximum size for the page blob, up to 8 TB. The size must be aligned to a 512-byte boundary. |
System.Nullable<System.Int64>
sequenceNumber
Optional user-controlled value that you can use to track requests.
The value of the |
BlobHttpHeaders
httpHeaders
Optional standard HTTP header properties that can be set for the new page blob. |
System.Collections.Generic.IDictionary<System.String,System.String>
metadata
Optional custom metadata to set for this page blob. |
PageBlobRequestConditions
conditions
Optional PageBlobRequestConditions to add conditions on the creation of this new page blob. |
System.Threading.CancellationToken
cancellationToken
Optional System.Threading.CancellationToken to propagate notifications that the operation should be cancelled. |
Returns
Azure.Response<BlobContentInfo>
A Azure.Response describing the newly created page blob. |
Remarks
A Azure.RequestFailedException will be thrown if a failure occurs.
Create(Int64, PageBlobCreateOptions, CancellationToken)
The Create(Int64, PageBlobCreateOptions, CancellationToken)
operation creates a new page blob of the specified size
.
The content of any existing blob is overwritten with the newly initialized page blob
To add content to the page blob, call the
UploadPages(Stream, Int64, Byte[], PageBlobRequestConditions, IProgress<Int64>, CancellationToken) operation.
For more information, see https://docs.microsoft.com/rest/api/storageservices/put-blob.
Declaration
public virtual Azure.Response<Azure.Storage.Blobs.Models.BlobContentInfo> Create (long size, Azure.Storage.Blobs.Models.PageBlobCreateOptions options, System.Threading.CancellationToken cancellationToken = null);
Parameters
System.Int64
size
Specifies the maximum size for the page blob, up to 8 TB. The size must be aligned to a 512-byte boundary. |
PageBlobCreateOptions
options
Optional parameters. |
System.Threading.CancellationToken
cancellationToken
Optional System.Threading.CancellationToken to propagate notifications that the operation should be cancelled. |
Returns
Azure.Response<BlobContentInfo>
A Azure.Response describing the newly created page blob. |
Remarks
A Azure.RequestFailedException will be thrown if a failure occurs.
CreateAsync(Int64, PageBlobCreateOptions, CancellationToken)
The CreateAsync(Int64, PageBlobCreateOptions, CancellationToken)
operation creates a new page blob of the specified size
.
The content of any existing blob is overwritten with the newly initialized page blob
To add content to the page blob, call the
UploadPages(Stream, Int64, Byte[], PageBlobRequestConditions, IProgress<Int64>, CancellationToken) operation.
For more information, see https://docs.microsoft.com/rest/api/storageservices/put-blob.
Declaration
[System.Diagnostics.DebuggerStepThrough]
public virtual System.Threading.Tasks.Task<Azure.Response<Azure.Storage.Blobs.Models.BlobContentInfo>> CreateAsync (long size, Azure.Storage.Blobs.Models.PageBlobCreateOptions options, System.Threading.CancellationToken cancellationToken = null);
Parameters
System.Int64
size
Specifies the maximum size for the page blob, up to 8 TB. The size must be aligned to a 512-byte boundary. |
PageBlobCreateOptions
options
Optional parameters. |
System.Threading.CancellationToken
cancellationToken
Optional System.Threading.CancellationToken to propagate notifications that the operation should be cancelled. |
Returns
System.Threading.Tasks.Task<Azure.Response<BlobContentInfo>>
A Azure.Response describing the newly created page blob. |
Remarks
A Azure.RequestFailedException will be thrown if a failure occurs.
CreateAsync(Int64, Nullable<Int64>, BlobHttpHeaders, IDictionary<String,String>, PageBlobRequestConditions, CancellationToken)
The CreateAsync(Int64, Nullable<Int64>, BlobHttpHeaders, IDictionary<String,String>, PageBlobRequestConditions, CancellationToken)
operation creates a new page blob of the specified size
. The content of any
existing blob is overwritten with the newly initialized page blob
To add content to the page blob, call the
UploadPagesAsync(Stream, Int64, Byte[], PageBlobRequestConditions, IProgress<Int64>, CancellationToken) operation.
For more information, see https://docs.microsoft.com/rest/api/storageservices/put-blob.
Declaration
[System.ComponentModel.EditorBrowsable]
[System.Diagnostics.DebuggerStepThrough]
public virtual System.Threading.Tasks.Task<Azure.Response<Azure.Storage.Blobs.Models.BlobContentInfo>> CreateAsync (long size, Nullable<long> sequenceNumber = null, Azure.Storage.Blobs.Models.BlobHttpHeaders httpHeaders = null, System.Collections.Generic.IDictionary<string,string> metadata = null, Azure.Storage.Blobs.Models.PageBlobRequestConditions conditions = null, System.Threading.CancellationToken cancellationToken = null);
Parameters
System.Int64
size
Specifies the maximum size for the page blob, up to 8 TB. The size must be aligned to a 512-byte boundary. |
System.Nullable<System.Int64>
sequenceNumber
Optional user-controlled value that you can use to track requests.
The value of the |
BlobHttpHeaders
httpHeaders
Optional standard HTTP header properties that can be set for the new page blob. |
System.Collections.Generic.IDictionary<System.String,System.String>
metadata
Optional custom metadata to set for this page blob. |
PageBlobRequestConditions
conditions
Optional PageBlobRequestConditions to add conditions on the creation of this new page blob. |
System.Threading.CancellationToken
cancellationToken
Optional System.Threading.CancellationToken to propagate notifications that the operation should be cancelled. |
Returns
System.Threading.Tasks.Task<Azure.Response<BlobContentInfo>>
A Azure.Response describing the newly created page blob. |
Remarks
A Azure.RequestFailedException will be thrown if a failure occurs.
CreateIfNotExists(Int64, PageBlobCreateOptions, CancellationToken)
The CreateIfNotExists(Int64, PageBlobCreateOptions, CancellationToken)
operation creates a new page blob of the specified size
. If the blob already
exists, the content of the existing blob will remain unchanged. If the blob does not already exists,
a new page blob with the specified size
will be created.
UploadPages(Stream, Int64, Byte[], PageBlobRequestConditions, IProgress<Int64>, CancellationToken) operation.
For more information, see https://docs.microsoft.com/rest/api/storageservices/put-blob.
Declaration
public virtual Azure.Response<Azure.Storage.Blobs.Models.BlobContentInfo> CreateIfNotExists (long size, Azure.Storage.Blobs.Models.PageBlobCreateOptions options, System.Threading.CancellationToken cancellationToken = null);
Parameters
System.Int64
size
Specifies the maximum size for the page blob, up to 8 TB. The size must be aligned to a 512-byte boundary. |
PageBlobCreateOptions
options
Optional parameters. |
System.Threading.CancellationToken
cancellationToken
Optional System.Threading.CancellationToken to propagate notifications that the operation should be cancelled. |
Returns
Azure.Response<BlobContentInfo>
If the page blob does not already exist, A Azure.Response
describing the newly created page blob. Otherwise, |
Remarks
A Azure.RequestFailedException will be thrown if a failure occurs.
CreateIfNotExists(Int64, Nullable<Int64>, BlobHttpHeaders, IDictionary<String,String>, CancellationToken)
The CreateIfNotExists(Int64, Nullable<Int64>, BlobHttpHeaders, IDictionary<String,String>, CancellationToken)
operation creates a new page blob of the specified size
. If the blob already
exists, the content of the existing blob will remain unchanged. If the blob does not already exists,
a new page blob with the specified size
will be created.
UploadPages(Stream, Int64, Byte[], PageBlobRequestConditions, IProgress<Int64>, CancellationToken) operation.
For more information, see https://docs.microsoft.com/rest/api/storageservices/put-blob.
Declaration
[System.ComponentModel.EditorBrowsable]
public virtual Azure.Response<Azure.Storage.Blobs.Models.BlobContentInfo> CreateIfNotExists (long size, Nullable<long> sequenceNumber = null, Azure.Storage.Blobs.Models.BlobHttpHeaders httpHeaders = null, System.Collections.Generic.IDictionary<string,string> metadata = null, System.Threading.CancellationToken cancellationToken = null);
Parameters
System.Int64
size
Specifies the maximum size for the page blob, up to 8 TB. The size must be aligned to a 512-byte boundary. |
System.Nullable<System.Int64>
sequenceNumber
Optional user-controlled value that you can use to track requests.
The value of the |
BlobHttpHeaders
httpHeaders
Optional standard HTTP header properties that can be set for the new page blob. |
System.Collections.Generic.IDictionary<System.String,System.String>
metadata
Optional custom metadata to set for this page blob. |
System.Threading.CancellationToken
cancellationToken
Optional System.Threading.CancellationToken to propagate notifications that the operation should be cancelled. |
Returns
Azure.Response<BlobContentInfo>
If the page blob does not already exist, A Azure.Response
describing the newly created page blob. Otherwise, |
Remarks
A Azure.RequestFailedException will be thrown if a failure occurs.
CreateIfNotExistsAsync(Int64, PageBlobCreateOptions, CancellationToken)
The CreateIfNotExistsAsync(Int64, PageBlobCreateOptions, CancellationToken)
operation creates a new page blob of the specified size
. If the blob already
exists, the content of the existing blob will remain unchanged. If the blob does not already exists,
a new page blob with the specified size
will be created.
UploadPages(Stream, Int64, Byte[], PageBlobRequestConditions, IProgress<Int64>, CancellationToken) operation.
For more information, see https://docs.microsoft.com/rest/api/storageservices/put-blob.
Declaration
[System.Diagnostics.DebuggerStepThrough]
public virtual System.Threading.Tasks.Task<Azure.Response<Azure.Storage.Blobs.Models.BlobContentInfo>> CreateIfNotExistsAsync (long size, Azure.Storage.Blobs.Models.PageBlobCreateOptions options, System.Threading.CancellationToken cancellationToken = null);
Parameters
System.Int64
size
Specifies the maximum size for the page blob, up to 8 TB. The size must be aligned to a 512-byte boundary. |
PageBlobCreateOptions
options
Optional parameters. |
System.Threading.CancellationToken
cancellationToken
Optional System.Threading.CancellationToken to propagate notifications that the operation should be cancelled. |
Returns
System.Threading.Tasks.Task<Azure.Response<BlobContentInfo>>
If the page blob does not already exist, A Azure.Response
describing the newly created page blob. Otherwise, |
Remarks
A Azure.RequestFailedException will be thrown if a failure occurs.
CreateIfNotExistsAsync(Int64, Nullable<Int64>, BlobHttpHeaders, IDictionary<String,String>, CancellationToken)
The CreateIfNotExistsAsync(Int64, Nullable<Int64>, BlobHttpHeaders, IDictionary<String,String>, CancellationToken)
operation creates a new page blob of the specified size
. If the blob already exists,
the content of the existing blob will remain unchanged. If the blob does not already exists,
a new page blob with the specified size
will be created.
UploadPagesAsync(Stream, Int64, Byte[], PageBlobRequestConditions, IProgress<Int64>, CancellationToken) operation.
For more information, see https://docs.microsoft.com/rest/api/storageservices/put-blob.
Declaration
[System.ComponentModel.EditorBrowsable]
[System.Diagnostics.DebuggerStepThrough]
public virtual System.Threading.Tasks.Task<Azure.Response<Azure.Storage.Blobs.Models.BlobContentInfo>> CreateIfNotExistsAsync (long size, Nullable<long> sequenceNumber = null, Azure.Storage.Blobs.Models.BlobHttpHeaders httpHeaders = null, System.Collections.Generic.IDictionary<string,string> metadata = null, System.Threading.CancellationToken cancellationToken = null);
Parameters
System.Int64
size
Specifies the maximum size for the page blob, up to 8 TB. The size must be aligned to a 512-byte boundary. |
System.Nullable<System.Int64>
sequenceNumber
Optional user-controlled value that you can use to track requests.
The value of the |
BlobHttpHeaders
httpHeaders
Optional standard HTTP header properties that can be set for the new page blob. |
System.Collections.Generic.IDictionary<System.String,System.String>
metadata
Optional custom metadata to set for this page blob. |
System.Threading.CancellationToken
cancellationToken
Optional System.Threading.CancellationToken to propagate notifications that the operation should be cancelled. |
Returns
System.Threading.Tasks.Task<Azure.Response<BlobContentInfo>>
If the page blob does not already exist, A Azure.Response
describing the newly created page blob. Otherwise, |
Remarks
A Azure.RequestFailedException will be thrown if a failure occurs.
GetManagedDiskPageRangesDiff(Nullable<HttpRange>, String, Uri, PageBlobRequestConditions, CancellationToken)
The GetManagedDiskPageRangesDiff(Nullable<HttpRange>, String, Uri, PageBlobRequestConditions, CancellationToken)
operation returns the list of page ranges that differ between a
previousSnapshotUri
and this page blob. Changed pages
include both updated and cleared pages. This API only works with
managed disk storage accounts.
For more information, see Get Page Ranges.
Declaration
public virtual Azure.Response<Azure.Storage.Blobs.Models.PageRangesInfo> GetManagedDiskPageRangesDiff (Nullable<Azure.HttpRange> range = null, string snapshot = null, Uri previousSnapshotUri = null, Azure.Storage.Blobs.Models.PageBlobRequestConditions conditions = null, System.Threading.CancellationToken cancellationToken = null);
Parameters
System.Nullable<Azure.HttpRange>
range
Optionally specifies the range of bytes over which to list ranges, inclusively. If omitted, then all ranges for the blob are returned. |
System.String
snapshot
Optionally specifies the blob snapshot to retrieve page ranges information from. For more information on working with blob snapshots, Create a snapshot of a blob. |
System.Uri
previousSnapshotUri
This parameter only works with managed disk storage accounts.
Specifies that the response will contain only pages that were
changed between target blob and previous snapshot. Changed pages
include both updated and cleared pages. The target blob may be a
snapshot, as long as the snapshot specified by
|
PageBlobRequestConditions
conditions
Optional PageBlobRequestConditions to add conditions on getting page ranges for the this blob. |
System.Threading.CancellationToken
cancellationToken
Optional System.Threading.CancellationToken to propagate notifications that the operation should be cancelled. |
Returns
Azure.Response<PageRangesInfo>
A Azure.Response describing the valid page ranges for this blob. |
Remarks
A Azure.RequestFailedException will be thrown if a failure occurs.
GetManagedDiskPageRangesDiffAsync(Nullable<HttpRange>, String, Uri, PageBlobRequestConditions, CancellationToken)
The GetManagedDiskPageRangesDiffAsync(Nullable<HttpRange>, String, Uri, PageBlobRequestConditions, CancellationToken)
operation returns the list of page ranges that differ between a
previousSnapshotUri
and this page blob. Changed pages
include both updated and cleared pages. This API only works with
managed disk storage accounts.
For more information, see Get Page Ranges.
Declaration
[System.Diagnostics.DebuggerStepThrough]
public virtual System.Threading.Tasks.Task<Azure.Response<Azure.Storage.Blobs.Models.PageRangesInfo>> GetManagedDiskPageRangesDiffAsync (Nullable<Azure.HttpRange> range = null, string snapshot = null, Uri previousSnapshotUri = null, Azure.Storage.Blobs.Models.PageBlobRequestConditions conditions = null, System.Threading.CancellationToken cancellationToken = null);
Parameters
System.Nullable<Azure.HttpRange>
range
Optionally specifies the range of bytes over which to list ranges, inclusively. If omitted, then all ranges for the blob are returned. |
System.String
snapshot
Optionally specifies the blob snapshot to retrieve page ranges information from. For more information on working with blob snapshots, Create a snapshot of a blob. |
System.Uri
previousSnapshotUri
This parameter only works with managed disk storage accounts.
Specifies that the response will contain only pages that were
changed between target blob and previous snapshot. Changed pages
include both updated and cleared pages. The target blob may be a
snapshot, as long as the snapshot specified by
|
PageBlobRequestConditions
conditions
Optional PageBlobRequestConditions to add conditions on getting page ranges for the this blob. |
System.Threading.CancellationToken
cancellationToken
Optional System.Threading.CancellationToken to propagate notifications that the operation should be cancelled. |
Returns
System.Threading.Tasks.Task<Azure.Response<PageRangesInfo>>
A Azure.Response describing the valid page ranges for this blob. |
Remarks
A Azure.RequestFailedException will be thrown if a failure occurs.
GetPageRanges(Nullable<HttpRange>, String, PageBlobRequestConditions, CancellationToken)
The GetPageRanges(Nullable<HttpRange>, String, PageBlobRequestConditions, CancellationToken) operation returns the list of valid page ranges for a page blob or snapshot of a page blob.
For more information, see Get Page Ranges.
Declaration
public virtual Azure.Response<Azure.Storage.Blobs.Models.PageRangesInfo> GetPageRanges (Nullable<Azure.HttpRange> range = null, string snapshot = null, Azure.Storage.Blobs.Models.PageBlobRequestConditions conditions = null, System.Threading.CancellationToken cancellationToken = null);
Parameters
System.Nullable<Azure.HttpRange>
range
Optionally specifies the range of bytes over which to list ranges, inclusively. If omitted, then all ranges for the blob are returned. |
System.String
snapshot
Optionally specifies the blob snapshot to retrieve page ranges information from. For more information on working with blob snapshots, Create a snapshot of a blob. |
PageBlobRequestConditions
conditions
Optional PageBlobRequestConditions to add conditions on getting page ranges for the this blob. |
System.Threading.CancellationToken
cancellationToken
Optional System.Threading.CancellationToken to propagate notifications that the operation should be cancelled. |
Returns
Azure.Response<PageRangesInfo>
A Azure.Response describing the valid page ranges for this blob. |
Remarks
A Azure.RequestFailedException will be thrown if a failure occurs.
GetPageRangesAsync(Nullable<HttpRange>, String, PageBlobRequestConditions, CancellationToken)
The GetPageRangesAsync(Nullable<HttpRange>, String, PageBlobRequestConditions, CancellationToken) operation returns the list of valid page ranges for a page blob or snapshot of a page blob.
For more information, see Get Page Ranges.
Declaration
[System.Diagnostics.DebuggerStepThrough]
public virtual System.Threading.Tasks.Task<Azure.Response<Azure.Storage.Blobs.Models.PageRangesInfo>> GetPageRangesAsync (Nullable<Azure.HttpRange> range = null, string snapshot = null, Azure.Storage.Blobs.Models.PageBlobRequestConditions conditions = null, System.Threading.CancellationToken cancellationToken = null);
Parameters
System.Nullable<Azure.HttpRange>
range
Optionally specifies the range of bytes over which to list ranges, inclusively. If omitted, then all ranges for the blob are returned. |
System.String
snapshot
Optionally specifies the blob snapshot to retrieve page ranges information from. For more information on working with blob snapshots, Create a snapshot of a blob. |
PageBlobRequestConditions
conditions
Optional PageBlobRequestConditions to add conditions on getting page ranges for the this blob. |
System.Threading.CancellationToken
cancellationToken
Optional System.Threading.CancellationToken to propagate notifications that the operation should be cancelled. |
Returns
System.Threading.Tasks.Task<Azure.Response<PageRangesInfo>>
A Azure.Response describing the valid page ranges for this blob. |
Remarks
A Azure.RequestFailedException will be thrown if a failure occurs.
GetPageRangesDiff(Nullable<HttpRange>, String, String, PageBlobRequestConditions, CancellationToken)
The GetPageRangesDiff(Nullable<HttpRange>, String, String, PageBlobRequestConditions, CancellationToken)
operation returns the list of page ranges that differ between a
previousSnapshot
and this page blob. Changed pages
include both updated and cleared pages.
For more information, see Get Page Ranges.
Declaration
public virtual Azure.Response<Azure.Storage.Blobs.Models.PageRangesInfo> GetPageRangesDiff (Nullable<Azure.HttpRange> range = null, string snapshot = null, string previousSnapshot = null, Azure.Storage.Blobs.Models.PageBlobRequestConditions conditions = null, System.Threading.CancellationToken cancellationToken = null);
Parameters
System.Nullable<Azure.HttpRange>
range
Optionally specifies the range of bytes over which to list ranges, inclusively. If omitted, then all ranges for the blob are returned. |
System.String
snapshot
Optionally specifies the blob snapshot to retrieve page ranges information from. For more information on working with blob snapshots, Create a snapshot of a blob. |
System.String
previousSnapshot
Specifies that the response will contain only pages that were
changed between target blob and previous snapshot. Changed pages
include both updated and cleared pages. The target blob may be a
snapshot, as long as the snapshot specified by
|
PageBlobRequestConditions
conditions
Optional PageBlobRequestConditions to add conditions on getting page ranges for the this blob. |
System.Threading.CancellationToken
cancellationToken
Optional System.Threading.CancellationToken to propagate notifications that the operation should be cancelled. |
Returns
Azure.Response<PageRangesInfo>
A Azure.Response describing the valid page ranges for this blob. |
Remarks
A Azure.RequestFailedException will be thrown if a failure occurs.
GetPageRangesDiffAsync(Nullable<HttpRange>, String, String, PageBlobRequestConditions, CancellationToken)
The GetPageRangesDiffAsync(Nullable<HttpRange>, String, String, PageBlobRequestConditions, CancellationToken)
operation returns the list of page ranges that differ between a
previousSnapshot
and this page blob. Changed pages
include both updated and cleared pages.
For more information, see Get Page Ranges.
Declaration
[System.Diagnostics.DebuggerStepThrough]
public virtual System.Threading.Tasks.Task<Azure.Response<Azure.Storage.Blobs.Models.PageRangesInfo>> GetPageRangesDiffAsync (Nullable<Azure.HttpRange> range = null, string snapshot = null, string previousSnapshot = null, Azure.Storage.Blobs.Models.PageBlobRequestConditions conditions = null, System.Threading.CancellationToken cancellationToken = null);
Parameters
System.Nullable<Azure.HttpRange>
range
Optionally specifies the range of bytes over which to list ranges, inclusively. If omitted, then all ranges for the blob are returned. |
System.String
snapshot
Optionally specifies the blob snapshot to retrieve page ranges information from. For more information on working with blob snapshots, Create a snapshot of a blob. |
System.String
previousSnapshot
Specifies that the response will contain only pages that were
changed between target blob and previous snapshot. Changed pages
include both updated and cleared pages. The target blob may be a
snapshot, as long as the snapshot specified by
|
PageBlobRequestConditions
conditions
Optional PageBlobRequestConditions to add conditions on getting page ranges for the this blob. |
System.Threading.CancellationToken
cancellationToken
Optional System.Threading.CancellationToken to propagate notifications that the operation should be cancelled. |
Returns
System.Threading.Tasks.Task<Azure.Response<PageRangesInfo>>
A Azure.Response describing the valid page ranges for this blob. |
Remarks
A Azure.RequestFailedException will be thrown if a failure occurs.
OpenWrite(Boolean, Int64, PageBlobOpenWriteOptions, CancellationToken)
Opens a stream for writing to the blob.
Declaration
public virtual System.IO.Stream OpenWrite (bool overwrite, long position, Azure.Storage.Blobs.Models.PageBlobOpenWriteOptions options = null, System.Threading.CancellationToken cancellationToken = null);
Parameters
System.Boolean
overwrite
Whether an existing blob should be deleted and recreated. |
System.Int64
position
The offset within the blob to begin writing from. |
PageBlobOpenWriteOptions
options
Optional parameters. |
System.Threading.CancellationToken
cancellationToken
Optional System.Threading.CancellationToken to propagate notifications that the operation should be cancelled. |
Returns
System.IO.Stream
A stream to write to the Append Blob. |
Remarks
A Azure.RequestFailedException will be thrown if a failure occurs.
OpenWriteAsync(Boolean, Int64, PageBlobOpenWriteOptions, CancellationToken)
Opens a stream for writing to the blob.
Declaration
[System.Diagnostics.DebuggerStepThrough]
public virtual System.Threading.Tasks.Task<System.IO.Stream> OpenWriteAsync (bool overwrite, long position, Azure.Storage.Blobs.Models.PageBlobOpenWriteOptions options = null, System.Threading.CancellationToken cancellationToken = null);
Parameters
System.Boolean
overwrite
Whether an existing blob should be deleted and recreated. |
System.Int64
position
The offset within the blob to begin writing from. |
PageBlobOpenWriteOptions
options
Optional parameters. |
System.Threading.CancellationToken
cancellationToken
Optional System.Threading.CancellationToken to propagate notifications that the operation should be cancelled. |
Returns
System.Threading.Tasks.Task<System.IO.Stream>
A stream to write to the Append Blob. |
Remarks
A Azure.RequestFailedException will be thrown if a failure occurs.
Resize(Int64, PageBlobRequestConditions, CancellationToken)
The Resize(Int64, PageBlobRequestConditions, CancellationToken) operation resizes the page blob to the specified size (which must be a multiple of 512). If the specified value is less than the current size of the blob, then all pages above the specified value are cleared.
For more information, see Set Blob Properties.
Declaration
public virtual Azure.Response<Azure.Storage.Blobs.Models.PageBlobInfo> Resize (long size, Azure.Storage.Blobs.Models.PageBlobRequestConditions conditions = null, System.Threading.CancellationToken cancellationToken = null);
Parameters
System.Int64
size
Specifies the maximum size for the page blob, up to 8 TB. The size must be aligned to a 512-byte boundary. If the specified value is less than the current size of the blob, then all pages above the specified value are cleared. |
PageBlobRequestConditions
conditions
Optional PageBlobRequestConditions to add conditions on the resize of this page blob. |
System.Threading.CancellationToken
cancellationToken
Optional System.Threading.CancellationToken to propagate notifications that the operation should be cancelled. |
Returns
Azure.Response<PageBlobInfo>
A Azure.Response describing the resized page blob. |
Remarks
A Azure.RequestFailedException will be thrown if a failure occurs.
ResizeAsync(Int64, PageBlobRequestConditions, CancellationToken)
The ResizeAsync(Int64, PageBlobRequestConditions, CancellationToken) operation resizes the page blob to the specified size (which must be a multiple of 512). If the specified value is less than the current size of the blob, then all pages above the specified value are cleared.
For more information, see Set Blob Properties.
Declaration
[System.Diagnostics.DebuggerStepThrough]
public virtual System.Threading.Tasks.Task<Azure.Response<Azure.Storage.Blobs.Models.PageBlobInfo>> ResizeAsync (long size, Azure.Storage.Blobs.Models.PageBlobRequestConditions conditions = null, System.Threading.CancellationToken cancellationToken = null);
Parameters
System.Int64
size
Specifies the maximum size for the page blob, up to 8 TB. The size must be aligned to a 512-byte boundary. If the specified value is less than the current size of the blob, then all pages above the specified value are cleared. |
PageBlobRequestConditions
conditions
Optional PageBlobRequestConditions to add conditions on the resize of this page blob. |
System.Threading.CancellationToken
cancellationToken
Optional System.Threading.CancellationToken to propagate notifications that the operation should be cancelled. |
Returns
System.Threading.Tasks.Task<Azure.Response<PageBlobInfo>>
A Azure.Response describing the resized page blob. |
Remarks
A Azure.RequestFailedException will be thrown if a failure occurs.
StartCopyIncremental(Uri, String, PageBlobRequestConditions, CancellationToken)
The StartCopyIncremental(Uri, String, PageBlobRequestConditions, CancellationToken) operation starts copying a snapshot of the sourceUri page blob to this page blob. The snapshot is copied such that only the differential changes between the previously copied snapshot are transferred to the destination. The copied snapshots are complete copies of the original snapshot and can be read or copied from as usual. You can check the CopyStatus returned from the GetProperties(BlobRequestConditions, CancellationToken) to determine if the copy has completed.
For more information, see Incremental Copy Blob and Back up Azure unmanaged VM disks with incremental snapshots.
Declaration
public virtual Azure.Storage.Blobs.Models.CopyFromUriOperation StartCopyIncremental (Uri sourceUri, string snapshot, Azure.Storage.Blobs.Models.PageBlobRequestConditions conditions = null, System.Threading.CancellationToken cancellationToken = null);
Parameters
System.Uri
sourceUri
Specifies the to the source page blob as a System.Uri up to 2 KB in length. The source blob must either be public or must be authenticated via a shared access signature. |
System.String
snapshot
The name of a snapshot to start copying from sourceUri. |
PageBlobRequestConditions
conditions
Optional PageBlobRequestConditions to add conditions on the incremental copy into this page blob. |
System.Threading.CancellationToken
cancellationToken
Optional System.Threading.CancellationToken to propagate notifications that the operation should be cancelled. |
Returns
CopyFromUriOperation
A CopyFromUriOperation referencing the incremental copy operation. |
Remarks
A Azure.RequestFailedException will be thrown if a failure occurs.
The destination of an incremental copy must either not exist, or must have been created with a previous incremental copy from the same source blob. Once created, the destination blob is permanently associated with the source and may only be used for incremental copies.
The GetProperties(BlobRequestConditions, CancellationToken), GetBlobs(BlobTraits, BlobStates, String, CancellationToken), and GetBlobsByHierarchy(BlobTraits, BlobStates, String, String, CancellationToken) operations indicate whether the blob is an incremental copy blob created in this way. Incremental copy blobs may not be downloaded directly. The only supported operations are GetProperties(BlobRequestConditions, CancellationToken), StartCopyIncremental(Uri, String, PageBlobRequestConditions, CancellationToken), and Delete(DeleteSnapshotsOption, BlobRequestConditions, CancellationToken). The copied snapshots may be read and deleted as usual.
An incremental copy is performed asynchronously on the service and must be polled for completion. You can poll GetProperties(BlobRequestConditions, CancellationToken) and check CopyStatus to determine when the copy has completed. When the copy completes, the destination blob will contain a new snapshot. The GetProperties(BlobRequestConditions, CancellationToken) operation returns the snapshot time of the newly created snapshot.
The first time an incremental copy is performed on a destination blob, a new blob is created with a snapshot that is fully copied from the source. Each subsequent call to StartCopyIncremental(Uri, String, PageBlobRequestConditions, CancellationToken) will create a new snapshot by copying only the differential changes from the previously copied snapshot. The differential changes are computed on the server by issuing a GetPageRanges(Nullable<HttpRange>, String, PageBlobRequestConditions, CancellationToken) call on the source blob snapshot with prevSnapshot set to the most recently copied snapshot. Therefore, the same restrictions on GetPageRanges(Nullable<HttpRange>, String, PageBlobRequestConditions, CancellationToken) apply to StartCopyIncremental(Uri, String, PageBlobRequestConditions, CancellationToken). Specifically, snapshots must be copied in ascending order and if the source blob is recreated using UploadPages(Stream, Int64, Byte[], PageBlobRequestConditions, IProgress<Int64>, CancellationToken) or StartCopyFromUri(Uri, IDictionary<String,String>, Nullable<AccessTier>, BlobRequestConditions, BlobRequestConditions, Nullable<RehydratePriority>, CancellationToken) then StartCopyIncremental(Uri, String, PageBlobRequestConditions, CancellationToken) on new snapshots will fail.
The additional storage space consumed by the copied snapshot is the size of the differential data transferred during the copy. This can be determined by performing a GetPageRangesDiff(Nullable<HttpRange>, String, String, PageBlobRequestConditions, CancellationToken) call on the snapshot to compare it to the previous snapshot.
StartCopyIncrementalAsync(Uri, String, PageBlobRequestConditions, CancellationToken)
The StartCopyIncrementalAsync(Uri, String, PageBlobRequestConditions, CancellationToken) operation starts copying a snapshot of the sourceUri page blob to this page blob. The snapshot is copied such that only the differential changes between the previously copied snapshot are transferred to the destination. The copied snapshots are complete copies of the original snapshot and can be read or copied from as usual. You can check the CopyStatus returned from the GetPropertiesAsync(BlobRequestConditions, CancellationToken) to determine if thecopy has completed.
For more information, see Incremental Copy Blob and Back up Azure unmanaged VM disks with incremental snapshots.
Declaration
[System.Diagnostics.DebuggerStepThrough]
public virtual System.Threading.Tasks.Task<Azure.Storage.Blobs.Models.CopyFromUriOperation> StartCopyIncrementalAsync (Uri sourceUri, string snapshot, Azure.Storage.Blobs.Models.PageBlobRequestConditions conditions = null, System.Threading.CancellationToken cancellationToken = null);
Parameters
System.Uri
sourceUri
Specifies the to the source page blob as a System.Uri up to 2 KB in length. The source blob must either be public or must be authenticated via a shared access signature. |
System.String
snapshot
The name of a snapshot to start copying from sourceUri. |
PageBlobRequestConditions
conditions
Optional PageBlobRequestConditions to add conditions on the incremental copy into this page blob. |
System.Threading.CancellationToken
cancellationToken
Optional System.Threading.CancellationToken to propagate notifications that the operation should be cancelled. |
Returns
System.Threading.Tasks.Task<CopyFromUriOperation>
A CopyFromUriOperation describing the state of the incremental copy operation. |
Remarks
A Azure.RequestFailedException will be thrown if a failure occurs.
The destination of an incremental copy must either not exist, or must have been created with a previous incremental copy from the same source blob. Once created, the destination blob is permanently associated with the source and may only be used for incremental copies.
The GetPropertiesAsync(BlobRequestConditions, CancellationToken), GetBlobsAsync(BlobTraits, BlobStates, String, CancellationToken), and GetBlobsByHierarchyAsync(BlobTraits, BlobStates, String, String, CancellationToken) operations indicate whether the blob is an incremental copy blob created in this way. Incremental copy blobs may not be downloaded directly. The only supported operations are GetPropertiesAsync(BlobRequestConditions, CancellationToken), StartCopyIncrementalAsync(Uri, String, PageBlobRequestConditions, CancellationToken), and DeleteAsync(DeleteSnapshotsOption, BlobRequestConditions, CancellationToken). The copied snapshots may be read and deleted as usual.
An incremental copy is performed asynchronously on the service and must be polled for completion. You can poll GetPropertiesAsync(BlobRequestConditions, CancellationToken) and check CopyStatus to determine when the copy has completed. When the copy completes, the destination blob will contain a new snapshot. The GetPropertiesAsync(BlobRequestConditions, CancellationToken) operation returns the snapshot time of the newly created snapshot.
The first time an incremental copy is performed on a destination blob, a new blob is created with a snapshot that is fully copied from the source. Each subsequent call to StartCopyIncrementalAsync(Uri, String, PageBlobRequestConditions, CancellationToken) will create a new snapshot by copying only the differential changes from the previously copied snapshot. The differential changes are computed on the server by issuing a GetPageRangesAsync(Nullable<HttpRange>, String, PageBlobRequestConditions, CancellationToken) call on the source blob snapshot with prevSnapshot set to the most recently copied snapshot. Therefore, the same restrictions on GetPageRangesAsync(Nullable<HttpRange>, String, PageBlobRequestConditions, CancellationToken) apply to StartCopyIncrementalAsync(Uri, String, PageBlobRequestConditions, CancellationToken). Specifically, snapshots must be copied in ascending order and if the source blob is recreated using UploadPagesAsync(Stream, Int64, Byte[], PageBlobRequestConditions, IProgress<Int64>, CancellationToken) or StartCopyFromUriAsync(Uri, IDictionary<String,String>, Nullable<AccessTier>, BlobRequestConditions, BlobRequestConditions, Nullable<RehydratePriority>, CancellationToken) then StartCopyIncrementalAsync(Uri, String, PageBlobRequestConditions, CancellationToken) on new snapshots will fail.
The additional storage space consumed by the copied snapshot is the size of the differential data transferred during the copy. This can be determined by performing a GetPageRangesDiffAsync(Nullable<HttpRange>, String, String, PageBlobRequestConditions, CancellationToken) call on the snapshot to compare it to the previous snapshot.
UpdateSequenceNumber(SequenceNumberAction, Nullable<Int64>, PageBlobRequestConditions, CancellationToken)
The UpdateSequenceNumber(SequenceNumberAction, Nullable<Int64>, PageBlobRequestConditions, CancellationToken) operation changes the
sequence number action
and sequenceNumber
for this page blob.
For more information, see Set Blob Properties.
Declaration
public virtual Azure.Response<Azure.Storage.Blobs.Models.PageBlobInfo> UpdateSequenceNumber (Azure.Storage.Blobs.Models.SequenceNumberAction action, Nullable<long> sequenceNumber = null, Azure.Storage.Blobs.Models.PageBlobRequestConditions conditions = null, System.Threading.CancellationToken cancellationToken = null);
Parameters
SequenceNumberAction
action
Specifies how the service should modify the blob's sequence number.
Max sets the sequence number to
be the higher of the value included with the request and the value
currently stored for the blob. Update
sets the sequence number to the |
System.Nullable<System.Int64>
sequenceNumber
An updated sequence number of your choosing, if
|
PageBlobRequestConditions
conditions
Optional PageBlobRequestConditions to add conditions on updating the sequence number of this page blob. |
System.Threading.CancellationToken
cancellationToken
Optional System.Threading.CancellationToken to propagate notifications that the operation should be cancelled. |
Returns
Azure.Response<PageBlobInfo>
A Azure.Response describing the updated page blob. |
Remarks
A Azure.RequestFailedException will be thrown if a failure occurs.
UpdateSequenceNumberAsync(SequenceNumberAction, Nullable<Int64>, PageBlobRequestConditions, CancellationToken)
The UpdateSequenceNumberAsync(SequenceNumberAction, Nullable<Int64>, PageBlobRequestConditions, CancellationToken) operation changes the
sequence number action
and sequenceNumber
for this page blob.
For more information, see Set Blob Properties.
Declaration
[System.Diagnostics.DebuggerStepThrough]
public virtual System.Threading.Tasks.Task<Azure.Response<Azure.Storage.Blobs.Models.PageBlobInfo>> UpdateSequenceNumberAsync (Azure.Storage.Blobs.Models.SequenceNumberAction action, Nullable<long> sequenceNumber = null, Azure.Storage.Blobs.Models.PageBlobRequestConditions conditions = null, System.Threading.CancellationToken cancellationToken = null);
Parameters
SequenceNumberAction
action
Specifies how the service should modify the blob's sequence number.
Max sets the sequence number to
be the higher of the value included with the request and the value
currently stored for the blob. Update
sets the sequence number to the |
System.Nullable<System.Int64>
sequenceNumber
An updated sequence number of your choosing, if
|
PageBlobRequestConditions
conditions
Optional PageBlobRequestConditions to add conditions on updating the sequence number of this page blob. |
System.Threading.CancellationToken
cancellationToken
Optional System.Threading.CancellationToken to propagate notifications that the operation should be cancelled. |
Returns
System.Threading.Tasks.Task<Azure.Response<PageBlobInfo>>
A Azure.Response describing the updated page blob. |
Remarks
A Azure.RequestFailedException will be thrown if a failure occurs.
UploadPages(Stream, Int64, Byte[], PageBlobRequestConditions, IProgress<Int64>, CancellationToken)
The UploadPages(Stream, Int64, Byte[], PageBlobRequestConditions, IProgress<Int64>, CancellationToken) operation writes
content
to a range of pages in a page blob,
starting at offset
.
For more information, see Put Page.
Declaration
public virtual Azure.Response<Azure.Storage.Blobs.Models.PageInfo> UploadPages (System.IO.Stream content, long offset, byte[] transactionalContentHash = null, Azure.Storage.Blobs.Models.PageBlobRequestConditions conditions = null, IProgress<long> progressHandler = null, System.Threading.CancellationToken cancellationToken = null);
Parameters
System.IO.Stream
content
A System.IO.Stream containing the content of the pages to upload. The content can be up to 4 MB in size. |
System.Int64
offset
Specifies the starting offset for the |
System.Byte[]
transactionalContentHash
Optional MD5 hash of the block content. This hash is used to verify the integrity of the block during transport. When this hash is specified, the storage service compares the hash of the content that has arrived with this value. Note that this MD5 hash is not stored with the blob. If the two hashes do not match, the operation will fail with a Azure.RequestFailedException. |
PageBlobRequestConditions
conditions
Optional PageBlobRequestConditions to add conditions on uploading pages to this page blob. |
System.IProgress<System.Int64>
progressHandler
Optional System.IProgress to provide progress updates about data transfers. |
System.Threading.CancellationToken
cancellationToken
Optional System.Threading.CancellationToken to propagate notifications that the operation should be cancelled. |
Returns
Azure.Response<PageInfo>
A Azure.Response describing the state of the updated pages. |
Remarks
A Azure.RequestFailedException will be thrown if a failure occurs.
UploadPagesAsync(Stream, Int64, Byte[], PageBlobRequestConditions, IProgress<Int64>, CancellationToken)
The UploadPagesAsync(Stream, Int64, Byte[], PageBlobRequestConditions, IProgress<Int64>, CancellationToken) operation writes
content
to a range of pages in a page blob,
starting at offset
.
For more information, see Put Page.
Declaration
[System.Diagnostics.DebuggerStepThrough]
public virtual System.Threading.Tasks.Task<Azure.Response<Azure.Storage.Blobs.Models.PageInfo>> UploadPagesAsync (System.IO.Stream content, long offset, byte[] transactionalContentHash = null, Azure.Storage.Blobs.Models.PageBlobRequestConditions conditions = null, IProgress<long> progressHandler = null, System.Threading.CancellationToken cancellationToken = null);
Parameters
System.IO.Stream
content
A System.IO.Stream containing the content of the pages to upload. The content can be up to 4 MB in size. |
System.Int64
offset
Specifies the starting offset for the |
System.Byte[]
transactionalContentHash
Optional MD5 hash of the block content. This hash is used to verify the integrity of the block during transport. When this hash is specified, the storage service compares the hash of the content that has arrived with this value. Note that this MD5 hash is not stored with the blob. If the two hashes do not match, the operation will fail with a Azure.RequestFailedException. |
PageBlobRequestConditions
conditions
Optional PageBlobRequestConditions to add conditions on uploading pages to this page blob. |
System.IProgress<System.Int64>
progressHandler
Optional System.IProgress to provide progress updates about data transfers. |
System.Threading.CancellationToken
cancellationToken
Optional System.Threading.CancellationToken to propagate notifications that the operation should be cancelled. |
Returns
System.Threading.Tasks.Task<Azure.Response<PageInfo>>
A Azure.Response describing the state of the updated pages. |
Remarks
A Azure.RequestFailedException will be thrown if a failure occurs.
UploadPagesFromUri(Uri, HttpRange, HttpRange, Byte[], PageBlobRequestConditions, PageBlobRequestConditions, CancellationToken)
The UploadPagesFromUri(Uri, HttpRange, HttpRange, Byte[], PageBlobRequestConditions, PageBlobRequestConditions, 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.
Declaration
public virtual Azure.Response<Azure.Storage.Blobs.Models.PageInfo> UploadPagesFromUri (Uri sourceUri, Azure.HttpRange sourceRange, Azure.HttpRange range, byte[] sourceContentHash = null, Azure.Storage.Blobs.Models.PageBlobRequestConditions conditions = null, Azure.Storage.Blobs.Models.PageBlobRequestConditions sourceConditions = null, System.Threading.CancellationToken cancellationToken = null);
Parameters
System.Uri
sourceUri
Specifies the System.Uri of the source blob. The value may be a System.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. |
Azure.HttpRange
sourceRange
Optionally only upload the bytes of the blob in the sourceUri in the specified range. |
Azure.HttpRange
range
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. |
System.Byte[]
sourceContentHash
Optional MD5 hash of the page block content from the sourceUri. This hash is used to verify the integrity of the block during transport of the data from the Uri. When this hash is specified, the storage service compares the hash of the content that has arrived from the sourceUri with this value. Note that this md5 hash is not stored with the blob. If the two hashes do not match, the operation will fail with a Azure.RequestFailedException. |
PageBlobRequestConditions
conditions
Optional AppendBlobRequestConditions to add conditions on the copying of data to this page blob. |
PageBlobRequestConditions
sourceConditions
Optional AppendBlobRequestConditions to add conditions on the copying of data from this source blob. |
System.Threading.CancellationToken
cancellationToken
Optional System.Threading.CancellationToken to propagate notifications that the operation should be cancelled. |
Returns
Azure.Response<PageInfo>
A Azure.Response describing the state of the updated pages. |
Remarks
A Azure.RequestFailedException will be thrown if a failure occurs.
UploadPagesFromUriAsync(Uri, HttpRange, HttpRange, Byte[], PageBlobRequestConditions, PageBlobRequestConditions, CancellationToken)
The UploadPagesFromUriAsync(Uri, HttpRange, HttpRange, Byte[], PageBlobRequestConditions, PageBlobRequestConditions, 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.
Declaration
[System.Diagnostics.DebuggerStepThrough]
public virtual System.Threading.Tasks.Task<Azure.Response<Azure.Storage.Blobs.Models.PageInfo>> UploadPagesFromUriAsync (Uri sourceUri, Azure.HttpRange sourceRange, Azure.HttpRange range, byte[] sourceContentHash = null, Azure.Storage.Blobs.Models.PageBlobRequestConditions conditions = null, Azure.Storage.Blobs.Models.PageBlobRequestConditions sourceConditions = null, System.Threading.CancellationToken cancellationToken = null);
Parameters
System.Uri
sourceUri
Specifies the System.Uri of the source blob. The value may be a System.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. |
Azure.HttpRange
sourceRange
Optionally only upload the bytes of the blob in the sourceUri in the specified range. |
Azure.HttpRange
range
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. |
System.Byte[]
sourceContentHash
Optional MD5 hash of the page block content from the sourceUri. This hash is used to verify the integrity of the block during transport of the data from the Uri. When this hash is specified, the storage service compares the hash of the content that has arrived from the sourceUri with this value. Note that this md5 hash is not stored with the blob. If the two hashes do not match, the operation will fail with a Azure.RequestFailedException. |
PageBlobRequestConditions
conditions
Optional AppendBlobRequestConditions to add conditions on the copying of data to this page blob. |
PageBlobRequestConditions
sourceConditions
Optional AppendBlobRequestConditions to add conditions on the copying of data from this source blob. |
System.Threading.CancellationToken
cancellationToken
Optional System.Threading.CancellationToken to propagate notifications that the operation should be cancelled. |
Returns
System.Threading.Tasks.Task<Azure.Response<PageInfo>>
A Azure.Response describing the state of the updated pages. |
Remarks
A Azure.RequestFailedException will be thrown if a failure occurs.
WithSnapshot(String)
Initializes a new instance of the PageBlobClient class with an identical System.Uri source but the specified snapshot timestamp.
For more information, see Create a snapshot of a blob.
Declaration
public Azure.Storage.Blobs.Specialized.PageBlobClient WithSnapshot (string snapshot);
Parameters
System.String
snapshot
The snapshot identifier. |
Returns
PageBlobClient
A new PageBlobClient instance. |
Remarks
Pass null or empty string to remove the snapshot returning a URL
to the base blob.
WithSnapshotCore(String)
Creates a new instance of the PageBlobClient class with an identical System.Uri source but the specified snapshot timestamp.
Declaration
protected override sealed Azure.Storage.Blobs.Specialized.BlobBaseClient WithSnapshotCore (string snapshot);
Parameters
System.String
snapshot
The snapshot identifier. |
Returns
BlobBaseClient
A new PageBlobClient instance. |
WithVersion(String)
Creates a new PageBlobClient object identical to the source but with the specified version ID. Pass "" to remove the version ID returning a URL to the base blob.
Declaration
public Azure.Storage.Blobs.Specialized.PageBlobClient WithVersion (string versionId);
Parameters
System.String
versionId
version ID |
Returns
PageBlobClient
|