BlockBlobClient.GetBlockListAsync 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.
The GetBlockListAsync(BlockListTypes, String, BlobRequestConditions, CancellationToken) operation operation retrieves the list of blocks that have been uploaded as part of a block blob. There are two block lists maintained for a blob. The Committed Block list has blocks that have been successfully committed to a given blob with CommitBlockListAsync(IEnumerable<String>, CommitBlockListOptions, CancellationToken). The Uncommitted Block list has blocks that have been uploaded for a blob using Azure.Storage.Blobs.Specialized.BlockBlobClient.StageBlockAsync(System.String,System.IO.Stream,System.Byte[],Azure.Storage.Blobs.Models.BlobRequestConditions,System.IProgress{System.Int64},System.Threading.CancellationToken), but that have not yet been committed. These blocks are stored in Azure in association with a blob, but do not yet form part of the blob.
public virtual System.Threading.Tasks.Task<Azure.Response<Azure.Storage.Blobs.Models.BlockList>> GetBlockListAsync (Azure.Storage.Blobs.Models.BlockListTypes blockListTypes = Azure.Storage.Blobs.Models.BlockListTypes.All, string snapshot = default, Azure.Storage.Blobs.Models.BlobRequestConditions conditions = default, System.Threading.CancellationToken cancellationToken = default);
abstract member GetBlockListAsync : Azure.Storage.Blobs.Models.BlockListTypes * string * Azure.Storage.Blobs.Models.BlobRequestConditions * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.Response<Azure.Storage.Blobs.Models.BlockList>>
override this.GetBlockListAsync : Azure.Storage.Blobs.Models.BlockListTypes * string * Azure.Storage.Blobs.Models.BlobRequestConditions * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.Response<Azure.Storage.Blobs.Models.BlockList>>
Public Overridable Function GetBlockListAsync (Optional blockListTypes As BlockListTypes = Azure.Storage.Blobs.Models.BlockListTypes.All, Optional snapshot As String = Nothing, Optional conditions As BlobRequestConditions = Nothing, Optional cancellationToken As CancellationToken = Nothing) As Task(Of Response(Of BlockList))
Parameters
- blockListTypes
- BlockListTypes
Specifies whether to return the list of committed blocks, the list of uncommitted blocks, or both lists together. If you omit this parameter, Get Block List returns the list of committed blocks.
- snapshot
- String
Optionally specifies the blob snapshot to retrieve the block list from. For more information on working with blob snapshots, see Create a snapshot of a blob.
- conditions
- BlobRequestConditions
Optional BlobRequestConditions to add conditions on retrieving the block list.
- cancellationToken
- CancellationToken
Optional CancellationToken to propagate notifications that the operation should be cancelled.
Returns
A Response<T> describing requested block list.
Remarks
A RequestFailedException will be thrown if a failure occurs.