Table of Contents

Interface ICloudBlob

Namespace
Microsoft.WindowsAzure.Storage.Blob
Assembly
Microsoft.WindowsAzure.Storage.dll

An interface required for Microsoft Azure blob types. The CloudBlockBlob and CloudPageBlob classes implement the ICloudBlob interface.

public interface ICloudBlob : IListBlobItem
Inherited Members

Properties

BlobType

Gets the type of the blob.

BlobType BlobType { get; }

Property Value

BlobType

A BlobType enumeration value.

CopyState

Gets the state of the most recent or pending copy operation.

CopyState CopyState { get; }

Property Value

CopyState

A CopyState object containing the copy state, or null if there is no copy state for the blob.

IsSnapshot

Gets a value indicating whether this blob is a snapshot.

bool IsSnapshot { get; }

Property Value

bool

true if this blob is a snapshot; otherwise, false.

Metadata

Gets the user-defined metadata for the blob.

IDictionary<string, string> Metadata { get; }

Property Value

IDictionary<string, string>

An IDictionary<TKey, TValue> object containing the blob's metadata as a collection of name-value pairs.

Name

Gets the blob's name.

string Name { get; }

Property Value

string

A string containing the name of the blob.

Properties

Gets the blob's system properties.

BlobProperties Properties { get; }

Property Value

BlobProperties

A BlobProperties object.

ServiceClient

Gets the CloudBlobClient object that represents the Blob service.

CloudBlobClient ServiceClient { get; }

Property Value

CloudBlobClient

A CloudBlobClient object.

SnapshotQualifiedStorageUri

Gets the blob's URI for both the primary and secondary locations, including query string information if the blob is a snapshot.

StorageUri SnapshotQualifiedStorageUri { get; }

Property Value

StorageUri

An object of type StorageUri containing the blob's URIs for both the primary and secondary locations, including snapshot query information if the blob is a snapshot.

SnapshotQualifiedUri

Gets the absolute URI to the blob, including query string information if the blob is a snapshot.

Uri SnapshotQualifiedUri { get; }

Property Value

Uri

A System.Uri specifying the absolute URI to the blob, including snapshot query information if the blob is a snapshot.

SnapshotTime

Gets the date and time that the blob snapshot was taken, if this blob is a snapshot.

DateTimeOffset? SnapshotTime { get; }

Property Value

DateTimeOffset?

A DateTimeOffset containing the blob's snapshot time if the blob is a snapshot; otherwise, null.

Remarks

If the blob is not a snapshot, the value of this property is null.

StreamMinimumReadSizeInBytes

Gets or sets the minimum number of bytes to buffer when reading from a blob stream.

int StreamMinimumReadSizeInBytes { get; set; }

Property Value

int

The minimum number of bytes to buffer.

StreamWriteSizeInBytes

Gets or sets the number of bytes to buffer when writing to a page blob stream or the block size for writing to a block blob.

int StreamWriteSizeInBytes { get; set; }

Property Value

int

The number of bytes to buffer or the size of a block, in bytes.

Methods

AbortCopy(string, AccessCondition, BlobRequestOptions, OperationContext)

Aborts an ongoing blob copy operation.

void AbortCopy(string copyId, AccessCondition accessCondition = null, BlobRequestOptions options = null, OperationContext operationContext = null)

Parameters

copyId string

A string identifying the copy operation.

accessCondition AccessCondition

An AccessCondition object that represents the condition that must be met in order for the request to proceed.

options BlobRequestOptions

A BlobRequestOptions object that specifies additional options for the request. If null, default options are applied to the request.

operationContext OperationContext

An OperationContext object that represents the context for the current operation.

AbortCopyAsync(string)

Initiates an asynchronous operation to abort an ongoing blob copy operation.

Task AbortCopyAsync(string copyId)

Parameters

copyId string

A string identifying the copy operation.

Returns

Task

A Task object that represents the asynchronous operation.

AbortCopyAsync(string, AccessCondition, BlobRequestOptions, OperationContext)

Initiates an asynchronous operation to abort an ongoing blob copy operation.

Task AbortCopyAsync(string copyId, AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext)

Parameters

copyId string

A string identifying the copy operation.

accessCondition AccessCondition

An AccessCondition object that represents the condition that must be met in order for the request to proceed.

options BlobRequestOptions

A BlobRequestOptions object that specifies additional options for the request.

operationContext OperationContext

An OperationContext object that represents the context for the current operation.

Returns

Task

A Task object that represents the asynchronous operation.

AbortCopyAsync(string, AccessCondition, BlobRequestOptions, OperationContext, CancellationToken)

Initiates an asynchronous operation to abort an ongoing blob copy operation.

Task AbortCopyAsync(string copyId, AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext, CancellationToken cancellationToken)

Parameters

copyId string

A string identifying the copy operation.

accessCondition AccessCondition

An AccessCondition object that represents the condition that must be met in order for the request to proceed.

options BlobRequestOptions

A BlobRequestOptions object that specifies additional options for the request.

operationContext OperationContext

An OperationContext object that represents the context for the current operation.

cancellationToken CancellationToken

A CancellationToken to observe while waiting for a task to complete.

Returns

Task

A Task object that represents the asynchronous operation.

AbortCopyAsync(string, CancellationToken)

Initiates an asynchronous operation to abort an ongoing blob copy operation.

Task AbortCopyAsync(string copyId, CancellationToken cancellationToken)

Parameters

copyId string

A string identifying the copy operation.

cancellationToken CancellationToken

A CancellationToken to observe while waiting for a task to complete.

Returns

Task

A Task object that represents the asynchronous operation.

AcquireLease(TimeSpan?, string, AccessCondition, BlobRequestOptions, OperationContext)

Acquires a lease on this blob.

string AcquireLease(TimeSpan? leaseTime, string proposedLeaseId, AccessCondition accessCondition = null, BlobRequestOptions options = null, OperationContext operationContext = null)

Parameters

leaseTime TimeSpan?

A TimeSpan representing the span of time for which to acquire the lease, which will be rounded down to seconds.

proposedLeaseId string

A string representing the proposed lease ID for the new lease.

accessCondition AccessCondition

An AccessCondition object that represents the condition that must be met in order for the request to proceed.

options BlobRequestOptions

A BlobRequestOptions object that specifies additional options for the request. If null, default options are applied to the request.

operationContext OperationContext

An OperationContext object that represents the context for the current operation.

Returns

string

The ID of the acquired lease.

AcquireLeaseAsync(TimeSpan?, string)

Initiates an asynchronous operation to acquire a lease on this blob.

Task<string> AcquireLeaseAsync(TimeSpan? leaseTime, string proposedLeaseId = null)

Parameters

leaseTime TimeSpan?

A TimeSpan representing the span of time for which to acquire the lease, which will be rounded down to seconds.

proposedLeaseId string

A string representing the proposed lease ID for the new lease.

Returns

Task<string>

A Task object of type string that represents the asynchronous operation.

AcquireLeaseAsync(TimeSpan?, string, AccessCondition, BlobRequestOptions, OperationContext)

Initiates an asynchronous operation to acquire a lease on this blob.

Task<string> AcquireLeaseAsync(TimeSpan? leaseTime, string proposedLeaseId, AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext)

Parameters

leaseTime TimeSpan?

A TimeSpan representing the span of time for which to acquire the lease, which will be rounded down to seconds.

proposedLeaseId string

A string representing the proposed lease ID for the new lease.

accessCondition AccessCondition

An AccessCondition object that represents the condition that must be met in order for the request to proceed.

options BlobRequestOptions

A BlobRequestOptions object that specifies additional options for the request.

operationContext OperationContext

An OperationContext object that represents the context for the current operation.

Returns

Task<string>

A Task object of type string that represents the asynchronous operation.

AcquireLeaseAsync(TimeSpan?, string, AccessCondition, BlobRequestOptions, OperationContext, CancellationToken)

Initiates an asynchronous operation to acquire a lease on this blob.

Task<string> AcquireLeaseAsync(TimeSpan? leaseTime, string proposedLeaseId, AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext, CancellationToken cancellationToken)

Parameters

leaseTime TimeSpan?

A TimeSpan representing the span of time for which to acquire the lease, which will be rounded down to seconds.

proposedLeaseId string

A string representing the proposed lease ID for the new lease.

accessCondition AccessCondition

An AccessCondition object that represents the condition that must be met in order for the request to proceed.

options BlobRequestOptions

A BlobRequestOptions object that specifies additional options for the request.

operationContext OperationContext

An OperationContext object that represents the context for the current operation.

cancellationToken CancellationToken

A CancellationToken to observe while waiting for a task to complete.

Returns

Task<string>

A Task object of type string that represents the asynchronous operation.

AcquireLeaseAsync(TimeSpan?, string, CancellationToken)

Initiates an asynchronous operation to acquire a lease on this blob.

Task<string> AcquireLeaseAsync(TimeSpan? leaseTime, string proposedLeaseId, CancellationToken cancellationToken)

Parameters

leaseTime TimeSpan?

A TimeSpan representing the span of time for which to acquire the lease, which will be rounded down to seconds.

proposedLeaseId string

A string representing the proposed lease ID for the new lease.

cancellationToken CancellationToken

A CancellationToken to observe while waiting for a task to complete.

Returns

Task<string>

A Task object of type string that represents the asynchronous operation.

BeginAbortCopy(string, AccessCondition, BlobRequestOptions, OperationContext, AsyncCallback, object)

Begins an asynchronous operation to abort an ongoing blob copy operation.

ICancellableAsyncResult BeginAbortCopy(string copyId, AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext, AsyncCallback callback, object state)

Parameters

copyId string

A string identifying the copy operation.

accessCondition AccessCondition

An AccessCondition object that represents the condition that must be met in order for the request to proceed.

options BlobRequestOptions

A BlobRequestOptions object that specifies additional options for the request.

operationContext OperationContext

An OperationContext object that represents the context for the current operation.

callback AsyncCallback

An AsyncCallback delegate that will receive notification when the asynchronous operation completes.

state object

A user-defined object that will be passed to the callback delegate.

Returns

ICancellableAsyncResult

An ICancellableAsyncResult that references the asynchronous operation.

BeginAbortCopy(string, AsyncCallback, object)

Begins an asynchronous operation to abort an ongoing blob copy operation.

ICancellableAsyncResult BeginAbortCopy(string copyId, AsyncCallback callback, object state)

Parameters

copyId string

A string identifying the copy operation.

callback AsyncCallback

An AsyncCallback delegate that will receive notification when the asynchronous operation completes.

state object

A user-defined object that will be passed to the callback delegate.

Returns

ICancellableAsyncResult

An ICancellableAsyncResult that references the asynchronous operation.

BeginAcquireLease(TimeSpan?, string, AccessCondition, BlobRequestOptions, OperationContext, AsyncCallback, object)

Begins an asynchronous operation to acquire a lease on this blob.

ICancellableAsyncResult BeginAcquireLease(TimeSpan? leaseTime, string proposedLeaseId, AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext, AsyncCallback callback, object state)

Parameters

leaseTime TimeSpan?

A TimeSpan representing the span of time for which to acquire the lease, which will be rounded down to seconds.

proposedLeaseId string

A string representing the proposed lease ID for the new lease.

accessCondition AccessCondition

An AccessCondition object that represents the condition that must be met in order for the request to proceed.

options BlobRequestOptions

A BlobRequestOptions object that specifies additional options for the request.

operationContext OperationContext

An OperationContext object that represents the context for the current operation.

callback AsyncCallback

An optional callback delegate that will receive notification when the asynchronous operation completes.

state object

A user-defined object that will be passed to the callback delegate.

Returns

ICancellableAsyncResult

An ICancellableAsyncResult that references the asynchronous operation.

BeginAcquireLease(TimeSpan?, string, AsyncCallback, object)

Begins an asynchronous operation to acquire a lease on this blob.

ICancellableAsyncResult BeginAcquireLease(TimeSpan? leaseTime, string proposedLeaseId, AsyncCallback callback, object state)

Parameters

leaseTime TimeSpan?

A TimeSpan representing the span of time for which to acquire the lease, which will be rounded down to seconds.

proposedLeaseId string

A string representing the proposed lease ID for the new lease.

callback AsyncCallback

An optional callback delegate that will receive notification when the asynchronous operation completes.

state object

A user-defined object that will be passed to the callback delegate.

Returns

ICancellableAsyncResult

An ICancellableAsyncResult that references the asynchronous operation.

BeginBreakLease(TimeSpan?, AccessCondition, BlobRequestOptions, OperationContext, AsyncCallback, object)

Begins an asynchronous operation to break the current lease on this blob.

ICancellableAsyncResult BeginBreakLease(TimeSpan? breakPeriod, AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext, AsyncCallback callback, object state)

Parameters

breakPeriod TimeSpan?

A TimeSpan representing the amount of time to allow the lease to remain, which will be rounded down to seconds.

accessCondition AccessCondition

An AccessCondition object that represents the condition that must be met in order for the request to proceed.

options BlobRequestOptions

A BlobRequestOptions object that specifies additional options for the request.

operationContext OperationContext

An OperationContext object that represents the context for the current operation.

callback AsyncCallback

An optional callback delegate that will receive notification when the asynchronous operation completes.

state object

A user-defined object that will be passed to the callback delegate.

Returns

ICancellableAsyncResult

An ICancellableAsyncResult that references the asynchronous operation.

BeginBreakLease(TimeSpan?, AsyncCallback, object)

Begins an asynchronous operation to break the current lease on this blob.

ICancellableAsyncResult BeginBreakLease(TimeSpan? breakPeriod, AsyncCallback callback, object state)

Parameters

breakPeriod TimeSpan?

A TimeSpan representing the amount of time to allow the lease to remain, which will be rounded down to seconds.

callback AsyncCallback

An optional callback delegate that will receive notification when the asynchronous operation completes.

state object

A user-defined object that will be passed to the callback delegate.

Returns

ICancellableAsyncResult

An ICancellableAsyncResult that references the asynchronous operation.

BeginChangeLease(string, AccessCondition, BlobRequestOptions, OperationContext, AsyncCallback, object)

Begins an asynchronous operation to change the lease on this blob.

ICancellableAsyncResult BeginChangeLease(string proposedLeaseId, AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext, AsyncCallback callback, object state)

Parameters

proposedLeaseId string

A string representing the proposed lease ID for the new lease.

accessCondition AccessCondition

