Sdílet prostřednictvím


AppendBlobClient.AppendBlockAsync Method

Definition

The AppendBlockAsync(Stream, AppendBlobAppendBlockOptions, CancellationToken) operation commits a new block of data, represented by the contentStream, to the end of the existing append blob. The AppendBlockAsync(Stream, AppendBlobAppendBlockOptions, CancellationToken) operation is only permitted if the blob was created as an append blob.

For more information, see Append Block.

public virtual System.Threading.Tasks.Task<Azure.Response<Azure.Storage.Blobs.Models.BlobAppendInfo>> AppendBlockAsync (System.IO.Stream content, Azure.Storage.Blobs.Models.AppendBlobAppendBlockOptions options = default, System.Threading.CancellationToken cancellationToken = default);
abstract member AppendBlockAsync : System.IO.Stream * Azure.Storage.Blobs.Models.AppendBlobAppendBlockOptions * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.Response<Azure.Storage.Blobs.Models.BlobAppendInfo>>
override this.AppendBlockAsync : System.IO.Stream * Azure.Storage.Blobs.Models.AppendBlobAppendBlockOptions * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.Response<Azure.Storage.Blobs.Models.BlobAppendInfo>>
Public Overridable Function AppendBlockAsync (content As Stream, Optional options As AppendBlobAppendBlockOptions = Nothing, Optional cancellationToken As CancellationToken = Nothing) As Task(Of Response(Of BlobAppendInfo))

Parameters

content
Stream

A Stream containing the content of the block to append.

options
AppendBlobAppendBlockOptions

Optional parameters.

cancellationToken
CancellationToken

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

Returns

A Response<T> describing the state of the updated append blob.

Remarks

A RequestFailedException will be thrown if a failure occurs.

Applies to