ContainerRegistryContentClient class
The Azure Container Registry blob client, responsible for uploading and downloading blobs and manifests, the building blocks of artifacts.
Constructors
Container |
Creates an instance of a ContainerRegistryContentClient for managing container images and artifacts. Example usage:
|
Properties
endpoint | The Azure Container Registry endpoint. |
repository |
The name of the repository that logically groups the artifact parts. |
Methods
delete |
Delete a blob. |
delete |
Delete a manifest. Doing so effectively deletes an artifact from the registry. |
download |
Download a blob that is part of an artifact. |
get |
Downloads the manifest for an OCI artifact. |
set |
Upload a manifest for an OCI artifact. |
upload |
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
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
Promise<DownloadBlobResult>
- 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
- options
- GetManifestOptions
Returns
Promise<GetManifestResult>
- 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.
- options
- SetManifestOptions
Returns
Promise<SetManifestResult>
uploadBlob(Buffer | ReadableStream, UploadBlobOptions)
Upload an artifact blob.
function uploadBlob(blob: Buffer | ReadableStream, options?: UploadBlobOptions): Promise<UploadBlobResult>
Parameters
- blob
-
Buffer | ReadableStream
- options
- UploadBlobOptions
Returns
Promise<UploadBlobResult>