CloudAppendBlob.OpenWriteAsync Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Overloads
OpenWriteAsync(Boolean, AccessCondition, BlobRequestOptions, OperationContext) |
Initiates an asynchronous operation to open a stream for writing to the blob. |
OpenWriteAsync(Boolean, AccessCondition, BlobRequestOptions, OperationContext, CancellationToken) |
Initiates an asynchronous operation to open a stream for writing to the blob. |
OpenWriteAsync(Boolean) |
Initiates an asynchronous operation to open a stream for writing to the blob. |
OpenWriteAsync(Boolean, CancellationToken) |
Initiates an asynchronous operation to open a stream for writing to the blob. |
OpenWriteAsync(Boolean, AccessCondition, BlobRequestOptions, OperationContext)
Initiates an asynchronous operation to open a stream for writing to the blob.
[Microsoft.Azure.Storage.DoesServiceRequest]
public virtual System.Threading.Tasks.Task<Microsoft.Azure.Storage.Blob.CloudBlobStream> OpenWriteAsync (bool createNew, Microsoft.Azure.Storage.AccessCondition accessCondition, Microsoft.Azure.Storage.Blob.BlobRequestOptions options, Microsoft.Azure.Storage.OperationContext operationContext);
[<Microsoft.Azure.Storage.DoesServiceRequest>]
abstract member OpenWriteAsync : bool * Microsoft.Azure.Storage.AccessCondition * Microsoft.Azure.Storage.Blob.BlobRequestOptions * Microsoft.Azure.Storage.OperationContext -> System.Threading.Tasks.Task<Microsoft.Azure.Storage.Blob.CloudBlobStream>
override this.OpenWriteAsync : bool * Microsoft.Azure.Storage.AccessCondition * Microsoft.Azure.Storage.Blob.BlobRequestOptions * Microsoft.Azure.Storage.OperationContext -> System.Threading.Tasks.Task<Microsoft.Azure.Storage.Blob.CloudBlobStream>
Public Overridable Function OpenWriteAsync (createNew As Boolean, accessCondition As AccessCondition, options As BlobRequestOptions, operationContext As OperationContext) As Task(Of CloudBlobStream)
Parameters
- createNew
- Boolean
Use true
to create a new append blob or overwrite an existing one, false
to append to an existing blob.
- 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
A Task<TResult> object of type CloudBlobStream that represents the asynchronous operation.
- Attributes
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 4 MB inclusive. If you have a single-writer scenario, see AbsorbConditionalErrorsOnRetry to determine whether setting this flag to true
is acceptable for your scenario.
Applies to
OpenWriteAsync(Boolean, AccessCondition, BlobRequestOptions, OperationContext, CancellationToken)
Initiates an asynchronous operation to open a stream for writing to the blob.
[Microsoft.Azure.Storage.DoesServiceRequest]
public virtual System.Threading.Tasks.Task<Microsoft.Azure.Storage.Blob.CloudBlobStream> OpenWriteAsync (bool createNew, Microsoft.Azure.Storage.AccessCondition accessCondition, Microsoft.Azure.Storage.Blob.BlobRequestOptions options, Microsoft.Azure.Storage.OperationContext operationContext, System.Threading.CancellationToken cancellationToken);
[<Microsoft.Azure.Storage.DoesServiceRequest>]
abstract member OpenWriteAsync : bool * Microsoft.Azure.Storage.AccessCondition * Microsoft.Azure.Storage.Blob.BlobRequestOptions * Microsoft.Azure.Storage.OperationContext * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Microsoft.Azure.Storage.Blob.CloudBlobStream>
override this.OpenWriteAsync : bool * Microsoft.Azure.Storage.AccessCondition * Microsoft.Azure.Storage.Blob.BlobRequestOptions * Microsoft.Azure.Storage.OperationContext * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Microsoft.Azure.Storage.Blob.CloudBlobStream>
Public Overridable Function OpenWriteAsync (createNew As Boolean, accessCondition As AccessCondition, options As BlobRequestOptions, operationContext As OperationContext, cancellationToken As CancellationToken) As Task(Of CloudBlobStream)
Parameters
- createNew
- Boolean
Use true
to create a new append blob or overwrite an existing one, false
to append to an existing blob.
- 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
A Task<TResult> object of type CloudBlobStream that represents the asynchronous operation.
- Attributes
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 4 MB inclusive. If you have a single-writer scenario, see AbsorbConditionalErrorsOnRetry to determine whether setting this flag to true
is acceptable for your scenario.
Applies to
OpenWriteAsync(Boolean)
Initiates an asynchronous operation to open a stream for writing to the blob.
[Microsoft.Azure.Storage.DoesServiceRequest]
public virtual System.Threading.Tasks.Task<Microsoft.Azure.Storage.Blob.CloudBlobStream> OpenWriteAsync (bool createNew);
[<Microsoft.Azure.Storage.DoesServiceRequest>]
abstract member OpenWriteAsync : bool -> System.Threading.Tasks.Task<Microsoft.Azure.Storage.Blob.CloudBlobStream>
override this.OpenWriteAsync : bool -> System.Threading.Tasks.Task<Microsoft.Azure.Storage.Blob.CloudBlobStream>
Public Overridable Function OpenWriteAsync (createNew As Boolean) As Task(Of CloudBlobStream)
Parameters
- createNew
- Boolean
Use true
to create a new append blob or overwrite an existing one, false
to append to an existing blob.
Returns
A Task<TResult> object of type CloudBlobStream that represents the asynchronous operation.
- Attributes
Remarks
Note that this method always makes a call to the BeginFetchAttributes(AccessCondition, BlobRequestOptions, OperationContext, AsyncCallback, Object) 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 4 MB inclusive.
Applies to
OpenWriteAsync(Boolean, CancellationToken)
Initiates an asynchronous operation to open a stream for writing to the blob.
[Microsoft.Azure.Storage.DoesServiceRequest]
public virtual System.Threading.Tasks.Task<Microsoft.Azure.Storage.Blob.CloudBlobStream> OpenWriteAsync (bool createNew, System.Threading.CancellationToken cancellationToken);
[<Microsoft.Azure.Storage.DoesServiceRequest>]
abstract member OpenWriteAsync : bool * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Microsoft.Azure.Storage.Blob.CloudBlobStream>
override this.OpenWriteAsync : bool * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Microsoft.Azure.Storage.Blob.CloudBlobStream>
Public Overridable Function OpenWriteAsync (createNew As Boolean, cancellationToken As CancellationToken) As Task(Of CloudBlobStream)
Parameters
- createNew
- Boolean
Use true
to create a new append blob or overwrite an existing one, false
to append to an existing blob.
- 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.
- Attributes
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 4 MB inclusive.
Applies to
Azure SDK for .NET