Share via


ContainerRegistryContentClient.DownloadBlobContentAsync Method

Definition

Download a container registry blob. This API is a prefered way to fetch blobs that can fit into memory. The content is provided as BinaryData, which provides a lightweight abstraction for a payload of bytes. It provides convenient helper methods to get out commonly used primitives, such as streams, strings, or bytes. To download a blob that does not fit in memory, consider using the DownloadBlobToAsync(String, Stream, CancellationToken) method instead.

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

Parameters

digest
String

The digest of the blob to download.

cancellationToken
CancellationToken

The cancellation token to use.

Returns

The result of the download blob content operation.

Exceptions

If digest is null.

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

Applies to