An AccessCondition object that represents the condition that must be met in order for the request to proceed, including a required lease ID.

options BlobRequestOptions

A BlobRequestOptions object that specifies additional options for the request.

operationContext OperationContext

An OperationContext object that represents the context for the current operation.

callback AsyncCallback

An optional callback delegate that will receive notification when the asynchronous operation completes.

state object

A user-defined object that will be passed to the callback delegate.

Returns

ICancellableAsyncResult

An ICancellableAsyncResult that references the asynchronous operation.

BeginChangeLease(string, AccessCondition, AsyncCallback, object)

Begins an asynchronous operation to change the lease on this blob.

ICancellableAsyncResult BeginChangeLease(string proposedLeaseId, AccessCondition accessCondition, AsyncCallback callback, object state)

Parameters

proposedLeaseId string

A string representing the proposed lease ID for the new lease.

accessCondition AccessCondition

An AccessCondition object that represents the condition that must be met in order for the request to proceed, including a required lease ID.

callback AsyncCallback

An optional callback delegate that will receive notification when the asynchronous operation completes.

state object

A user-defined object that will be passed to the callback delegate.

Returns

ICancellableAsyncResult

An ICancellableAsyncResult that references the asynchronous operation.

BeginDelete(DeleteSnapshotsOption, AccessCondition, BlobRequestOptions, OperationContext, AsyncCallback, object)

Begins an asynchronous operation to delete the blob.

ICancellableAsyncResult BeginDelete(DeleteSnapshotsOption deleteSnapshotsOption, AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext, AsyncCallback callback, object state)

Parameters

deleteSnapshotsOption DeleteSnapshotsOption

A DeleteSnapshotsOption object indicating whether to only delete the blob, to delete the blob and all snapshots, or to only delete the snapshots.

accessCondition AccessCondition

An AccessCondition object that represents the condition that must be met in order for the request to proceed.

options BlobRequestOptions

A BlobRequestOptions object that specifies additional options for the request.

operationContext OperationContext

An OperationContext object that represents the context for the current operation.

callback AsyncCallback

An AsyncCallback delegate that will receive notification when the asynchronous operation completes.

state object

A user-defined object that will be passed to the callback delegate.

Returns

ICancellableAsyncResult

An ICancellableAsyncResult that references the asynchronous operation.

BeginDelete(AsyncCallback, object)

Begins an asynchronous operation to delete the blob.

ICancellableAsyncResult BeginDelete(AsyncCallback callback, object state)

Parameters

callback AsyncCallback

An AsyncCallback delegate that will receive notification when the asynchronous operation completes.

state object

A user-defined object that will be passed to the callback delegate.

Returns

ICancellableAsyncResult

An ICancellableAsyncResult that references the asynchronous operation.

BeginDeleteIfExists(DeleteSnapshotsOption, AccessCondition, BlobRequestOptions, OperationContext, AsyncCallback, object)

Begins an asynchronous request to delete the blob if it already exists.

ICancellableAsyncResult BeginDeleteIfExists(DeleteSnapshotsOption deleteSnapshotsOption, AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext, AsyncCallback callback, object state)

Parameters

deleteSnapshotsOption DeleteSnapshotsOption

A DeleteSnapshotsOption object indicating whether to only delete the blob, to delete the blob and all snapshots, or to only delete the snapshots.

accessCondition AccessCondition

An AccessCondition object that represents the condition that must be met in order for the request to proceed.

options BlobRequestOptions

A BlobRequestOptions object that specifies additional options for the request.

operationContext OperationContext

An OperationContext object that represents the context for the current operation.

callback AsyncCallback

An AsyncCallback delegate that will receive notification when the asynchronous operation completes.

state object

A user-defined object that will be passed to the callback delegate.

Returns

ICancellableAsyncResult

An ICancellableAsyncResult that references the asynchronous operation.

BeginDeleteIfExists(AsyncCallback, object)

Begins an asynchronous request to delete the blob if it already exists.

ICancellableAsyncResult BeginDeleteIfExists(AsyncCallback callback, object state)

Parameters

callback AsyncCallback

An AsyncCallback delegate that will receive notification when the asynchronous operation completes.

state object

A user-defined object that will be passed to the callback delegate.

Returns

ICancellableAsyncResult

An ICancellableAsyncResult that references the asynchronous operation.

BeginDownloadRangeToByteArray(byte[], int, long?, long?, AccessCondition, BlobRequestOptions, OperationContext, AsyncCallback, object)

Begins an asynchronous operation to download a range of bytes from a blob to a byte array.

ICancellableAsyncResult BeginDownloadRangeToByteArray(byte[] target, int index, long? blobOffset, long? length, AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext, AsyncCallback callback, object state)

Parameters

target byte[]

The target byte array.

index int

The starting offset in the byte array.

blobOffset long?

The starting offset of the data range, in bytes.

length long?

The length of the data range, in bytes.

accessCondition AccessCondition

An AccessCondition object that represents the condition that must be met in order for the request to proceed.

options BlobRequestOptions

A BlobRequestOptions object that specifies additional options for the request.

operationContext OperationContext

An OperationContext object that represents the context for the current operation.

callback AsyncCallback

An AsyncCallback delegate that will receive notification when the asynchronous operation completes.

state object

A user-defined object that will be passed to the callback delegate.

Returns

ICancellableAsyncResult

An ICancellableAsyncResult that references the asynchronous operation.

BeginDownloadRangeToByteArray(byte[], int, long?, long?, AsyncCallback, object)

Begins an asynchronous operation to download a range of bytes from a blob to a byte array.

ICancellableAsyncResult BeginDownloadRangeToByteArray(byte[] target, int index, long? blobOffset, long? length, AsyncCallback callback, object state)

Parameters

target byte[]

The target byte array.

index int

The starting offset in the byte array.

blobOffset long?

The starting offset of the data range, in bytes.

length long?

The length of the data range, in bytes.

callback AsyncCallback

An AsyncCallback delegate that will receive notification when the asynchronous operation completes.

state object

A user-defined object that will be passed to the callback delegate.

Returns

ICancellableAsyncResult

An ICancellableAsyncResult that references the asynchronous operation.

BeginDownloadRangeToStream(Stream, long?, long?, AccessCondition, BlobRequestOptions, OperationContext, AsyncCallback, object)

Begins an asynchronous operation to download a range of bytes from a blob to a stream.

ICancellableAsyncResult BeginDownloadRangeToStream(Stream target, long? offset, long? length, AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext, AsyncCallback callback, object state)

Parameters

target Stream

A Stream object representing the target stream.

offset long?

The starting offset of the data range, in bytes.

length long?

The length of the data range, in bytes.

accessCondition AccessCondition

An AccessCondition object that represents the condition that must be met in order for the request to proceed.

options BlobRequestOptions

A BlobRequestOptions object that specifies additional options for the request.

operationContext OperationContext

An OperationContext object that represents the context for the current operation.

callback AsyncCallback

An AsyncCallback delegate that will receive notification when the asynchronous operation completes.

state object

A user-defined object that will be passed to the callback delegate.

Returns

ICancellableAsyncResult

An ICancellableAsyncResult that references the asynchronous operation.

BeginDownloadRangeToStream(Stream, long?, long?, AsyncCallback, object)

Begins an asynchronous operation to download a range of bytes from a blob to a stream.

ICancellableAsyncResult BeginDownloadRangeToStream(Stream target, long? offset, long? length, AsyncCallback callback, object state)

Parameters

target Stream

A Stream object representing the target stream.

offset long?

The starting offset of the data range, in bytes.

length long?

The length of the data range, in bytes.

callback AsyncCallback

An AsyncCallback delegate that will receive notification when the asynchronous operation completes.

state object

A user-defined object that will be passed to the callback delegate.

Returns

ICancellableAsyncResult

An ICancellableAsyncResult that references the asynchronous operation.

BeginDownloadToByteArray(byte[], int, AccessCondition, BlobRequestOptions, OperationContext, AsyncCallback, object)

Begins an asynchronous operation to download the contents of a blob to a byte array.

ICancellableAsyncResult BeginDownloadToByteArray(byte[] target, int index, AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext, AsyncCallback callback, object state)

Parameters

target byte[]

The target byte array.

index int

The starting offset in the byte array.

accessCondition AccessCondition

An AccessCondition object that represents the condition that must be met in order for the request to proceed.

options BlobRequestOptions

A BlobRequestOptions object that specifies additional options for the request.

operationContext OperationContext

An OperationContext object that represents the context for the current operation.

callback AsyncCallback

An AsyncCallback delegate that will receive notification when the asynchronous operation completes.

state object

A user-defined object that will be passed to the callback delegate.

Returns

ICancellableAsyncResult

An ICancellableAsyncResult that references the asynchronous operation.

BeginDownloadToByteArray(byte[], int, AsyncCallback, object)

Begins an asynchronous operation to download the contents of a blob to a byte array.

ICancellableAsyncResult BeginDownloadToByteArray(byte[] target, int index, AsyncCallback callback, object state)

Parameters

target byte[]

The target byte array.

index int

The starting offset in the byte array.

callback AsyncCallback

An AsyncCallback delegate that will receive notification when the asynchronous operation completes.

state object

A user-defined object that will be passed to the callback delegate.

Returns

ICancellableAsyncResult

An ICancellableAsyncResult that references the asynchronous operation.

BeginDownloadToFile(string, FileMode, AccessCondition, BlobRequestOptions, OperationContext, AsyncCallback, object)

Begins an asynchronous operation to download the contents of a blob to a file.

ICancellableAsyncResult BeginDownloadToFile(string path, FileMode mode, AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext, AsyncCallback callback, object state)

Parameters

path string

A string containing the path to the target file.

mode FileMode

A FileMode enumeration value that determines how to open or create the file.

accessCondition AccessCondition

An AccessCondition object that represents the condition that must be met in order for the request to proceed.

options BlobRequestOptions

A BlobRequestOptions object that specifies additional options for the request.

operationContext OperationContext

An OperationContext object that represents the context for the current operation.

callback AsyncCallback

An AsyncCallback delegate that will receive notification when the asynchronous operation completes.

state object

A user-defined object that will be passed to the callback delegate.

Returns

ICancellableAsyncResult

An ICancellableAsyncResult that references the asynchronous operation.

BeginDownloadToFile(string, FileMode, AsyncCallback, object)

Begins an asynchronous operation to download the contents of a blob to a file.

ICancellableAsyncResult BeginDownloadToFile(string path, FileMode mode, AsyncCallback callback, object state)

Parameters

path string

A string containing the path to the target file.

mode FileMode

A FileMode enumeration value that determines how to open or create the file.

callback AsyncCallback

An AsyncCallback delegate that will receive notification when the asynchronous operation completes.

state object

A user-defined object that will be passed to the callback delegate.

Returns

ICancellableAsyncResult

An ICancellableAsyncResult that references the asynchronous operation.

BeginDownloadToStream(Stream, AccessCondition, BlobRequestOptions, OperationContext, AsyncCallback, object)

Begins an asynchronous operation to download the contents of a blob to a stream.

ICancellableAsyncResult BeginDownloadToStream(Stream target, AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext, AsyncCallback callback, object state)

Parameters

target Stream

A Stream object representing the target stream.

accessCondition AccessCondition

An AccessCondition object that represents the condition that must be met in order for the request to proceed.

options BlobRequestOptions

A BlobRequestOptions object that specifies additional options for the request.

operationContext OperationContext

An OperationContext object that represents the context for the current operation.

callback AsyncCallback

An AsyncCallback delegate that will receive notification when the asynchronous operation completes.

state object

A user-defined object that will be passed to the callback delegate.

Returns

ICancellableAsyncResult

An ICancellableAsyncResult that references the asynchronous operation.

BeginDownloadToStream(Stream, AsyncCallback, object)

Begins an asynchronous operation to download the contents of a blob to a stream.

ICancellableAsyncResult BeginDownloadToStream(Stream target, AsyncCallback callback, object state)

Parameters

target Stream

A Stream object representing the target stream.

callback AsyncCallback

An AsyncCallback delegate that will receive notification when the asynchronous operation completes.

state object

A user-defined object that will be passed to the callback delegate.

Returns

ICancellableAsyncResult

An ICancellableAsyncResult that references the asynchronous operation.

BeginExists(BlobRequestOptions, OperationContext, AsyncCallback, object)

Begins an asynchronous request to check existence of the blob.

ICancellableAsyncResult BeginExists(BlobRequestOptions options, OperationContext operationContext, AsyncCallback callback, object state)

Parameters

options BlobRequestOptions

A BlobRequestOptions object that specifies additional options for the request.

operationContext OperationContext

An OperationContext object that represents the context for the current operation.

callback AsyncCallback

An AsyncCallback delegate that will receive notification when the asynchronous operation completes.

state object

A user-defined object that will be passed to the callback delegate.

Returns

ICancellableAsyncResult

An ICancellableAsyncResult that references the asynchronous operation.

BeginExists(AsyncCallback, object)

Begins an asynchronous request to check existence of the blob.

ICancellableAsyncResult BeginExists(AsyncCallback callback, object state)

Parameters

callback AsyncCallback

An AsyncCallback delegate that will receive notification when the asynchronous operation completes.

state object

A user-defined object that will be passed to the callback delegate.

Returns

ICancellableAsyncResult

An ICancellableAsyncResult that references the asynchronous operation.

BeginFetchAttributes(AccessCondition, BlobRequestOptions, OperationContext, AsyncCallback, object)

Begins an asynchronous operation to populate the blob's properties and metadata.

ICancellableAsyncResult BeginFetchAttributes(AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext, AsyncCallback callback, object state)

Parameters

accessCondition AccessCondition

An AccessCondition object that represents the condition that must be met in order for the request to proceed.

options BlobRequestOptions

A BlobRequestOptions object that specifies additional options for the request.

operationContext OperationContext

An OperationContext object that represents the context for the current operation.

callback AsyncCallback

An AsyncCallback delegate that will receive notification when the asynchronous operation completes.

state object

A user-defined object that will be passed to the callback delegate.

Returns

ICancellableAsyncResult

An ICancellableAsyncResult that references the asynchronous operation.

BeginFetchAttributes(AsyncCallback, object)

Begins an asynchronous operation to populate the blob's properties and metadata.

ICancellableAsyncResult BeginFetchAttributes(AsyncCallback callback, object state)

Parameters

callback AsyncCallback

An AsyncCallback delegate that will receive notification when the asynchronous operation completes.

state object

