다음을 통해 공유


BlockBlobClient.CommitBlockList Method

Definition

The CommitBlockList(IEnumerable<String>, CommitBlockListOptions, CancellationToken) operation writes a blob by specifying the list of block IDs that make up the blob. In order to be written as part of a blob, a block must have been successfully written to the server in a prior Azure.Storage.Blobs.Specialized.BlockBlobClient.StageBlock(System.String,System.IO.Stream,System.Byte[],Azure.Storage.Blobs.Models.BlobRequestConditions,System.IProgress{System.Int64},System.Threading.CancellationToken) operation. You can call CommitBlockList(IEnumerable<String>, CommitBlockListOptions, CancellationToken) to update a blob by uploading only those blocks that have changed, then committing the new and existing blocks together. You can do this by specifying whether to commit a block from the committed block list or from the uncommitted block list, or to commit the most recently uploaded version of the block, whichever list it may belong to. Any blocks not specified in the block list and permanently deleted.

For more information, see Put Block List.

public virtual Azure.Response<Azure.Storage.Blobs.Models.BlobContentInfo> CommitBlockList (System.Collections.Generic.IEnumerable<string> base64BlockIds, Azure.Storage.Blobs.Models.CommitBlockListOptions options, System.Threading.CancellationToken cancellationToken = default);
abstract member CommitBlockList : seq<string> * Azure.Storage.Blobs.Models.CommitBlockListOptions * System.Threading.CancellationToken -> Azure.Response<Azure.Storage.Blobs.Models.BlobContentInfo>
override this.CommitBlockList : seq<string> * Azure.Storage.Blobs.Models.CommitBlockListOptions * System.Threading.CancellationToken -> Azure.Response<Azure.Storage.Blobs.Models.BlobContentInfo>
Public Overridable Function CommitBlockList (base64BlockIds As IEnumerable(Of String), options As CommitBlockListOptions, Optional cancellationToken As CancellationToken = Nothing) As Response(Of BlobContentInfo)

Parameters

base64BlockIds
IEnumerable<String>

Specify the Uncommitted Base64 encoded block IDs to indicate that the blob service should search only the uncommitted block list for the named blocks. If the block is not found in the uncommitted block list, it will not be written as part of the blob, and a RequestFailedException will be thrown.

options
CommitBlockListOptions

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 block blob.

Remarks

A RequestFailedException will be thrown if a failure occurs.

Applies to