ContainerRegistryContentClient class

The Azure Container Registry blob client, responsible for uploading and downloading blobs and manifests, the building blocks of artifacts.

Constructors

ContainerRegistryContentClient(string, string, TokenCredential, ContainerRegistryContentClientOptions)

Creates an instance of a ContainerRegistryContentClient for managing container images and artifacts.

Example usage:

import { ContainerRegistryContentClient } from "@azure/container-registry";
import { DefaultAzureCredential} from "@azure/identity";

const client = new ContainerRegistryContentClient(
   "<container registry API endpoint>",
   "<repository name>",
   new DefaultAzureCredential()
);

Properties

endpoint

The Azure Container Registry endpoint.

repositoryName

The name of the repository that logically groups the artifact parts.

Methods

deleteBlob(string, DeleteBlobOptions)

Delete a blob.

deleteManifest(string, DeleteManifestOptions)

Delete a manifest. Doing so effectively deletes an artifact from the registry.

downloadBlob(string, DownloadBlobOptions)

Download a blob that is part of an artifact.

getManifest(string, GetManifestOptions)

Downloads the manifest for an OCI artifact.

setManifest(Buffer | ReadableStream | OciImageManifest | Record<string, unknown>, SetManifestOptions)

Upload a manifest for an OCI artifact.

uploadBlob(Buffer | ReadableStream, UploadBlobOptions)

Upload an artifact blob.

Constructor Details

ContainerRegistryContentClient(string, string, TokenCredential, ContainerRegistryContentClientOptions)

Creates an instance of a ContainerRegistryContentClient for managing container images and artifacts.

Example usage:

import { ContainerRegistryContentClient } from "@azure/container-registry";
import { DefaultAzureCredential} from "@azure/identity";

const client = new ContainerRegistryContentClient(
   "<container registry API endpoint>",
   "<repository name>",
   new DefaultAzureCredential()
);
new ContainerRegistryContentClient(endpoint: string, repositoryName: string, credential: TokenCredential, options?: ContainerRegistryContentClientOptions)

Parameters

endpoint

string

the URL endpoint of the container registry

repositoryName

string

the name of the repository that logically groups the artifact parts

credential
TokenCredential

used to authenticate requests to the service

options
ContainerRegistryContentClientOptions

optional configuration used to send requests to the service

Property Details

endpoint

The Azure Container Registry endpoint.

endpoint: string

Property Value

string

repositoryName

The name of the repository that logically groups the artifact parts.

repositoryName: string

Property Value

string

Method Details

deleteBlob(string, DeleteBlobOptions)

Delete a blob.

function deleteBlob(digest: string, options?: DeleteBlobOptions): Promise<void>

Parameters

digest

string

the digest of the blob to delete

options
DeleteBlobOptions

optional configuration used to send requests to the service

Returns

Promise<void>

deleteManifest(string, DeleteManifestOptions)

Delete a manifest. Doing so effectively deletes an artifact from the registry.

function deleteManifest(digest: string, options?: DeleteManifestOptions): Promise<void>

Parameters

digest

string

the digest of the manifest to delete

options
DeleteManifestOptions

optional configuration used to send requests to the service

Returns

Promise<void>

downloadBlob(string, DownloadBlobOptions)

Download a blob that is part of an artifact.

function downloadBlob(digest: string, options?: DownloadBlobOptions): Promise<DownloadBlobResult>

Parameters

digest

string

the digest of the blob to download

options
DownloadBlobOptions

optional configuration used to send requests to the service

Returns

  • the downloaded blob

getManifest(string, GetManifestOptions)

Downloads the manifest for an OCI artifact.

function getManifest(tagOrDigest: string, options?: GetManifestOptions): Promise<GetManifestResult>

Parameters

tagOrDigest

string

a tag or digest that identifies the artifact

Returns

  • the downloaded manifest.

setManifest(Buffer | ReadableStream | OciImageManifest | Record<string, unknown>, SetManifestOptions)

Upload a manifest for an OCI artifact.

function setManifest(manifest: Buffer | ReadableStream | OciImageManifest | Record<string, unknown>, options?: SetManifestOptions): Promise<SetManifestResult>

Parameters

manifest

Buffer | ReadableStream | OciImageManifest | Record<string, unknown>

the manifest to upload.

Returns

uploadBlob(Buffer | ReadableStream, UploadBlobOptions)

Upload an artifact blob.

function uploadBlob(blob: Buffer | ReadableStream, options?: UploadBlobOptions): Promise<UploadBlobResult>

Parameters

blob

Buffer | ReadableStream

Returns

Promise<UploadBlobResult>