A user-defined object that will be passed to the callback delegate.

Returns

ICancellableAsyncResult

An ICancellableAsyncResult that references the asynchronous operation.

BeginGetAccountProperties(BlobRequestOptions, OperationContext, AsyncCallback, object)

Begins an asynchronous operation to get properties for the account this blob resides on.

[DoesServiceRequest]
ICancellableAsyncResult BeginGetAccountProperties(BlobRequestOptions requestOptions, OperationContext operationContext, AsyncCallback callback, object state)

Parameters

requestOptions BlobRequestOptions

A BlobRequestOptions object that specifies additional options for the request.

operationContext OperationContext

An OperationContext object that represents the context for the current operation.

callback AsyncCallback

An AsyncCallback delegate that will receive notification when the asynchronous operation completes.

state object

A user-defined object to be passed to the callback delegate.

Returns

ICancellableAsyncResult

An ICancellableAsyncResult that references the asynchronous operation.

BeginGetAccountProperties(AsyncCallback, object)

Begins an asynchronous operation to get properties for the account this blob resides on.

[DoesServiceRequest]
ICancellableAsyncResult BeginGetAccountProperties(AsyncCallback callback, object state)

Parameters

callback AsyncCallback

An AsyncCallback delegate that will receive notification when the asynchronous operation completes.

state object

A user-defined object to be passed to the callback delegate.

Returns

ICancellableAsyncResult

An ICancellableAsyncResult that references the asynchronous operation.

BeginOpenRead(AccessCondition, BlobRequestOptions, OperationContext, AsyncCallback, object)

Begins an asynchronous operation to open a stream for reading from the blob.

ICancellableAsyncResult BeginOpenRead(AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext, AsyncCallback callback, object state)

Parameters

accessCondition AccessCondition

An AccessCondition object that represents the condition that must be met in order for the request to proceed. If null, no condition is used.

options BlobRequestOptions

A BlobRequestOptions object that specifies additional options for the request.

operationContext OperationContext

An OperationContext object that represents the context for the current operation.

callback AsyncCallback

An AsyncCallback delegate that will receive notification when the asynchronous operation completes.

state object

A user-defined object that will be passed to the callback delegate.

Returns

ICancellableAsyncResult

An ICancellableAsyncResult that references the asynchronous operation.

Remarks

On the Stream object returned by the EndOpenRead(IAsyncResult) method, the EndRead(IAsyncResult) method must be called exactly once for every BeginRead(byte[], int, int, AsyncCallback, object) call. Failing to end the read process before beginning another read process can cause unexpected behavior.

Note that this method always makes a call to the BeginFetchAttributes(AccessCondition, BlobRequestOptions, OperationContext, AsyncCallback, object) method under the covers.

Set the StreamMinimumReadSizeInBytes property before calling this method to specify the minimum number of bytes to buffer when reading from the stream. The value must be at least 16 KB.

BeginOpenRead(AsyncCallback, object)

Begins an asynchronous operation to open a stream for reading from the blob.

ICancellableAsyncResult BeginOpenRead(AsyncCallback callback, object state)

Parameters

callback AsyncCallback

An AsyncCallback delegate that will receive notification when the asynchronous operation completes.

state object

A user-defined object that will be passed to the callback delegate.

Returns

ICancellableAsyncResult

An ICancellableAsyncResult that references the asynchronous operation.

Remarks

On the Stream object returned by the EndOpenRead(IAsyncResult) method, the EndRead(IAsyncResult) method must be called exactly once for every BeginRead(byte[], int, int, AsyncCallback, object) call. Failing to end the read process before beginning another read process can cause unexpected behavior.

Note that this method always makes a call to the BeginFetchAttributes(AccessCondition, BlobRequestOptions, OperationContext, AsyncCallback, object) method under the covers.

Set the StreamMinimumReadSizeInBytes property before calling this method to specify the minimum number of bytes to buffer when reading from the stream. The value must be at least 16 KB.

BeginReleaseLease(AccessCondition, BlobRequestOptions, OperationContext, AsyncCallback, object)

Begins an asynchronous operation to release the lease on this blob.

ICancellableAsyncResult BeginReleaseLease(AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext, AsyncCallback callback, object state)

Parameters

accessCondition AccessCondition

An AccessCondition object that represents the condition that must be met in order for the request to proceed, including a required lease ID.

options BlobRequestOptions

A BlobRequestOptions object that specifies additional options for the request.

operationContext OperationContext

An OperationContext object that represents the context for the current operation.

callback AsyncCallback

An optional callback delegate that will receive notification when the asynchronous operation completes.

state object

A user-defined object that will be passed to the callback delegate.

Returns

ICancellableAsyncResult

An ICancellableAsyncResult that references the asynchronous operation.

BeginReleaseLease(AccessCondition, AsyncCallback, object)

Begins an asynchronous operation to release the lease on this blob.

ICancellableAsyncResult BeginReleaseLease(AccessCondition accessCondition, AsyncCallback callback, object state)

Parameters

accessCondition AccessCondition

An AccessCondition object that represents the condition that must be met in order for the request to proceed, including a required lease ID.

callback AsyncCallback

An optional callback delegate that will receive notification when the asynchronous operation completes.

state object

A user-defined object that will be passed to the callback delegate.

Returns

ICancellableAsyncResult

An ICancellableAsyncResult that references the asynchronous operation.

BeginRenewLease(AccessCondition, BlobRequestOptions, OperationContext, AsyncCallback, object)

Begins an asynchronous operation to renew a lease on this blob.

ICancellableAsyncResult BeginRenewLease(AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext, AsyncCallback callback, object state)

Parameters

accessCondition AccessCondition

An AccessCondition object that represents the condition that must be met in order for the request to proceed, including a required lease ID.

options BlobRequestOptions

A BlobRequestOptions object that specifies additional options for the request.

operationContext OperationContext

An OperationContext object that represents the context for the current operation.

callback AsyncCallback

An optional callback delegate that will receive notification when the asynchronous operation completes.

state object

A user-defined object that will be passed to the callback delegate.

Returns

ICancellableAsyncResult

An ICancellableAsyncResult that references the asynchronous operation.

BeginRenewLease(AccessCondition, AsyncCallback, object)

Begins an asynchronous operation to renew a lease on this blob.

ICancellableAsyncResult BeginRenewLease(AccessCondition accessCondition, AsyncCallback callback, object state)

Parameters

accessCondition AccessCondition

An AccessCondition object that represents the condition that must be met in order for the request to proceed, including a required lease ID.

callback AsyncCallback

An optional callback delegate that will receive notification when the asynchronous operation completes.

state object

A user-defined object that will be passed to the callback delegate.

Returns

ICancellableAsyncResult

An ICancellableAsyncResult that references the asynchronous operation.

BeginSetMetadata(AccessCondition, BlobRequestOptions, OperationContext, AsyncCallback, object)

Begins an asynchronous operation to update the blob's metadata.

ICancellableAsyncResult BeginSetMetadata(AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext, AsyncCallback callback, object state)

Parameters

accessCondition AccessCondition

An AccessCondition object that represents the condition that must be met in order for the request to proceed.

options BlobRequestOptions

A BlobRequestOptions object that specifies additional options for the request.

operationContext OperationContext

An OperationContext object that represents the context for the current operation.

callback AsyncCallback

An AsyncCallback delegate that will receive notification when the asynchronous operation completes.

state object

A user-defined object that will be passed to the callback delegate.

Returns

ICancellableAsyncResult

An ICancellableAsyncResult that references the asynchronous operation.

BeginSetMetadata(AsyncCallback, object)

Begins an asynchronous operation to update the blob's metadata.

ICancellableAsyncResult BeginSetMetadata(AsyncCallback callback, object state)

Parameters

callback AsyncCallback

An AsyncCallback delegate that will receive notification when the asynchronous operation completes.

state object

A user-defined object that will be passed to the callback delegate.

Returns

ICancellableAsyncResult

An ICancellableAsyncResult that references the asynchronous operation.

BeginSetProperties(AccessCondition, BlobRequestOptions, OperationContext, AsyncCallback, object)

Begins an asynchronous operation to update the blob's properties.

ICancellableAsyncResult BeginSetProperties(AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext, AsyncCallback callback, object state)

Parameters

accessCondition AccessCondition

An AccessCondition object that represents the condition that must be met in order for the request to proceed.

options BlobRequestOptions

A BlobRequestOptions object that specifies additional options for the request.

operationContext OperationContext

An OperationContext object that represents the context for the current operation.

callback AsyncCallback

An AsyncCallback delegate that will receive notification when the asynchronous operation completes.

state object

A user-defined object that will be passed to the callback delegate.

Returns

ICancellableAsyncResult

An ICancellableAsyncResult that references the asynchronous operation.

BeginSetProperties(AsyncCallback, object)

Begins an asynchronous operation to update the blob's properties.

ICancellableAsyncResult BeginSetProperties(AsyncCallback callback, object state)

Parameters

callback AsyncCallback

An AsyncCallback delegate that will receive notification when the asynchronous operation completes.

state object

A user-defined object that will be passed to the callback delegate.

Returns

ICancellableAsyncResult

An ICancellableAsyncResult that references the asynchronous operation.

BeginUploadFromByteArray(byte[], int, int, AccessCondition, BlobRequestOptions, OperationContext, AsyncCallback, object)

Begins an asynchronous operation to upload the contents of a byte array to a blob.

ICancellableAsyncResult BeginUploadFromByteArray(byte[] buffer, int index, int count, AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext, AsyncCallback callback, object state)

Parameters

buffer byte[]

An array of bytes.

index int

The zero-based byte offset in buffer at which to begin uploading bytes to the blob.

count int

The number of bytes to be written to the blob.

accessCondition AccessCondition

An AccessCondition object that represents the condition that must be met in order for the request to proceed.

options BlobRequestOptions

A BlobRequestOptions object that specifies additional options for the request.

operationContext OperationContext

An OperationContext object that represents the context for the current operation.

callback AsyncCallback

An AsyncCallback delegate that will receive notification when the asynchronous operation completes.

state object

A user-defined object that will be passed to the callback delegate.

Returns

ICancellableAsyncResult

An ICancellableAsyncResult that references the asynchronous operation.

BeginUploadFromByteArray(byte[], int, int, AsyncCallback, object)

Begins an asynchronous operation to upload the contents of a byte array to a blob.

ICancellableAsyncResult BeginUploadFromByteArray(byte[] buffer, int index, int count, AsyncCallback callback, object state)

Parameters

buffer byte[]

An array of bytes.

index int

The zero-based byte offset in buffer at which to begin uploading bytes to the blob.

count int

The number of bytes to be written to the blob.

callback AsyncCallback

An AsyncCallback delegate that will receive notification when the asynchronous operation completes.

state object

A user-defined object that will be passed to the callback delegate.

Returns

ICancellableAsyncResult

An ICancellableAsyncResult that references the asynchronous operation.

BeginUploadFromFile(string, AccessCondition, BlobRequestOptions, OperationContext, AsyncCallback, object)

Begins an asynchronous operation to upload a file to a blob.

ICancellableAsyncResult BeginUploadFromFile(string path, AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext, AsyncCallback callback, object state)

Parameters

path string

A string containing the file path providing the blob content.

accessCondition AccessCondition

An AccessCondition object that represents the condition that must be met in order for the request to proceed.

options BlobRequestOptions

A BlobRequestOptions object that specifies additional options for the request.

operationContext OperationContext

An OperationContext object that represents the context for the current operation.

callback AsyncCallback

An AsyncCallback delegate that will receive notification when the asynchronous operation completes.

state object

A user-defined object that will be passed to the callback delegate.

Returns

ICancellableAsyncResult

An ICancellableAsyncResult that references the asynchronous operation.

BeginUploadFromFile(string, AsyncCallback, object)

Begins an asynchronous operation to upload a file to a blob.

ICancellableAsyncResult BeginUploadFromFile(string path, AsyncCallback callback, object state)

Parameters

path string

A string containing the file path providing the blob content.

callback AsyncCallback

An AsyncCallback delegate that will receive notification when the asynchronous operation completes.

state object

A user-defined object that will be passed to the callback delegate.

Returns

ICancellableAsyncResult

An ICancellableAsyncResult that references the asynchronous operation.

BeginUploadFromStream(Stream, AccessCondition, BlobRequestOptions, OperationContext, AsyncCallback, object)

Begins an asynchronous operation to upload a stream to a blob.

ICancellableAsyncResult BeginUploadFromStream(Stream source, AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext, AsyncCallback callback, object state)

Parameters

source Stream

A Stream object providing the blob content.

accessCondition AccessCondition

An AccessCondition object that represents the condition that must be met in order for the request to proceed.

options BlobRequestOptions

A BlobRequestOptions object that specifies additional options for the request.

operationContext OperationContext

An OperationContext object that represents the context for the current operation.

callback AsyncCallback

An AsyncCallback delegate that will receive notification when the asynchronous operation completes.

state object

A user-defined object that will be passed to the callback delegate.

Returns

ICancellableAsyncResult

An ICancellableAsyncResult that references the asynchronous operation.

BeginUploadFromStream(Stream, AsyncCallback, object)

Begins an asynchronous operation to upload a stream to a blob.

ICancellableAsyncResult BeginUploadFromStream(Stream source, AsyncCallback callback, object state)

Parameters

source Stream

A Stream object providing the blob content.

callback AsyncCallback

An AsyncCallback delegate that will receive notification when the asynchronous operation completes.

state object

A user-defined object that will be passed to the callback delegate.

Returns

ICancellableAsyncResult

An ICancellableAsyncResult that references the asynchronous operation.

BeginUploadFromStream(Stream, long, AccessCondition, BlobRequestOptions, OperationContext, AsyncCallback, object)

Begins an asynchronous operation to upload a stream to a blob.

ICancellableAsyncResult BeginUploadFromStream(Stream source, long length, AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext, AsyncCallback callback, object state)

Parameters

source Stream

A Stream object providing the blob content.

length long

The number of bytes to write from the source stream at its current position.

accessCondition AccessCondition

An AccessCondition object that represents the condition that must be met in order for the request to proceed. If null, no condition is used.

options BlobRequestOptions

A BlobRequestOptions object that specifies additional options for the request.

operationContext OperationContext

An OperationContext object that represents the context for the current operation.

callback AsyncCallback

An AsyncCallback delegate that will receive notification when the asynchronous operation completes.

state object

A user-defined object that will be passed to the callback delegate.

