CloudBlockBlob.BeginPutBlockList Method (IEnumerable, BlobRequestOptions, AsyncCallback, Object)

Storage Client Library NET API

[This topic is part of the Microsoft Azure Storage Client Library 1.7, which has been deprecated. See Storage Client Library for the latest version.]

Begins an asynchronous operation to upload a list of blocks to a new or existing blob, using a conditional request based on the BlobRequestOptions specified.

Namespace: Microsoft.WindowsAzure.StorageClient
Assembly: Microsoft.WindowsAzure.StorageClient (in Microsoft.WindowsAzure.StorageClient.dll)

Usage

Visual Basic
Dim instance As CloudBlockBlob
Dim blockList As IEnumerable(Of String)
Dim options As BlobRequestOptions
Dim callback As AsyncCallback
Dim state As Object
Dim returnValue As IAsyncResult

returnValue = instance.BeginPutBlockList(blockList, options, callback, state)

Syntax

Visual Basic
Public Function BeginPutBlockList ( _
	blockList As IEnumerable(Of String), _
	options As BlobRequestOptions, _
	callback As AsyncCallback, _
	state As Object _
) As IAsyncResult
C#
public IAsyncResult BeginPutBlockList (
	IEnumerable<string> blockList,
	BlobRequestOptions options,
	AsyncCallback callback,
	Object state
)
C++
public:
IAsyncResult^ BeginPutBlockList (
	IEnumerable<String^>^ blockList, 
	BlobRequestOptions^ options, 
	AsyncCallback^ callback, 
	Object^ state
)
J#
JScript

Parameters

blockList

Type: System.Collections.Generic.IEnumerable

An enumerable collection of block IDs, as base64-encoded strings.

options

Type: Microsoft.WindowsAzure.StorageClient.BlobRequestOptions

An object that specifies any additional options for the request.

callback

Type: System.AsyncCallback

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

state

Type: System.Object

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

Return Value

Type: System.IAsyncResult

An IAsyncResult that references the asynchronous operation.

Remarks

The BeginPutBlockList method begins an operation to write to 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 service using BeginPutBlock.

By calling BeginPutBlockList, you can modify an existing blob by inserting, updating, or deleting individual blocks, without uploading the whole blob again. You can specify block IDs from both the current committed block list and the uncommitted block list to create a new blob or update the content of an existing blob. In this way you can update a blob by specifying a few new blocks from the uncommitted block list, and the rest from the committed block list, which are already part of the existing blob.

The maximum number of blocks that may be committed is 50,000, and the maximum size of a blob that may be committed via BeginPutBlockList is 200 GB. The maximum number of uncommitted blocks that may be associated with a blob is 100,000, and the maximum size of the uncommitted block list is 400 GB.

When you call BeginPutBlockList to update an existing blob, the blob's existing properties and metadata are overwritten. However, any existing snapshots are retained with the blob. You can use include an access condition to perform the operation only if a specified condition is met.

If BeginPutBlockList fails due to a missing block, you will need to upload the missing block.

Any uncommitted blocks will be garbage collected if there are no successful calls to upload a block or commit the block list within a week following the last successful block upload. If the blob's contents are modified in some other way, any uncommitted blocks will be garbage collected.


Thread Safety

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Platforms

Development Platforms

Windows Vista, Windows 7, Windows Server 2008, Windows 8.1, Windows Server 2012 R2, Windows 8 and Windows Server 2012

See Also