Share via


ContainerRegistryContentClient.DownloadBlobStreamingAsync Method

Definition

Downloads a blob from the registry.

public virtual System.Threading.Tasks.Task<Azure.Response<Azure.Containers.ContainerRegistry.DownloadRegistryBlobStreamingResult>> DownloadBlobStreamingAsync (string digest, System.Threading.CancellationToken cancellationToken = default);
abstract member DownloadBlobStreamingAsync : string * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.Response<Azure.Containers.ContainerRegistry.DownloadRegistryBlobStreamingResult>>
override this.DownloadBlobStreamingAsync : string * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.Response<Azure.Containers.ContainerRegistry.DownloadRegistryBlobStreamingResult>>
Public Overridable Function DownloadBlobStreamingAsync (digest As String, Optional cancellationToken As CancellationToken = Nothing) As Task(Of Response(Of DownloadRegistryBlobStreamingResult))

Parameters

digest
String

The digest of the blob to download.

cancellationToken
CancellationToken

The cancellation token to use.

Returns

A Response<T> describing the downloaded blob. Content contains the blob's data.

Exceptions

If digest is null.

Thrown when a failure is returned by the Container Registry service.

Remarks

This API gives access directly to network stream that should be disposed after usage. Consider the following alternatives:

  • DownloadContent: as a prefered way of downloading small blobs that can fit into memory
  • DownloadTo: to stream blob content to a path or a Stream

Applies to