Returns

ICancellableAsyncResult

An ICancellableAsyncResult that references the asynchronous operation.

BeginUploadFromStream(Stream, long, AsyncCallback, object)

Begins an asynchronous operation to upload a stream to a block blob.

ICancellableAsyncResult BeginUploadFromStream(Stream source, long length, AsyncCallback callback, object state)

Parameters

source Stream

A Stream object providing the blob content.

length long

The number of bytes to write from the source stream at its current position.

callback AsyncCallback

An AsyncCallback delegate that will receive notification when the asynchronous operation completes.

state object

A user-defined object that will be passed to the callback delegate.

Returns

ICancellableAsyncResult

An ICancellableAsyncResult that references the asynchronous operation.

BreakLease(TimeSpan?, AccessCondition, BlobRequestOptions, OperationContext)

Breaks the current lease on this blob.

TimeSpan BreakLease(TimeSpan? breakPeriod = null, AccessCondition accessCondition = null, BlobRequestOptions options = null, OperationContext operationContext = null)

Parameters

breakPeriod TimeSpan?

A TimeSpan representing the amount of time to allow the lease to remain, which will be rounded down to seconds.

accessCondition AccessCondition

An AccessCondition object that represents the condition that must be met in order for the request to proceed.

options BlobRequestOptions

A BlobRequestOptions object that specifies additional options for the request. If null, default options are applied to the request.

operationContext OperationContext

An OperationContext object that represents the context for the current operation.

Returns

TimeSpan

A TimeSpan representing the amount of time before the lease ends, to the second.

BreakLeaseAsync(TimeSpan?)

Initiates an asynchronous operation to break the current lease on this blob.

Task<TimeSpan> BreakLeaseAsync(TimeSpan? breakPeriod)

Parameters

breakPeriod TimeSpan?

A TimeSpan representing the amount of time to allow the lease to remain, which will be rounded down to seconds.

Returns

Task<TimeSpan>

A Task object of type TimeSpan that represents the asynchronous operation.

BreakLeaseAsync(TimeSpan?, AccessCondition, BlobRequestOptions, OperationContext)

Initiates an asynchronous operation to break the current lease on this blob.

Task<TimeSpan> BreakLeaseAsync(TimeSpan? breakPeriod, AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext)

Parameters

breakPeriod TimeSpan?

A TimeSpan representing the amount of time to allow the lease to remain, which will be rounded down to seconds.

accessCondition AccessCondition

An AccessCondition object that represents the condition that must be met in order for the request to proceed.

options BlobRequestOptions

A BlobRequestOptions object that specifies additional options for the request.

operationContext OperationContext

An OperationContext object that represents the context for the current operation.

Returns

Task<TimeSpan>

A Task object of type TimeSpan that represents the asynchronous operation.

BreakLeaseAsync(TimeSpan?, AccessCondition, BlobRequestOptions, OperationContext, CancellationToken)

Initiates an asynchronous operation to break the current lease on this blob.

Task<TimeSpan> BreakLeaseAsync(TimeSpan? breakPeriod, AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext, CancellationToken cancellationToken)

Parameters

breakPeriod TimeSpan?

A TimeSpan representing the amount of time to allow the lease to remain, which will be rounded down to seconds.

accessCondition AccessCondition

An AccessCondition object that represents the condition that must be met in order for the request to proceed.

options BlobRequestOptions

A BlobRequestOptions object that specifies additional options for the request.

operationContext OperationContext

An OperationContext object that represents the context for the current operation.

cancellationToken CancellationToken

A CancellationToken to observe while waiting for a task to complete.

Returns

Task<TimeSpan>

A Task object of type TimeSpan that represents the asynchronous operation.

BreakLeaseAsync(TimeSpan?, CancellationToken)

Initiates an asynchronous operation to break the current lease on this blob.

Task<TimeSpan> BreakLeaseAsync(TimeSpan? breakPeriod, CancellationToken cancellationToken)

Parameters

breakPeriod TimeSpan?

A TimeSpan representing the amount of time to allow the lease to remain, which will be rounded down to seconds.

cancellationToken CancellationToken

A CancellationToken to observe while waiting for a task to complete.

Returns

Task<TimeSpan>

A Task object of type TimeSpan that represents the asynchronous operation.

ChangeLease(string, AccessCondition, BlobRequestOptions, OperationContext)

Changes the lease ID on this blob.

string ChangeLease(string proposedLeaseId, AccessCondition accessCondition, BlobRequestOptions options = null, OperationContext operationContext = null)

Parameters

proposedLeaseId string

A string representing the proposed lease ID for the new lease.

accessCondition AccessCondition

An AccessCondition object that represents the condition that must be met in order for the request to proceed, including a required lease ID.

options BlobRequestOptions

A BlobRequestOptions object that specifies additional options for the request. If null, default options are applied to the request.

operationContext OperationContext

An OperationContext object that represents the context for the current operation.

Returns

string

The new lease ID.

ChangeLeaseAsync(string, AccessCondition)

Initiates an asynchronous operation to change the lease on this blob.

Task<string> ChangeLeaseAsync(string proposedLeaseId, AccessCondition accessCondition)

Parameters

proposedLeaseId string

A string representing the proposed lease ID for the new lease.

accessCondition AccessCondition

An AccessCondition object that represents the condition that must be met in order for the request to proceed, including a required lease ID.

Returns

Task<string>

A Task object of type string that represents the asynchronous operation.

ChangeLeaseAsync(string, AccessCondition, BlobRequestOptions, OperationContext)

Initiates an asynchronous operation to change the lease on this blob.

Task<string> ChangeLeaseAsync(string proposedLeaseId, AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext)

Parameters

proposedLeaseId string

A string representing the proposed lease ID for the new lease.

accessCondition AccessCondition

An AccessCondition object that represents the condition that must be met in order for the request to proceed, including a required lease ID.

options BlobRequestOptions

A BlobRequestOptions object that specifies additional options for the request.

operationContext OperationContext

An OperationContext object that represents the context for the current operation.

Returns

Task<string>

A Task object of type string that represents the asynchronous operation.

ChangeLeaseAsync(string, AccessCondition, BlobRequestOptions, OperationContext, CancellationToken)

Initiates an asynchronous operation to change the lease on this blob.

Task<string> ChangeLeaseAsync(string proposedLeaseId, AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext, CancellationToken cancellationToken)

Parameters

proposedLeaseId string

A string representing the proposed lease ID for the new lease.

accessCondition AccessCondition

An AccessCondition object that represents the condition that must be met in order for the request to proceed, including a required lease ID.

options BlobRequestOptions

A BlobRequestOptions object that specifies additional options for the request.

operationContext OperationContext

An OperationContext object that represents the context for the current operation.

cancellationToken CancellationToken

A CancellationToken to observe while waiting for a task to complete.

Returns

Task<string>

A Task object of type string that represents the asynchronous operation.

ChangeLeaseAsync(string, AccessCondition, CancellationToken)

Initiates an asynchronous operation to change the lease on this blob.

Task<string> ChangeLeaseAsync(string proposedLeaseId, AccessCondition accessCondition, CancellationToken cancellationToken)

Parameters

proposedLeaseId string

A string representing the proposed lease ID for the new lease.

accessCondition AccessCondition

An AccessCondition object that represents the condition that must be met in order for the request to proceed, including a required lease ID.

cancellationToken CancellationToken

A CancellationToken to observe while waiting for a task to complete.

Returns

Task<string>

A Task object of type string that represents the asynchronous operation.

Delete(DeleteSnapshotsOption, AccessCondition, BlobRequestOptions, OperationContext)

Deletes the blob.

void Delete(DeleteSnapshotsOption deleteSnapshotsOption = DeleteSnapshotsOption.None, AccessCondition accessCondition = null, BlobRequestOptions options = null, OperationContext operationContext = null)

Parameters

deleteSnapshotsOption DeleteSnapshotsOption

A DeleteSnapshotsOption object indicating whether to only delete the blob, to delete the blob and all snapshots, or to only delete the snapshots.

accessCondition AccessCondition

An AccessCondition object that represents the condition that must be met in order for the request to proceed.

options BlobRequestOptions

A BlobRequestOptions object that specifies additional options for the request. If null, default options are applied to the request.

operationContext OperationContext

An OperationContext object that represents the context for the current operation.

DeleteAsync()

Initiates an asynchronous operation to delete the blob.

Task DeleteAsync()

Returns

Task

A Task object that represents the asynchronous operation.

DeleteAsync(DeleteSnapshotsOption, AccessCondition, BlobRequestOptions, OperationContext)

Initiates an asynchronous operation to delete the blob.

Task DeleteAsync(DeleteSnapshotsOption deleteSnapshotsOption, AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext)

Parameters

deleteSnapshotsOption DeleteSnapshotsOption

A DeleteSnapshotsOption object indicating whether to only delete the blob, to delete the blob and all snapshots, or to only delete the snapshots.

accessCondition AccessCondition

An AccessCondition object that represents the condition that must be met in order for the request to proceed.

options BlobRequestOptions

A BlobRequestOptions object that specifies additional options for the request.

operationContext OperationContext

An OperationContext object that represents the context for the current operation.

Returns

Task

A Task object that represents the asynchronous operation.

DeleteAsync(DeleteSnapshotsOption, AccessCondition, BlobRequestOptions, OperationContext, CancellationToken)

Initiates an asynchronous operation to delete the blob.

Task DeleteAsync(DeleteSnapshotsOption deleteSnapshotsOption, AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext, CancellationToken cancellationToken)

Parameters

deleteSnapshotsOption DeleteSnapshotsOption

A DeleteSnapshotsOption object indicating whether to only delete the blob, to delete the blob and all snapshots, or to only delete the snapshots.

accessCondition AccessCondition

An AccessCondition object that represents the condition that must be met in order for the request to proceed.

options BlobRequestOptions

A BlobRequestOptions object that specifies additional options for the request.

operationContext OperationContext

An OperationContext object that represents the context for the current operation.

cancellationToken CancellationToken

A CancellationToken to observe while waiting for a task to complete.

Returns

Task

A Task object that represents the asynchronous operation.

DeleteAsync(CancellationToken)

Initiates an asynchronous operation to delete the blob.

Task DeleteAsync(CancellationToken cancellationToken)

Parameters

cancellationToken CancellationToken

A CancellationToken to observe while waiting for a task to complete.

Returns

Task

A Task object that represents the asynchronous operation.

DeleteIfExists(DeleteSnapshotsOption, AccessCondition, BlobRequestOptions, OperationContext)

Deletes the blob if it already exists.

bool DeleteIfExists(DeleteSnapshotsOption deleteSnapshotsOption = DeleteSnapshotsOption.None, AccessCondition accessCondition = null, BlobRequestOptions options = null, OperationContext operationContext = null)

Parameters

deleteSnapshotsOption DeleteSnapshotsOption

A DeleteSnapshotsOption object indicating whether to only delete the blob, to delete the blob and all snapshots, or to only delete the snapshots.

accessCondition AccessCondition

An AccessCondition object that represents the condition that must be met in order for the request to proceed.

options BlobRequestOptions

A BlobRequestOptions object that specifies additional options for the request. If null, default options are applied to the request.

operationContext OperationContext

An OperationContext object that represents the context for the current operation.

Returns

bool

true if the blob did not already exist and was created; otherwise false.

DeleteIfExistsAsync()

Initiates an asynchronous operation to delete the blob if it already exists.

Task<bool> DeleteIfExistsAsync()

Returns

Task<bool>

A Task object of type bool that represents the asynchronous operation.

DeleteIfExistsAsync(DeleteSnapshotsOption, AccessCondition, BlobRequestOptions, OperationContext)

Initiates an asynchronous operation to delete the blob if it already exists.

Task<bool> DeleteIfExistsAsync(DeleteSnapshotsOption deleteSnapshotsOption, AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext)

Parameters

deleteSnapshotsOption DeleteSnapshotsOption

A DeleteSnapshotsOption object indicating whether to only delete the blob, to delete the blob and all snapshots, or to only delete the snapshots.

accessCondition AccessCondition

An AccessCondition object that represents the condition that must be met in order for the request to proceed.

options BlobRequestOptions

A BlobRequestOptions object that specifies additional options for the request.

operationContext OperationContext

An OperationContext object that represents the context for the current operation.

Returns

Task<bool>

A Task object of type bool that represents the asynchronous operation.

DeleteIfExistsAsync(DeleteSnapshotsOption, AccessCondition, BlobRequestOptions, OperationContext, CancellationToken)

Initiates an asynchronous operation to delete the blob if it already exists.

Task<bool> DeleteIfExistsAsync(DeleteSnapshotsOption deleteSnapshotsOption, AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext, CancellationToken cancellationToken)

Parameters

deleteSnapshotsOption DeleteSnapshotsOption

A DeleteSnapshotsOption object indicating whether to only delete the blob, to delete the blob and all snapshots, or to only delete the snapshots.

accessCondition AccessCondition

An AccessCondition object that represents the condition that must be met in order for the request to proceed.

options BlobRequestOptions

A BlobRequestOptions object that specifies additional options for the request.

operationContext OperationContext

An OperationContext object that represents the context for the current operation.

cancellationToken CancellationToken

A CancellationToken to observe while waiting for a task to complete.

Returns

Task<bool>

A Task object of type bool that represents the asynchronous operation.

DeleteIfExistsAsync(CancellationToken)

Initiates an asynchronous operation to delete the blob if it already exists.

Task<bool> DeleteIfExistsAsync(CancellationToken cancellationToken)

Parameters

cancellationToken CancellationToken

A CancellationToken to observe while waiting for a task to complete.

Returns

Task<bool>

A Task object of type bool that represents the asynchronous operation.

DownloadRangeToByteArray(byte[], int, long?, long?, AccessCondition, BlobRequestOptions, OperationContext)

Downloads a range of bytes from a blob to a byte array.

int DownloadRangeToByteArray(byte[] target, int index, long? blobOffset, long? length, AccessCondition accessCondition = null, BlobRequestOptions options = null, OperationContext operationContext = null)

Parameters

target byte[]

The target byte array.

index int

The starting offset in the byte array.

blobOffset long?

The starting offset of the data range, in bytes.

length long?

The length of the data range, in bytes.

accessCondition AccessCondition

An AccessCondition object that represents the condition that must be met in order for the request to proceed.

options BlobRequestOptions

A BlobRequestOptions object that specifies additional options for the request. If null, default options are applied to the request.

