CloudBlockBlob.OpenWriteAsync CloudBlockBlob.OpenWriteAsync CloudBlockBlob.OpenWriteAsync Method

Definition

Overloads

OpenWriteAsync() OpenWriteAsync() OpenWriteAsync()

Initiates an asynchronous operation to open a stream for writing to the blob. If the blob already exists, it will be overwritten.

OpenWriteAsync(CancellationToken) OpenWriteAsync(CancellationToken)

Initiates an asynchronous operation to open a stream for writing to the blob. If the blob already exists, it will be overwritten.

OpenWriteAsync(AccessCondition, BlobRequestOptions, OperationContext) OpenWriteAsync(AccessCondition, BlobRequestOptions, OperationContext)

Initiates an asynchronous operation to open a stream for writing to the blob. If the blob already exists, it will be overwritten.

OpenWriteAsync(AccessCondition, BlobRequestOptions, OperationContext, CancellationToken) OpenWriteAsync(AccessCondition, BlobRequestOptions, OperationContext, CancellationToken)

Initiates an asynchronous operation to open a stream for writing to the blob. If the blob already exists, it will be overwritten.

OpenWriteAsync() OpenWriteAsync() OpenWriteAsync()

Initiates an asynchronous operation to open a stream for writing to the blob. If the blob already exists, it will be overwritten.

[Microsoft.WindowsAzure.Storage.DoesServiceRequest]
public virtual System.Threading.Tasks.Task<Microsoft.WindowsAzure.Storage.Blob.CloudBlobStream> OpenWriteAsync ();
abstract member OpenWriteAsync : unit -> System.Threading.Tasks.Task<Microsoft.WindowsAzure.Storage.Blob.CloudBlobStream>
override this.OpenWriteAsync : unit -> System.Threading.Tasks.Task<Microsoft.WindowsAzure.Storage.Blob.CloudBlobStream>
Public Overridable Function OpenWriteAsync () As Task(Of CloudBlobStream)
Returns

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

Remarks

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

Set the StreamWriteSizeInBytes property before calling this method to specify the block size to write, in bytes, ranging from between 16 KB and 100 MB inclusive.

To throw an exception if the blob exists instead of overwriting it, see OpenWriteAsync(AccessCondition, BlobRequestOptions, OperationContext).

OpenWriteAsync(CancellationToken) OpenWriteAsync(CancellationToken)

Initiates an asynchronous operation to open a stream for writing to the blob. If the blob already exists, it will be overwritten.

[Microsoft.WindowsAzure.Storage.DoesServiceRequest]
public virtual System.Threading.Tasks.Task<Microsoft.WindowsAzure.Storage.Blob.CloudBlobStream> OpenWriteAsync (System.Threading.CancellationToken cancellationToken);
abstract member OpenWriteAsync : System.Threading.CancellationToken -> System.Threading.Tasks.Task<Microsoft.WindowsAzure.Storage.Blob.CloudBlobStream>
override this.OpenWriteAsync : System.Threading.CancellationToken -> System.Threading.Tasks.Task<Microsoft.WindowsAzure.Storage.Blob.CloudBlobStream>
Parameters
cancellationToken
CancellationToken CancellationToken CancellationToken

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

Returns

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

Remarks

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

Set the StreamWriteSizeInBytes property before calling this method to specify the block size to write, in bytes, ranging from between 16 KB and 100 MB inclusive.

To throw an exception if the blob exists instead of overwriting it, see OpenWriteAsync(AccessCondition, BlobRequestOptions, OperationContext, CancellationToken).

OpenWriteAsync(AccessCondition, BlobRequestOptions, OperationContext) OpenWriteAsync(AccessCondition, BlobRequestOptions, OperationContext)

Initiates an asynchronous operation to open a stream for writing to the blob. If the blob already exists, it will be overwritten.

[Microsoft.WindowsAzure.Storage.DoesServiceRequest]
public virtual System.Threading.Tasks.Task<Microsoft.WindowsAzure.Storage.Blob.CloudBlobStream> OpenWriteAsync (Microsoft.WindowsAzure.Storage.AccessCondition accessCondition, Microsoft.WindowsAzure.Storage.Blob.BlobRequestOptions options, Microsoft.WindowsAzure.Storage.OperationContext operationContext);
abstract member OpenWriteAsync : Microsoft.WindowsAzure.Storage.AccessCondition * Microsoft.WindowsAzure.Storage.Blob.BlobRequestOptions * Microsoft.WindowsAzure.Storage.OperationContext -> System.Threading.Tasks.Task<Microsoft.WindowsAzure.Storage.Blob.CloudBlobStream>
override this.OpenWriteAsync : Microsoft.WindowsAzure.Storage.AccessCondition * Microsoft.WindowsAzure.Storage.Blob.BlobRequestOptions * Microsoft.WindowsAzure.Storage.OperationContext -> System.Threading.Tasks.Task<Microsoft.WindowsAzure.Storage.Blob.CloudBlobStream>
Parameters
accessCondition
AccessCondition 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 BlobRequestOptions BlobRequestOptions

A BlobRequestOptions object that specifies additional options for the request.

operationContext
OperationContext OperationContext OperationContext

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

Returns

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

Remarks

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

Set the StreamWriteSizeInBytes property before calling this method to specify the block size to write, in bytes, ranging from between 16 KB and 100 MB inclusive.

To throw an exception if the blob exists instead of overwriting it, pass in an AccessCondition object generated using GenerateIfNotExistsCondition().

OpenWriteAsync(AccessCondition, BlobRequestOptions, OperationContext, CancellationToken) OpenWriteAsync(AccessCondition, BlobRequestOptions, OperationContext, CancellationToken)

Initiates an asynchronous operation to open a stream for writing to the blob. If the blob already exists, it will be overwritten.

[Microsoft.WindowsAzure.Storage.DoesServiceRequest]
public virtual System.Threading.Tasks.Task<Microsoft.WindowsAzure.Storage.Blob.CloudBlobStream> OpenWriteAsync (Microsoft.WindowsAzure.Storage.AccessCondition accessCondition, Microsoft.WindowsAzure.Storage.Blob.BlobRequestOptions options, Microsoft.WindowsAzure.Storage.OperationContext operationContext, System.Threading.CancellationToken cancellationToken);
abstract member OpenWriteAsync : Microsoft.WindowsAzure.Storage.AccessCondition * Microsoft.WindowsAzure.Storage.Blob.BlobRequestOptions * Microsoft.WindowsAzure.Storage.OperationContext * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Microsoft.WindowsAzure.Storage.Blob.CloudBlobStream>
override this.OpenWriteAsync : Microsoft.WindowsAzure.Storage.AccessCondition * Microsoft.WindowsAzure.Storage.Blob.BlobRequestOptions * Microsoft.WindowsAzure.Storage.OperationContext * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Microsoft.WindowsAzure.Storage.Blob.CloudBlobStream>
Parameters
accessCondition
AccessCondition 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 BlobRequestOptions BlobRequestOptions

A BlobRequestOptions object that specifies additional options for the request.

operationContext
OperationContext OperationContext OperationContext

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

cancellationToken
CancellationToken CancellationToken CancellationToken

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

Returns

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

Remarks

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

Set the StreamWriteSizeInBytes property before calling this method to specify the block size to write, in bytes, ranging from between 16 KB and 100 MB inclusive.

To throw an exception if the blob exists instead of overwriting it, pass in an AccessCondition object generated using GenerateIfNotExistsCondition().

Applies to