operationContext OperationContext

An OperationContext object that represents the context for the current operation.

Returns

int

The total number of bytes read into the buffer.

DownloadRangeToByteArrayAsync(byte[], int, long?, long?)

Initiates an asynchronous operation to download a range of bytes from a blob to a byte array.

Task<int> DownloadRangeToByteArrayAsync(byte[] target, int index, long? blobOffset, long? length)

Parameters

target byte[]

The target byte array.

index int

The starting offset in the byte array.

blobOffset long?

The starting offset of the data range, in bytes.

length long?

The length of the data range, in bytes.

Returns

Task<int>

A Task object of type int that represents the asynchronous operation.

DownloadRangeToByteArrayAsync(byte[], int, long?, long?, AccessCondition, BlobRequestOptions, OperationContext)

Initiates an asynchronous operation to download a range of bytes from a blob to a byte array.

Task<int> DownloadRangeToByteArrayAsync(byte[] target, int index, long? blobOffset, long? length, AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext)

Parameters

target byte[]

The target byte array.

index int

The starting offset in the byte array.

blobOffset long?

The starting offset of the data range, in bytes.

length long?

The length of the data range, in bytes.

accessCondition AccessCondition

An AccessCondition object that represents the condition that must be met in order for the request to proceed.

options BlobRequestOptions

A BlobRequestOptions object that specifies additional options for the request.

operationContext OperationContext

An OperationContext object that represents the context for the current operation.

Returns

Task<int>

A Task object of type int that represents the asynchronous operation.

DownloadRangeToByteArrayAsync(byte[], int, long?, long?, AccessCondition, BlobRequestOptions, OperationContext, CancellationToken)

Initiates an asynchronous operation to download a range of bytes from a blob to a byte array.

Task<int> DownloadRangeToByteArrayAsync(byte[] target, int index, long? blobOffset, long? length, AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext, CancellationToken cancellationToken)

Parameters

target byte[]

The target byte array.

index int

The starting offset in the byte array.

blobOffset long?

The starting offset of the data range, in bytes.

length long?

The length of the data range, in bytes.

accessCondition AccessCondition

An AccessCondition object that represents the condition that must be met in order for the request to proceed.

options BlobRequestOptions

A BlobRequestOptions object that specifies additional options for the request.

operationContext OperationContext

An OperationContext object that represents the context for the current operation.

cancellationToken CancellationToken

A CancellationToken to observe while waiting for a task to complete.

Returns

Task<int>

A Task object of type int that represents the asynchronous operation.

DownloadRangeToByteArrayAsync(byte[], int, long?, long?, CancellationToken)

Initiates an asynchronous operation to download a range of bytes from a blob to a byte array.

Task<int> DownloadRangeToByteArrayAsync(byte[] target, int index, long? blobOffset, long? length, CancellationToken cancellationToken)

Parameters

target byte[]

The target byte array.

index int

The starting offset in the byte array.

blobOffset long?

The starting offset of the data range, in bytes.

length long?

The length of the data range, in bytes.

cancellationToken CancellationToken

A CancellationToken to observe while waiting for a task to complete.

Returns

Task<int>

A Task object of type int that represents the asynchronous operation.

DownloadRangeToStream(Stream, long?, long?, AccessCondition, BlobRequestOptions, OperationContext)

Downloads a range of bytes from a blob to a stream.

void DownloadRangeToStream(Stream target, long? offset, long? length, AccessCondition accessCondition = null, BlobRequestOptions options = null, OperationContext operationContext = null)

Parameters

target Stream

A Stream object representing the target stream.

offset long?

The starting offset of the data range, in bytes.

length long?

The length of the data range, in bytes.

accessCondition AccessCondition

An AccessCondition object that represents the condition that must be met in order for the request to proceed.

options BlobRequestOptions

A BlobRequestOptions object that specifies additional options for the request. If null, default options are applied to the request.

operationContext OperationContext

An OperationContext object that represents the context for the current operation.

DownloadRangeToStreamAsync(Stream, long?, long?)

Initiates an asynchronous operation to download a range of bytes from a blob to a stream.

Task DownloadRangeToStreamAsync(Stream target, long? offset, long? length)

Parameters

target Stream

A Stream object representing the target stream.

offset long?

The starting offset of the data range, in bytes.

length long?

The length of the data range, in bytes.

Returns

Task

A Task object that represents the asynchronous operation.

DownloadRangeToStreamAsync(Stream, long?, long?, AccessCondition, BlobRequestOptions, OperationContext)

Initiates an asynchronous operation to download a range of bytes from a blob to a stream.

Task DownloadRangeToStreamAsync(Stream target, long? offset, long? length, AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext)

Parameters

target Stream

A Stream object representing the target stream.

offset long?

The starting offset of the data range, in bytes.

length long?

The length of the data range, in bytes.

accessCondition AccessCondition

An AccessCondition object that represents the condition that must be met in order for the request to proceed.

options BlobRequestOptions

A BlobRequestOptions object that specifies additional options for the request.

operationContext OperationContext

An OperationContext object that represents the context for the current operation.

Returns

Task

A Task object that represents the asynchronous operation.

DownloadRangeToStreamAsync(Stream, long?, long?, AccessCondition, BlobRequestOptions, OperationContext, CancellationToken)

Initiates an asynchronous operation to download a range of bytes from a blob to a stream.

Task DownloadRangeToStreamAsync(Stream target, long? offset, long? length, AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext, CancellationToken cancellationToken)

Parameters

target Stream

A Stream object representing the target stream.

offset long?

The starting offset of the data range, in bytes.

length long?

The length of the data range, in bytes.

accessCondition AccessCondition

An AccessCondition object that represents the condition that must be met in order for the request to proceed.

options BlobRequestOptions

A BlobRequestOptions object that specifies additional options for the request.

operationContext OperationContext

An OperationContext object that represents the context for the current operation.

cancellationToken CancellationToken

A CancellationToken to observe while waiting for a task to complete.

Returns

Task

A Task object that represents the asynchronous operation.

DownloadRangeToStreamAsync(Stream, long?, long?, CancellationToken)

Initiates an asynchronous operation to download a range of bytes from a blob to a stream.

Task DownloadRangeToStreamAsync(Stream target, long? offset, long? length, CancellationToken cancellationToken)

Parameters

target Stream

A Stream object representing the target stream.

offset long?

The starting offset of the data range, in bytes.

length long?

The length of the data range, in bytes.

cancellationToken CancellationToken

A CancellationToken to observe while waiting for a task to complete.

Returns

Task

A Task object that represents the asynchronous operation.

DownloadToByteArray(byte[], int, AccessCondition, BlobRequestOptions, OperationContext)

Downloads the contents of a blob to a byte array.

int DownloadToByteArray(byte[] target, int index, AccessCondition accessCondition = null, BlobRequestOptions options = null, OperationContext operationContext = null)

Parameters

target byte[]

The target byte array.

index int

The starting offset in the byte array.

accessCondition AccessCondition

An AccessCondition object that represents the condition that must be met in order for the request to proceed.

options BlobRequestOptions

A BlobRequestOptions object that specifies additional options for the request. If null, default options are applied to the request.

operationContext OperationContext

An OperationContext object that represents the context for the current operation.

Returns

int

The total number of bytes read into the buffer.

DownloadToByteArrayAsync(byte[], int)

Initiates an asynchronous operation to download the contents of a blob to a byte array.

Task<int> DownloadToByteArrayAsync(byte[] target, int index)

Parameters

target byte[]

The target byte array.

index int

The starting offset in the byte array.

Returns

Task<int>

A Task object of type int that represents the asynchronous operation.

DownloadToByteArrayAsync(byte[], int, AccessCondition, BlobRequestOptions, OperationContext)

Initiates an asynchronous operation to download the contents of a blob to a byte array.

Task<int> DownloadToByteArrayAsync(byte[] target, int index, AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext)

Parameters

target byte[]

The target byte array.

index int

The starting offset in the byte array.

accessCondition AccessCondition

An AccessCondition object that represents the condition that must be met in order for the request to proceed.

options BlobRequestOptions

A BlobRequestOptions object that specifies additional options for the request.

operationContext OperationContext

An OperationContext object that represents the context for the current operation.

Returns

Task<int>

A Task object of type int that represents the asynchronous operation.

DownloadToByteArrayAsync(byte[], int, AccessCondition, BlobRequestOptions, OperationContext, CancellationToken)

Initiates an asynchronous operation to download the contents of a blob to a byte array.

Task<int> DownloadToByteArrayAsync(byte[] target, int index, AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext, CancellationToken cancellationToken)

Parameters

target byte[]

The target byte array.

index int

The starting offset in the byte array.

accessCondition AccessCondition

An AccessCondition object that represents the condition that must be met in order for the request to proceed.

options BlobRequestOptions

A BlobRequestOptions object that specifies additional options for the request.

operationContext OperationContext

An OperationContext object that represents the context for the current operation.

cancellationToken CancellationToken

A CancellationToken to observe while waiting for a task to complete.

Returns

Task<int>

A Task object of type int that represents the asynchronous operation.

DownloadToByteArrayAsync(byte[], int, CancellationToken)

Initiates an asynchronous operation to download the contents of a blob to a byte array.

Task<int> DownloadToByteArrayAsync(byte[] target, int index, CancellationToken cancellationToken)

Parameters

target byte[]

The target byte array.

index int

The starting offset in the byte array.

cancellationToken CancellationToken

A CancellationToken to observe while waiting for a task to complete.

Returns

Task<int>

A Task object of type int that represents the asynchronous operation.

DownloadToFile(string, FileMode, AccessCondition, BlobRequestOptions, OperationContext)

Downloads the contents of a blob to a file.

void DownloadToFile(string path, FileMode mode, AccessCondition accessCondition = null, BlobRequestOptions options = null, OperationContext operationContext = null)

Parameters

path string

A string containing the path to the target file.

mode FileMode

A FileMode enumeration value that determines how to open or create the file.

accessCondition AccessCondition

An AccessCondition object that represents the condition that must be met in order for the request to proceed.

options BlobRequestOptions

A BlobRequestOptions object that specifies additional options for the request. If null, default options are applied to the request.

operationContext OperationContext

An OperationContext object that represents the context for the current operation.

DownloadToFileAsync(string, FileMode)

Initiates an asynchronous operation to download the contents of a blob to a file.

Task DownloadToFileAsync(string path, FileMode mode)

Parameters

path string

A string containing the path to the target file.

mode FileMode

A FileMode enumeration value that determines how to open or create the file.

Returns

Task

A Task object that represents the asynchronous operation.

DownloadToFileAsync(string, FileMode, AccessCondition, BlobRequestOptions, OperationContext)

Initiates an asynchronous operation to download the contents of a blob to a file.

Task DownloadToFileAsync(string path, FileMode mode, AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext)

Parameters

path string

A string containing the path to the target file.

mode FileMode

A FileMode enumeration value that determines how to open or create the file.

accessCondition AccessCondition

An AccessCondition object that represents the condition that must be met in order for the request to proceed.

options BlobRequestOptions

A BlobRequestOptions object that specifies additional options for the request.

operationContext OperationContext

An OperationContext object that represents the context for the current operation.

Returns

Task

A Task object that represents the asynchronous operation.

DownloadToFileAsync(string, FileMode, AccessCondition, BlobRequestOptions, OperationContext, CancellationToken)

Initiates an asynchronous operation to download the contents of a blob to a file.

Task DownloadToFileAsync(string path, FileMode mode, AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext, CancellationToken cancellationToken)

Parameters

path string

A string containing the path to the target file.

mode FileMode

A FileMode enumeration value that determines how to open or create the file.

accessCondition AccessCondition

An AccessCondition object that represents the condition that must be met in order for the request to proceed.

options BlobRequestOptions

A BlobRequestOptions object that specifies additional options for the request.

operationContext OperationContext

An OperationContext object that represents the context for the current operation.

cancellationToken CancellationToken

A CancellationToken to observe while waiting for a task to complete.

Returns

Task

A Task object that represents the asynchronous operation.

DownloadToFileAsync(string, FileMode, CancellationToken)

Initiates an asynchronous operation to download the contents of a blob to a file.

Task DownloadToFileAsync(string path, FileMode mode, CancellationToken cancellationToken)

Parameters

path string

A string containing the path to the target file.

mode FileMode

A FileMode enumeration value that determines how to open or create the file.

cancellationToken CancellationToken

A CancellationToken to observe while waiting for a task to complete.

Returns

Task

A Task object that represents the asynchronous operation.

DownloadToStream(Stream, AccessCondition, BlobRequestOptions, OperationContext)

Downloads the contents of a blob to a stream.

void DownloadToStream(Stream target, AccessCondition accessCondition = null, BlobRequestOptions options = null, OperationContext operationContext = null)

Parameters

target Stream

A Stream object representing the target stream.

accessCondition AccessCondition

An AccessCondition object that represents the condition that must be met in order for the request to proceed.

options BlobRequestOptions

A BlobRequestOptions object that specifies additional options for the request. If null, default options are applied to the request.

operationContext OperationContext

An OperationContext object that represents the context for the current operation.

DownloadToStreamAsync(Stream)

Initiates an asynchronous operation to download the contents of a blob to a stream.

Task DownloadToStreamAsync(Stream target)

Parameters

target Stream

A Stream object representing the target stream.

Returns

Task

A Task object that represents the asynchronous operation.

DownloadToStreamAsync(Stream, AccessCondition, BlobRequestOptions, OperationContext)

Initiates an asynchronous operation to download the contents of a blob to a stream.

Task DownloadToStreamAsync(Stream target, AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext)

Parameters

target Stream

A Stream object representing the target stream.

accessCondition AccessCondition

An AccessCondition object that represents the condition that must be met in order for the request to proceed.

options BlobRequestOptions

A BlobRequestOptions object that specifies additional options for the request.

operationContext OperationContext

An OperationContext object that represents the context for the current operation.

Returns

Task

A Task object that represents the asynchronous operation.

DownloadToStreamAsync(Stream, AccessCondition, BlobRequestOptions, OperationContext, CancellationToken)

Initiates an asynchronous operation to download the contents of a blob to a stream.

Task DownloadToStreamAsync(Stream target, AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext, CancellationToken cancellationToken)

Parameters

target Stream

A Stream object representing the target stream.

accessCondition AccessCondition

An AccessCondition object that represents the condition that must be met in order for the request to proceed.

options BlobRequestOptions

A BlobRequestOptions object that specifies additional options for the request.

operationContext OperationContext

An OperationContext object that represents the context for the current operation.

cancellationToken CancellationToken

A CancellationToken to observe while waiting for a task to complete.

Returns

Task

A Task object that represents the asynchronous operation.

DownloadToStreamAsync(Stream, CancellationToken)

Initiates an asynchronous operation to download the contents of a blob to a stream.

Task DownloadToStreamAsync(Stream target, CancellationToken cancellationToken)

Parameters

target Stream

A Stream object representing the target stream.

cancellationToken CancellationToken

A CancellationToken to observe while waiting for a task to complete.

Returns

Task

A Task object that represents the asynchronous operation.

EndAbortCopy(IAsyncResult)

Ends an asynchronous operation to abort an ongoing blob copy operation.

void EndAbortCopy(IAsyncResult asyncResult)

Parameters

asyncResult IAsyncResult

An IAsyncResult that references the pending asynchronous operation.

EndAcquireLease(IAsyncResult)

Ends an asynchronous operation to acquire a lease on this blob.

string EndAcquireLease(IAsyncResult asyncResult)

Parameters

asyncResult IAsyncResult

An IAsyncResult that references the pending asynchronous operation.

Returns

string

The ID of the acquired lease.

EndBreakLease(IAsyncResult)

Ends an asynchronous operation to break the current lease on this blob.

TimeSpan EndBreakLease(IAsyncResult asyncResult)

Parameters

asyncResult IAsyncResult

An IAsyncResult that references the pending asynchronous operation.

Returns

TimeSpan

A TimeSpan representing the amount of time before the lease ends, to the second.

EndChangeLease(IAsyncResult)

Ends an asynchronous operation to change the lease on this blob.

string EndChangeLease(IAsyncResult asyncResult)

Parameters

asyncResult IAsyncResult

An IAsyncResult that references the pending asynchronous operation.

Returns

string

The new lease ID.

EndDelete(IAsyncResult)

Ends an asynchronous operation to delete the blob.

void EndDelete(IAsyncResult asyncResult)

Parameters

asyncResult IAsyncResult

An IAsyncResult that references the pending asynchronous operation.

EndDeleteIfExists(IAsyncResult)

Returns the result of an asynchronous request to delete the blob if it already exists.

bool EndDeleteIfExists(IAsyncResult asyncResult)

Parameters

asyncResult IAsyncResult

An IAsyncResult that references the pending asynchronous operation.

Returns

bool

true if the blob did not already exist and was created; otherwise, false.

EndDownloadRangeToByteArray(IAsyncResult)

Ends an asynchronous operation to download a range of bytes from a blob to a byte array.

int EndDownloadRangeToByteArray(IAsyncResult asyncResult)

Parameters

asyncResult IAsyncResult

An IAsyncResult that references the pending asynchronous operation.

Returns

int

The total number of bytes read into the buffer.

EndDownloadRangeToStream(IAsyncResult)

Ends an asynchronous operation to download a range of bytes from a blob to a stream.

void EndDownloadRangeToStream(IAsyncResult asyncResult)

Parameters

asyncResult IAsyncResult

An IAsyncResult that references the pending asynchronous operation.

EndDownloadToByteArray(IAsyncResult)

Ends an asynchronous operation to download the contents of a blob to a byte array.

int EndDownloadToByteArray(IAsyncResult asyncResult)

Parameters

asyncResult IAsyncResult

An IAsyncResult that references the pending asynchronous operation.

Returns

int

The total number of bytes read into the buffer.

EndDownloadToFile(IAsyncResult)

Ends an asynchronous operation to download the contents of a blob to a file.

void EndDownloadToFile(IAsyncResult asyncResult)

Parameters

asyncResult IAsyncResult

An IAsyncResult that references the pending asynchronous operation.

EndDownloadToStream(IAsyncResult)

Ends an asynchronous operation to download the contents of a blob to a stream.

void EndDownloadToStream(IAsyncResult asyncResult)

Parameters

asyncResult IAsyncResult

An IAsyncResult that references the pending asynchronous operation.

EndExists(IAsyncResult)

Returns the asynchronous result of the request to check existence of the blob.

bool EndExists(IAsyncResult asyncResult)

Parameters

asyncResult IAsyncResult

An IAsyncResult that references the pending asynchronous operation.

Returns

bool

true if the blob exists.

EndFetchAttributes(IAsyncResult)

Ends an asynchronous operation to populate the blob's properties and metadata.

void EndFetchAttributes(IAsyncResult asyncResult)

Parameters

asyncResult IAsyncResult

An IAsyncResult that references the pending asynchronous operation.

EndGetAccountProperties(IAsyncResult)

Ends an asynchronous operation to get properties for the account this blob resides on.

AccountProperties EndGetAccountProperties(IAsyncResult asyncResult)

Parameters

asyncResult IAsyncResult

An IAsyncResult that references the pending asynchronous operation.

Returns

AccountProperties

A AccountProperties object.

EndOpenRead(IAsyncResult)

Ends an asynchronous operation to open a stream for reading from the blob.

Stream EndOpenRead(IAsyncResult asyncResult)

Parameters

asyncResult IAsyncResult

An IAsyncResult that references the pending asynchronous operation.

Returns

Stream

A stream to be used for reading from the blob.

Remarks

On the Stream object returned by this method, the EndRead(IAsyncResult) method must be called exactly once for every BeginRead(byte[], int, int, AsyncCallback, object) call. Failing to end the read process before beginning another read process can cause unexpected behavior.

EndReleaseLease(IAsyncResult)

Ends an asynchronous operation to release the lease on this blob.

void EndReleaseLease(IAsyncResult asyncResult)

Parameters

asyncResult IAsyncResult

An IAsyncResult that references the pending asynchronous operation.

EndRenewLease(IAsyncResult)

Ends an asynchronous operation to renew a lease on this blob.

void EndRenewLease(IAsyncResult asyncResult)

Parameters

asyncResult IAsyncResult

An IAsyncResult that references the pending asynchronous operation.

EndSetMetadata(IAsyncResult)

Ends an asynchronous operation to update the blob's metadata.

void EndSetMetadata(IAsyncResult asyncResult)

Parameters

asyncResult IAsyncResult

An IAsyncResult that references the pending asynchronous operation.

EndSetProperties(IAsyncResult)

Ends an asynchronous operation to update the blob's properties.

void EndSetProperties(IAsyncResult asyncResult)

Parameters

asyncResult IAsyncResult

An IAsyncResult that references the pending asynchronous operation.

EndUploadFromByteArray(IAsyncResult)

Ends an asynchronous operation to upload the contents of a byte array to a blob.

void EndUploadFromByteArray(IAsyncResult asyncResult)

Parameters

asyncResult IAsyncResult

An IAsyncResult that references the pending asynchronous operation.

EndUploadFromFile(IAsyncResult)

Ends an asynchronous operation to upload a file to a blob.

void EndUploadFromFile(IAsyncResult asyncResult)

Parameters

asyncResult IAsyncResult

An IAsyncResult that references the pending asynchronous operation.

EndUploadFromStream(IAsyncResult)

Ends an asynchronous operation to upload a stream to a blob.

void EndUploadFromStream(IAsyncResult asyncResult)

Parameters

asyncResult IAsyncResult

An IAsyncResult that references the pending asynchronous operation.

Exists(BlobRequestOptions, OperationContext)

Checks existence of the blob.

bool Exists(BlobRequestOptions options = null, OperationContext operationContext = null)

Parameters

options BlobRequestOptions

A BlobRequestOptions object that specifies additional options for the request. If null, default options are applied to the request.

operationContext OperationContext

An OperationContext object that represents the context for the current operation.

Returns

bool

true if the blob exists.

ExistsAsync()

Initiates an asynchronous operation to check existence of the blob.

Task<bool> ExistsAsync()

Returns

Task<bool>

A Task object of type bool that represents the asynchronous operation.

ExistsAsync(BlobRequestOptions, OperationContext)

Initiates an asynchronous operation to check existence of the blob.

Task<bool> ExistsAsync(BlobRequestOptions options, OperationContext operationContext)

Parameters

options BlobRequestOptions

A BlobRequestOptions object that specifies additional options for the request.

operationContext OperationContext

An OperationContext object that represents the context for the current operation.

Returns

Task<bool>

A Task object of type bool that represents the asynchronous operation.

ExistsAsync(BlobRequestOptions, OperationContext, CancellationToken)

Initiates an asynchronous operation to check existence of the blob.

Task<bool> ExistsAsync(BlobRequestOptions options, OperationContext operationContext, CancellationToken cancellationToken)

Parameters

options BlobRequestOptions

A BlobRequestOptions object that specifies additional options for the request.

operationContext OperationContext

An OperationContext object that represents the context for the current operation.

cancellationToken CancellationToken

A CancellationToken to observe while waiting for a task to complete.

Returns

Task<bool>

A Task object of type bool that represents the asynchronous operation.

ExistsAsync(CancellationToken)

Initiates an asynchronous operation to check existence of the blob.

Task<bool> ExistsAsync(CancellationToken cancellationToken)

Parameters

cancellationToken CancellationToken

A CancellationToken to observe while waiting for a task to complete.

Returns

Task<bool>

A Task object of type bool that represents the asynchronous operation.

FetchAttributes(AccessCondition, BlobRequestOptions, OperationContext)

Populates a blob's properties and metadata.

void FetchAttributes(AccessCondition accessCondition = null, BlobRequestOptions options = null, OperationContext operationContext = null)

Parameters

accessCondition AccessCondition

An AccessCondition object that represents the condition that must be met in order for the request to proceed.

options BlobRequestOptions

A BlobRequestOptions object that specifies additional options for the request. If null, default options are applied to the request.

operationContext OperationContext

An OperationContext object that represents the context for the current operation.

FetchAttributesAsync()

Initiates an asynchronous operation to populate the blob's properties and metadata.

Task FetchAttributesAsync()

Returns

Task

A Task object that represents the asynchronous operation.

FetchAttributesAsync(AccessCondition, BlobRequestOptions, OperationContext)

Initiates an asynchronous operation to populate the blob's properties and metadata.

Task FetchAttributesAsync(AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext)

Parameters

accessCondition AccessCondition

An AccessCondition object that represents the condition that must be met in order for the request to proceed.

options BlobRequestOptions

A BlobRequestOptions object that specifies additional options for the request.

operationContext OperationContext

An OperationContext object that represents the context for the current operation.

Returns

Task

A Task object that represents the asynchronous operation.

FetchAttributesAsync(AccessCondition, BlobRequestOptions, OperationContext, CancellationToken)

Initiates an asynchronous operation to populate the blob's properties and metadata.

Task FetchAttributesAsync(AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext, CancellationToken cancellationToken)

Parameters

accessCondition AccessCondition

An AccessCondition object that represents the condition that must be met in order for the request to proceed.

options BlobRequestOptions

A BlobRequestOptions object that specifies additional options for the request.

operationContext OperationContext

An OperationContext object that represents the context for the current operation.

cancellationToken CancellationToken

A CancellationToken to observe while waiting for a task to complete.

Returns

Task

A Task object that represents the asynchronous operation.

FetchAttributesAsync(CancellationToken)

Initiates an asynchronous operation to populate the blob's properties and metadata.

Task FetchAttributesAsync(CancellationToken cancellationToken)

Parameters

cancellationToken CancellationToken

A CancellationToken to observe while waiting for a task to complete.

Returns

Task

A Task object that represents the asynchronous operation.

GetAccountProperties(BlobRequestOptions, OperationContext)

Gets properties for the account this blob resides on.

[DoesServiceRequest]
AccountProperties GetAccountProperties(BlobRequestOptions requestOptions = null, OperationContext operationContext = null)

Parameters

requestOptions BlobRequestOptions

A BlobRequestOptions object that specifies additional options for the request.

operationContext OperationContext

An OperationContext object that represents the context for the current operation.

Returns

AccountProperties

An AccountProperties object.

GetAccountPropertiesAsync()

Initiates an asynchronous operation to get properties for the account this blob resides on.

[DoesServiceRequest]
Task<AccountProperties> GetAccountPropertiesAsync()

Returns

Task<AccountProperties>

A Task<TResult> object of type AccountProperties that represents the asynchronous operation.

GetAccountPropertiesAsync(BlobRequestOptions, OperationContext)

Initiates an asynchronous operation to get properties for the account this blob resides on.

[DoesServiceRequest]
Task<AccountProperties> GetAccountPropertiesAsync(BlobRequestOptions requestOptions, OperationContext operationContext)

Parameters

requestOptions BlobRequestOptions

A BlobRequestOptions object that specifies additional options for the request.

operationContext OperationContext

An OperationContext object that represents the context for the current operation.

Returns

Task<AccountProperties>

A Task<TResult> object of type AccountProperties that represents the asynchronous operation.

GetAccountPropertiesAsync(BlobRequestOptions, OperationContext, CancellationToken)

Initiates an asynchronous operation to get properties for the account this blob resides on.

[DoesServiceRequest]
Task<AccountProperties> GetAccountPropertiesAsync(BlobRequestOptions requestOptions, OperationContext operationContext, CancellationToken cancellationToken)

Parameters

requestOptions BlobRequestOptions

A BlobRequestOptions object that specifies additional options for the request.

operationContext OperationContext

An OperationContext object that represents the context for the current operation.

cancellationToken CancellationToken

A CancellationToken to observe while waiting for a task to complete.

Returns

Task<AccountProperties>

A Task<TResult> object of type AccountProperties that represents the asynchronous operation.

GetAccountPropertiesAsync(CancellationToken)

Initiates an asynchronous operation to get properties for the account this blob resides on.

[DoesServiceRequest]
Task<AccountProperties> GetAccountPropertiesAsync(CancellationToken cancellationToken)

Parameters

cancellationToken CancellationToken

A CancellationToken to observe while waiting for a task to complete.

Returns

Task<AccountProperties>

A Task<TResult> object of type AccountProperties that represents the asynchronous operation.

GetSharedAccessSignature(SharedAccessBlobPolicy)

Returns a shared access signature for the blob.

string GetSharedAccessSignature(SharedAccessBlobPolicy policy)

Parameters

policy SharedAccessBlobPolicy

A SharedAccessBlobPolicy object specifying the access policy for the shared access signature.

Returns

string

A shared access signature, as a URI query string.

Remarks

The query string returned includes the leading question mark.

GetSharedAccessSignature(SharedAccessBlobPolicy, SharedAccessBlobHeaders)

Returns a shared access signature for the blob.

string GetSharedAccessSignature(SharedAccessBlobPolicy policy, SharedAccessBlobHeaders headers)

Parameters

policy SharedAccessBlobPolicy

A SharedAccessBlobPolicy object specifying the access policy for the shared access signature.

headers SharedAccessBlobHeaders

A SharedAccessBlobHeaders object specifying optional header values to set for a blob accessed with this SAS.

Returns

string

A shared access signature, as a URI query string.

GetSharedAccessSignature(SharedAccessBlobPolicy, SharedAccessBlobHeaders, string)

Returns a shared access signature for the blob.

string GetSharedAccessSignature(SharedAccessBlobPolicy policy, SharedAccessBlobHeaders headers, string groupPolicyIdentifier)

Parameters

policy SharedAccessBlobPolicy

A SharedAccessBlobPolicy object specifying the access policy for the shared access signature.

headers SharedAccessBlobHeaders

A SharedAccessBlobHeaders object specifying optional header values to set for a blob accessed with this SAS.

groupPolicyIdentifier string

A string identifying a stored access policy.

Returns

string

A shared access signature, as a URI query string.

GetSharedAccessSignature(SharedAccessBlobPolicy, SharedAccessBlobHeaders, string, SharedAccessProtocol?, IPAddressOrRange)

Returns a shared access signature for the blob.

string GetSharedAccessSignature(SharedAccessBlobPolicy policy, SharedAccessBlobHeaders headers, string groupPolicyIdentifier, SharedAccessProtocol? protocols, IPAddressOrRange ipAddressOrRange)

Parameters

policy SharedAccessBlobPolicy

A SharedAccessBlobPolicy object specifying the access policy for the shared access signature.

headers SharedAccessBlobHeaders

A SharedAccessBlobHeaders object specifying optional header values to set for a blob accessed with this SAS.

groupPolicyIdentifier string

A string identifying a stored access policy.

protocols SharedAccessProtocol?

The allowed protocols (https only, or http and https). Null if you don't want to restrict protocol.

ipAddressOrRange IPAddressOrRange

The allowed IP address or IP address range. Null if you don't want to restrict based on IP address.

Returns

string

A shared access signature, as a URI query string.

GetSharedAccessSignature(SharedAccessBlobPolicy, string)

Returns a shared access signature for the blob.

string GetSharedAccessSignature(SharedAccessBlobPolicy policy, string groupPolicyIdentifier)

Parameters

policy SharedAccessBlobPolicy

A SharedAccessBlobPolicy object specifying the access policy for the shared access signature.

groupPolicyIdentifier string

A string identifying a stored access policy.

Returns

string

A shared access signature, as a URI query string.

Remarks

The query string returned includes the leading question mark.

OpenRead(AccessCondition, BlobRequestOptions, OperationContext)

Opens a stream for reading from the blob.

Stream OpenRead(AccessCondition accessCondition = null, BlobRequestOptions options = null, OperationContext operationContext = null)

Parameters

accessCondition AccessCondition

An AccessCondition object that represents the condition that must be met in order for the request to proceed. If null, no condition is used.

options BlobRequestOptions

A BlobRequestOptions object that specifies additional options for the request. If null, default options are applied to the request.

operationContext OperationContext

An OperationContext object that represents the context for the current operation.

Returns

Stream

A stream to be used for reading from the blob.

Remarks

Note that this method always makes a call to the FetchAttributes(AccessCondition, BlobRequestOptions, OperationContext) method under the covers.

Set the StreamMinimumReadSizeInBytes property before calling this method to specify the minimum number of bytes to buffer when reading from the stream. The value must be at least 16 KB.

OpenReadAsync()

Initiates an asynchronous operation to open a stream for reading from the blob.

Task<Stream> OpenReadAsync()

Returns

Task<Stream>

A Task<TResult> object of type Stream that represents the asynchronous operation.

Remarks

On the Stream object returned by this method, the EndRead(IAsyncResult) method must be called exactly once for every BeginRead(byte[], int, int, AsyncCallback, object) call. Failing to end the read process before beginning another read process can cause unexpected behavior.

Note that this method always makes a call to the FetchAttributesAsync(AccessCondition, BlobRequestOptions, OperationContext, CancellationToken) method under the covers.

Set the StreamMinimumReadSizeInBytes property before calling this method to specify the minimum number of bytes to buffer when reading from the stream. The value must be at least 16 KB.

OpenReadAsync(AccessCondition, BlobRequestOptions, OperationContext)

Initiates an asynchronous operation to open a stream for reading from the blob.

Task<Stream> OpenReadAsync(AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext)

Parameters

accessCondition AccessCondition

An AccessCondition object that represents the condition that must be met in order for the request to proceed. If null, no condition is used.

options BlobRequestOptions

A BlobRequestOptions object that specifies additional options for the request.

operationContext OperationContext

An OperationContext object that represents the context for the current operation.

Returns

Task<Stream>

A Task<TResult> object of type Stream that represents the asynchronous operation.

Remarks

On the Stream object returned by this method, the EndRead(IAsyncResult) method must be called exactly once for every BeginRead(byte[], int, int, AsyncCallback, object) call. Failing to end the read process before beginning another read process can cause unexpected behavior.

Note that this method always makes a call to the FetchAttributesAsync(AccessCondition, BlobRequestOptions, OperationContext, CancellationToken) method under the covers.

Set the StreamMinimumReadSizeInBytes property before calling this method to specify the minimum number of bytes to buffer when reading from the stream. The value must be at least 16 KB.

OpenReadAsync(AccessCondition, BlobRequestOptions, OperationContext, CancellationToken)

Initiates an asynchronous operation to open a stream for reading from the blob.

Task<Stream> OpenReadAsync(AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext, CancellationToken cancellationToken)

Parameters

accessCondition AccessCondition

An AccessCondition object that represents the condition that must be met in order for the request to proceed. If null, no condition is used.

options BlobRequestOptions

A BlobRequestOptions object that specifies additional options for the request.

operationContext OperationContext

An OperationContext object that represents the context for the current operation.

cancellationToken CancellationToken

A CancellationToken to observe while waiting for a task to complete.

Returns

Task<Stream>

A Task<TResult> object of type Stream that represents the asynchronous operation.

Remarks

On the Stream object returned by this method, the EndRead(IAsyncResult) method must be called exactly once for every BeginRead(byte[], int, int, AsyncCallback, object) call. Failing to end the read process before beginning another read process can cause unexpected behavior.

Note that this method always makes a call to the FetchAttributesAsync(AccessCondition, BlobRequestOptions, OperationContext, CancellationToken) method under the covers.

Set the StreamMinimumReadSizeInBytes property before calling this method to specify the minimum number of bytes to buffer when reading from the stream. The value must be at least 16 KB.

OpenReadAsync(CancellationToken)

Initiates an asynchronous operation to open a stream for reading from the blob.

Task<Stream> OpenReadAsync(CancellationToken cancellationToken)

Parameters

cancellationToken CancellationToken

A CancellationToken to observe while waiting for a task to complete.

Returns

Task<Stream>

A Task<TResult> object of type Stream that represents the asynchronous operation.

Remarks

On the Stream object returned by this method, the EndRead(IAsyncResult) method must be called exactly once for every BeginRead(byte[], int, int, AsyncCallback, object) call. Failing to end the read process before beginning another read process can cause unexpected behavior.

Note that this method always makes a call to the FetchAttributesAsync(AccessCondition, BlobRequestOptions, OperationContext, CancellationToken) method under the covers.

Set the StreamMinimumReadSizeInBytes property before calling this method to specify the minimum number of bytes to buffer when reading from the stream. The value must be at least 16 KB.

ReleaseLease(AccessCondition, BlobRequestOptions, OperationContext)

Releases the lease on this blob.

void ReleaseLease(AccessCondition accessCondition, BlobRequestOptions options = null, OperationContext operationContext = null)

Parameters

accessCondition AccessCondition

An AccessCondition object that represents the condition that must be met in order for the request to proceed, including a required lease ID.

options BlobRequestOptions

A BlobRequestOptions object that specifies additional options for the request. If null, default options are applied to the request.

operationContext OperationContext

An OperationContext object that represents the context for the current operation.

ReleaseLeaseAsync(AccessCondition)

Initiates an asynchronous operation to release the lease on this blob.

Task ReleaseLeaseAsync(AccessCondition accessCondition)

Parameters

accessCondition AccessCondition

An AccessCondition object that represents the condition that must be met in order for the request to proceed, including a required lease ID.

Returns

Task

A Task object that represents the asynchronous operation.

ReleaseLeaseAsync(AccessCondition, BlobRequestOptions, OperationContext)

Initiates an asynchronous operation to release the lease on this blob.

Task ReleaseLeaseAsync(AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext)

Parameters

accessCondition AccessCondition

An AccessCondition object that represents the condition that must be met in order for the request to proceed, including a required lease ID.

options BlobRequestOptions

A BlobRequestOptions object that specifies additional options for the request.

operationContext OperationContext

An OperationContext object that represents the context for the current operation.

Returns

Task

A Task object that represents the asynchronous operation.

ReleaseLeaseAsync(AccessCondition, BlobRequestOptions, OperationContext, CancellationToken)

Initiates an asynchronous operation to release the lease on this blob.

Task ReleaseLeaseAsync(AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext, CancellationToken cancellationToken)

Parameters

accessCondition AccessCondition

An AccessCondition object that represents the condition that must be met in order for the request to proceed, including a required lease ID.

options BlobRequestOptions

A BlobRequestOptions object that specifies additional options for the request.

operationContext OperationContext

An OperationContext object that represents the context for the current operation.

cancellationToken CancellationToken

A CancellationToken to observe while waiting for a task to complete.

Returns

Task

A Task object that represents the asynchronous operation.

ReleaseLeaseAsync(AccessCondition, CancellationToken)

Initiates an asynchronous operation to release the lease on this blob.

Task ReleaseLeaseAsync(AccessCondition accessCondition, CancellationToken cancellationToken)

Parameters

accessCondition AccessCondition

An AccessCondition object that represents the condition that must be met in order for the request to proceed, including a required lease ID.

cancellationToken CancellationToken

A CancellationToken to observe while waiting for a task to complete.

Returns

Task

A Task object that represents the asynchronous operation.

RenewLease(AccessCondition, BlobRequestOptions, OperationContext)

Renews a lease on this blob.

void RenewLease(AccessCondition accessCondition, BlobRequestOptions options = null, OperationContext operationContext = null)

Parameters

accessCondition AccessCondition

An AccessCondition object that represents the condition that must be met in order for the request to proceed, including a required lease ID.

options BlobRequestOptions

A BlobRequestOptions object that specifies additional options for the request. If null, default options are applied to the request.

operationContext OperationContext

An OperationContext object that represents the context for the current operation.

RenewLeaseAsync(AccessCondition)

Initiates an asynchronous operation to renew a lease on this blob.

Task RenewLeaseAsync(AccessCondition accessCondition)

Parameters

accessCondition AccessCondition

An AccessCondition object that represents the condition that must be met in order for the request to proceed, including a required lease ID.

Returns

Task

A Task object that represents the asynchronous operation.

RenewLeaseAsync(AccessCondition, BlobRequestOptions, OperationContext)

Initiates an asynchronous operation to renew a lease on this blob.

Task RenewLeaseAsync(AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext)

Parameters

accessCondition AccessCondition

An AccessCondition object that represents the condition that must be met in order for the request to proceed, including a required lease ID.

options BlobRequestOptions

A BlobRequestOptions object that specifies additional options for the request.

operationContext OperationContext

An OperationContext object that represents the context for the current operation.

Returns

Task

A Task object that represents the asynchronous operation.

RenewLeaseAsync(AccessCondition, BlobRequestOptions, OperationContext, CancellationToken)

Initiates an asynchronous operation to renew a lease on this blob.

Task RenewLeaseAsync(AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext, CancellationToken cancellationToken)

Parameters

accessCondition AccessCondition

An AccessCondition object that represents the condition that must be met in order for the request to proceed, including a required lease ID.

options BlobRequestOptions

A BlobRequestOptions object that specifies additional options for the request.

operationContext OperationContext

An OperationContext object that represents the context for the current operation.

cancellationToken CancellationToken

A CancellationToken to observe while waiting for a task to complete.

Returns

Task

A Task object that represents the asynchronous operation.

RenewLeaseAsync(AccessCondition, CancellationToken)

Initiates an asynchronous operation to renew a lease on this blob.

Task RenewLeaseAsync(AccessCondition accessCondition, CancellationToken cancellationToken)

Parameters

accessCondition AccessCondition

An AccessCondition object that represents the condition that must be met in order for the request to proceed, including a required lease ID.

cancellationToken CancellationToken

A CancellationToken to observe while waiting for a task to complete.

Returns

Task

A Task object that represents the asynchronous operation.

SetMetadata(AccessCondition, BlobRequestOptions, OperationContext)

Updates the blob's metadata.

void SetMetadata(AccessCondition accessCondition = null, BlobRequestOptions options = null, OperationContext operationContext = null)

Parameters

accessCondition AccessCondition

An AccessCondition object that represents the condition that must be met in order for the request to proceed.

options BlobRequestOptions

A BlobRequestOptions object that specifies additional options for the request. If null, default options are applied to the request.

operationContext OperationContext

An OperationContext object that represents the context for the current operation.

SetMetadataAsync()

Initiates an asynchronous operation to update the blob's metadata.

Task SetMetadataAsync()

Returns

Task

A Task object that represents the asynchronous operation.

SetMetadataAsync(AccessCondition, BlobRequestOptions, OperationContext)

Initiates an asynchronous operation to update the blob's metadata.

Task SetMetadataAsync(AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext)

Parameters

accessCondition AccessCondition

An AccessCondition object that represents the condition that must be met in order for the request to proceed.

options BlobRequestOptions

A BlobRequestOptions object that specifies additional options for the request.

operationContext OperationContext

An OperationContext object that represents the context for the current operation.

Returns

Task

A Task object that represents the asynchronous operation.

SetMetadataAsync(AccessCondition, BlobRequestOptions, OperationContext, CancellationToken)

Initiates an asynchronous operation to update the blob's metadata.

Task SetMetadataAsync(AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext, CancellationToken cancellationToken)

Parameters

accessCondition AccessCondition

An AccessCondition object that represents the condition that must be met in order for the request to proceed.

options BlobRequestOptions

A BlobRequestOptions object that specifies additional options for the request.

operationContext OperationContext

An OperationContext object that represents the context for the current operation.

cancellationToken CancellationToken

A CancellationToken to observe while waiting for a task to complete.

Returns

Task

A Task object that represents the asynchronous operation.

SetMetadataAsync(CancellationToken)

Initiates an asynchronous operation to update the blob's metadata.

Task SetMetadataAsync(CancellationToken cancellationToken)

Parameters

cancellationToken CancellationToken

A CancellationToken to observe while waiting for a task to complete.

Returns

Task

A Task object that represents the asynchronous operation.

SetProperties(AccessCondition, BlobRequestOptions, OperationContext)

Updates the blob's properties.

void SetProperties(AccessCondition accessCondition = null, BlobRequestOptions options = null, OperationContext operationContext = null)

Parameters

accessCondition AccessCondition

An AccessCondition object that represents the condition that must be met in order for the request to proceed.

options BlobRequestOptions

A BlobRequestOptions object that specifies additional options for the request. If null, default options are applied to the request.

operationContext OperationContext

An OperationContext object that represents the context for the current operation.

SetPropertiesAsync()

Initiates an asynchronous operation to update the blob's properties.

Task SetPropertiesAsync()

Returns

Task

A Task object that represents the asynchronous operation.

SetPropertiesAsync(AccessCondition, BlobRequestOptions, OperationContext)

Initiates an asynchronous operation to update the blob's properties.

Task SetPropertiesAsync(AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext)

Parameters

accessCondition AccessCondition

An AccessCondition object that represents the condition that must be met in order for the request to proceed.

options BlobRequestOptions

A BlobRequestOptions object that specifies additional options for the request.

operationContext OperationContext

An OperationContext object that represents the context for the current operation.

Returns

Task

A Task object that represents the asynchronous operation.

SetPropertiesAsync(AccessCondition, BlobRequestOptions, OperationContext, CancellationToken)

Initiates an asynchronous operation to update the blob's properties.

Task SetPropertiesAsync(AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext, CancellationToken cancellationToken)

Parameters

accessCondition AccessCondition

An AccessCondition object that represents the condition that must be met in order for the request to proceed.

options BlobRequestOptions

A BlobRequestOptions object that specifies additional options for the request.

operationContext OperationContext

An OperationContext object that represents the context for the current operation.

cancellationToken CancellationToken

A CancellationToken to observe while waiting for a task to complete.

Returns

Task

A Task object that represents the asynchronous operation.

SetPropertiesAsync(CancellationToken)

Initiates an asynchronous operation to update the blob's properties.

Task SetPropertiesAsync(CancellationToken cancellationToken)

Parameters

cancellationToken CancellationToken

A CancellationToken to observe while waiting for a task to complete.

Returns

Task

A Task object that represents the asynchronous operation.

UploadFromByteArray(byte[], int, int, AccessCondition, BlobRequestOptions, OperationContext)

Uploads the contents of a byte array to a blob.

void UploadFromByteArray(byte[] buffer, int index, int count, AccessCondition accessCondition = null, BlobRequestOptions options = null, OperationContext operationContext = null)

Parameters

buffer byte[]

An array of bytes.

index int

The zero-based byte offset in buffer at which to begin uploading bytes to the blob.

count int

The number of bytes to be written to the blob.

accessCondition AccessCondition

An AccessCondition object that represents the condition that must be met in order for the request to proceed.

options BlobRequestOptions

A BlobRequestOptions object that specifies additional options for the request. If null, default options are applied to the request.

operationContext OperationContext

An OperationContext object that represents the context for the current operation.

UploadFromByteArrayAsync(byte[], int, int)

Initiates an asynchronous operation to upload the contents of a byte array to a blob.

Task UploadFromByteArrayAsync(byte[] buffer, int index, int count)

Parameters

buffer byte[]

An array of bytes.

index int

The zero-based byte offset in buffer at which to begin uploading bytes to the blob.

count int

The number of bytes to be written to the blob.

Returns

Task

A Task object that represents the asynchronous operation.

UploadFromByteArrayAsync(byte[], int, int, AccessCondition, BlobRequestOptions, OperationContext)

Initiates an asynchronous operation to upload the contents of a byte array to a blob.

Task UploadFromByteArrayAsync(byte[] buffer, int index, int count, AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext)

Parameters

buffer byte[]

An array of bytes.

index int

The zero-based byte offset in buffer at which to begin uploading bytes to the blob.

count int

The number of bytes to be written to the blob.

accessCondition AccessCondition

An AccessCondition object that represents the condition that must be met in order for the request to proceed.

options BlobRequestOptions

A BlobRequestOptions object that specifies additional options for the request.

operationContext OperationContext

An OperationContext object that represents the context for the current operation.

Returns

Task

A Task object that represents the asynchronous operation.

UploadFromByteArrayAsync(byte[], int, int, AccessCondition, BlobRequestOptions, OperationContext, CancellationToken)

Initiates an asynchronous operation to upload the contents of a byte array to a blob.

Task UploadFromByteArrayAsync(byte[] buffer, int index, int count, AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext, CancellationToken cancellationToken)

Parameters

buffer byte[]

An array of bytes.

index int

The zero-based byte offset in buffer at which to begin uploading bytes to the blob.

count int

The number of bytes to be written to the blob.

accessCondition AccessCondition

An AccessCondition object that represents the condition that must be met in order for the request to proceed.

options BlobRequestOptions

A BlobRequestOptions object that specifies additional options for the request.

operationContext OperationContext

An OperationContext object that represents the context for the current operation.

cancellationToken CancellationToken

A CancellationToken to observe while waiting for a task to complete.

Returns

Task

A Task object that represents the asynchronous operation.

UploadFromByteArrayAsync(byte[], int, int, CancellationToken)

Initiates an asynchronous operation to upload the contents of a byte array to a blob.

Task UploadFromByteArrayAsync(byte[] buffer, int index, int count, CancellationToken cancellationToken)

Parameters

buffer byte[]

An array of bytes.

index int

The zero-based byte offset in buffer at which to begin uploading bytes to the blob.

count int

The number of bytes to be written to the blob.

cancellationToken CancellationToken

A CancellationToken to observe while waiting for a task to complete.

Returns

Task

A Task object that represents the asynchronous operation.

UploadFromFile(string, AccessCondition, BlobRequestOptions, OperationContext)

Uploads a file to the Microsoft Azure Blob Service.

void UploadFromFile(string path, AccessCondition accessCondition = null, BlobRequestOptions options = null, OperationContext operationContext = null)

Parameters

path string

A string containing the file path providing the blob content.

accessCondition AccessCondition

An AccessCondition object that represents the condition that must be met in order for the request to proceed.

options BlobRequestOptions

A BlobRequestOptions object that specifies additional options for the request. If null, default options are applied to the request.

operationContext OperationContext

An OperationContext object that represents the context for the current operation.

UploadFromFileAsync(string)

Initiates an asynchronous operation to upload a file to a blob.

Task UploadFromFileAsync(string path)

Parameters

path string

A string containing the file path providing the blob content.

Returns

Task

A Task object that represents the asynchronous operation.

UploadFromFileAsync(string, AccessCondition, BlobRequestOptions, OperationContext)

Initiates an asynchronous operation to upload a file to a blob.

Task UploadFromFileAsync(string path, AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext)

Parameters

path string

A string containing the file path providing the blob content.

accessCondition AccessCondition

An AccessCondition object that represents the condition that must be met in order for the request to proceed.

options BlobRequestOptions

A BlobRequestOptions object that specifies additional options for the request.

operationContext OperationContext

An OperationContext object that represents the context for the current operation.

Returns

Task

A Task object that represents the asynchronous operation.

UploadFromFileAsync(string, AccessCondition, BlobRequestOptions, OperationContext, CancellationToken)

Initiates an asynchronous operation to upload a file to a blob.

Task UploadFromFileAsync(string path, AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext, CancellationToken cancellationToken)

Parameters

path string

A string containing the file path providing the blob content.

accessCondition AccessCondition

An AccessCondition object that represents the condition that must be met in order for the request to proceed.

options BlobRequestOptions

A BlobRequestOptions object that specifies additional options for the request.

operationContext OperationContext

An OperationContext object that represents the context for the current operation.

cancellationToken CancellationToken

A CancellationToken to observe while waiting for a task to complete.

Returns

Task

A Task object that represents the asynchronous operation.

UploadFromFileAsync(string, CancellationToken)

Initiates an asynchronous operation to upload a file to a blob.

Task UploadFromFileAsync(string path, CancellationToken cancellationToken)

Parameters

path string

A string containing the file path providing the blob content.

cancellationToken CancellationToken

A CancellationToken to observe while waiting for a task to complete.

Returns

Task

A Task object that represents the asynchronous operation.

UploadFromStream(Stream, AccessCondition, BlobRequestOptions, OperationContext)

Uploads a stream to the Microsoft Azure Blob Service.

void UploadFromStream(Stream source, AccessCondition accessCondition = null, BlobRequestOptions options = null, OperationContext operationContext = null)

Parameters

source Stream

The stream providing the blob content. Use a seek-able stream for optimal performance.

accessCondition AccessCondition

An AccessCondition object that represents the condition that must be met in order for the request to proceed.

options BlobRequestOptions

A BlobRequestOptions object that specifies additional options for the request. If null, default options are applied to the request.

operationContext OperationContext

An OperationContext object that represents the context for the current operation.

UploadFromStream(Stream, long, AccessCondition, BlobRequestOptions, OperationContext)

Uploads a stream to the Microsoft Azure Blob Service.

void UploadFromStream(Stream source, long length, AccessCondition accessCondition = null, BlobRequestOptions options = null, OperationContext operationContext = null)

Parameters

source Stream

A Stream object providing the blob content.

length long

The number of bytes to write from the source stream at its current position.

accessCondition AccessCondition

An AccessCondition object that represents the condition that must be met in order for the request to proceed. If null, no condition is used.

options BlobRequestOptions

A BlobRequestOptions object that specifies additional options for the request.

operationContext OperationContext

An OperationContext object that represents the context for the current operation.

UploadFromStreamAsync(Stream)

Initiates an asynchronous operation to upload a stream to a blob.

Task UploadFromStreamAsync(Stream source)

Parameters

source Stream

A Stream object providing the blob content.

Returns

Task

A Task object that represents the asynchronous operation.

UploadFromStreamAsync(Stream, AccessCondition, BlobRequestOptions, OperationContext)

Initiates an asynchronous operation to upload a stream to a blob.

Task UploadFromStreamAsync(Stream source, AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext)

Parameters

source Stream

A Stream object providing the blob content.

accessCondition AccessCondition

An AccessCondition object that represents the condition that must be met in order for the request to proceed.

options BlobRequestOptions

A BlobRequestOptions object that specifies additional options for the request.

operationContext OperationContext

An OperationContext object that represents the context for the current operation.

Returns

Task

A Task object that represents the asynchronous operation.

UploadFromStreamAsync(Stream, AccessCondition, BlobRequestOptions, OperationContext, CancellationToken)

Initiates an asynchronous operation to upload a stream to a blob.

Task UploadFromStreamAsync(Stream source, AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext, CancellationToken cancellationToken)

Parameters

source Stream

A Stream object providing the blob content.

accessCondition AccessCondition

An AccessCondition object that represents the condition that must be met in order for the request to proceed.

options BlobRequestOptions

A BlobRequestOptions object that specifies additional options for the request.

operationContext OperationContext

An OperationContext object that represents the context for the current operation.

cancellationToken CancellationToken

A CancellationToken to observe while waiting for a task to complete.

Returns

Task

A Task object that represents the asynchronous operation.

UploadFromStreamAsync(Stream, long)

Initiates an asynchronous operation to upload a stream to a block blob.

Task UploadFromStreamAsync(Stream source, long length)

Parameters

source Stream

A Stream object providing the blob content.

length long

The number of bytes to write from the source stream at its current position.

Returns

Task

A Task object that represents the asynchronous operation.

UploadFromStreamAsync(Stream, long, AccessCondition, BlobRequestOptions, OperationContext)

Initiates an asynchronous operation to upload a stream to a blob.

Task UploadFromStreamAsync(Stream source, long length, AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext)

Parameters

source Stream

A Stream object providing the blob content.

length long

The number of bytes to write from the source stream at its current position.

accessCondition AccessCondition

An AccessCondition object that represents the condition that must be met in order for the request to proceed. If null, no condition is used.

options BlobRequestOptions

A BlobRequestOptions object that specifies additional options for the request.

operationContext OperationContext

An OperationContext object that represents the context for the current operation.

Returns

Task

A Task object that represents the asynchronous operation.

UploadFromStreamAsync(Stream, long, AccessCondition, BlobRequestOptions, OperationContext, CancellationToken)

Initiates an asynchronous operation to upload a stream to a blob.

Task UploadFromStreamAsync(Stream source, long length, AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext, CancellationToken cancellationToken)

Parameters

source Stream

A Stream object providing the blob content.

length long

The number of bytes to write from the source stream at its current position.

accessCondition AccessCondition

An AccessCondition object that represents the condition that must be met in order for the request to proceed. If null, no condition is used.

options BlobRequestOptions

A BlobRequestOptions object that specifies additional options for the request.

operationContext OperationContext

An OperationContext object that represents the context for the current operation.

cancellationToken CancellationToken

A CancellationToken to observe while waiting for a task to complete.

Returns

Task

A Task object that represents the asynchronous operation.

UploadFromStreamAsync(Stream, long, CancellationToken)

Initiates an asynchronous operation to upload a stream to a block blob.

Task UploadFromStreamAsync(Stream source, long length, CancellationToken cancellationToken)

Parameters

source Stream

A Stream object providing the blob content.

length long

The number of bytes to write from the source stream at its current position.

cancellationToken CancellationToken

A CancellationToken to observe while waiting for a task to complete.

Returns

Task

A Task object that represents the asynchronous operation.

UploadFromStreamAsync(Stream, CancellationToken)

Initiates an asynchronous operation to upload a stream to a blob.

Task UploadFromStreamAsync(Stream source, CancellationToken cancellationToken)

Parameters

source Stream

A Stream object providing the blob content.

cancellationToken CancellationToken

A CancellationToken to observe while waiting for a task to complete.

Returns

Task

A Task object that represents the asynchronous operation.