Class ContainerRegistryBlobAsyncClient

java.lang.Object
com.azure.containers.containerregistry.specialized.ContainerRegistryBlobAsyncClient

public final class ContainerRegistryBlobAsyncClient extends Object
This class provides a client that exposes operations to push and pull images into container registry. It exposes methods that upload, download and delete artifacts from the registry i.e. images and manifests.

View this for additional ways to construct the client.

See Also:
  • Method Details

    • getRepositoryName

      public String getRepositoryName()
      This method returns the registry's repository on which operations are being performed.
      Returns:
      The name of the repository
    • getEndpoint

      public String getEndpoint()
      This method returns the complete registry endpoint.
      Returns:
      The registry endpoint including the authority.
    • uploadManifest

      public Mono<UploadManifestResult> uploadManifest(OciImageManifest manifest)
      Upload the Oci manifest to the repository. The upload is done as a single operation.
      Parameters:
      manifest - The OciManifest that needs to be uploaded.
      Returns:
      operation result.
      Throws:
      com.azure.core.exception.ClientAuthenticationException - thrown if the client's credentials do not have access to modify the namespace.
      NullPointerException - thrown if the manifest is null.
      See Also:
    • uploadManifest

      public Mono<UploadManifestResult> uploadManifest(UploadManifestOptions options)
      Uploads a manifest to the repository. The client currently only supports uploading OciManifests to the repository. And this operation makes the assumption that the data provided is a valid OCI manifest.

      Also, the data is read into memory and then an upload operation is performed as a single operation.

      Parameters:
      options - The options for the upload manifest operation.
      Returns:
      operation result.
      Throws:
      com.azure.core.exception.ClientAuthenticationException - thrown if the client's credentials do not have access to modify the namespace.
      NullPointerException - thrown if the data is null.
      See Also:
    • uploadManifestWithResponse

      public Mono<com.azure.core.http.rest.Response<UploadManifestResult>> uploadManifestWithResponse(UploadManifestOptions options)
      Uploads a manifest to the repository. The client currently only supports uploading OciManifests to the repository. And this operation makes the assumption that the data provided is a valid OCI manifest.

      Also, the data is read into memory and then an upload operation is performed as a single operation.

      Parameters:
      options - The options for the upload manifest operation.
      Returns:
      The rest response containing the operation result.
      Throws:
      com.azure.core.exception.ClientAuthenticationException - thrown if the client's credentials do not have access to modify the namespace.
      NullPointerException - thrown if the data is null.
      See Also:
    • uploadBlob

      public Mono<UploadBlobResult> uploadBlob(com.azure.core.util.BinaryData data)
      Uploads a blob to the repository. The client currently uploads the entire blob\layer as a single unit.

      The blob is read into memory and then an upload operation is performed as a single operation. We currently do not support breaking the layer into multiple chunks and uploading them one at a time

      Parameters:
      data - The blob\image content that needs to be uploaded.
      Returns:
      The operation result.
      Throws:
      com.azure.core.exception.ClientAuthenticationException - thrown if the client's credentials do not have access to modify the namespace.
      NullPointerException - thrown if the data is null.
    • uploadBlob

      public Mono<UploadBlobResult> uploadBlob(Flux<ByteBuffer> data)
      Uploads a blob to the repository. The client currently uploads the entire blob\layer as a single unit.

      The blob is read into memory and then an upload operation is performed as a single operation. We currently do not support breaking the layer into multiple chunks and uploading them one at a time

      Parameters:
      data - The blob\image content that needs to be uploaded.
      Returns:
      The rest response containing the operation result.
      Throws:
      com.azure.core.exception.ClientAuthenticationException - thrown if the client's credentials do not have access to modify the namespace.
      NullPointerException - thrown if the data is null.
    • downloadManifest

      public Mono<DownloadManifestResult> downloadManifest(String tagOrDigest)
      Download the manifest associated with the given tag or digest. We currently only support downloading OCI manifests.
      Parameters:
      tagOrDigest - Manifest reference which can be tag or digest.
      Returns:
      The manifest associated with the given tag or digest.
      Throws:
      com.azure.core.exception.ClientAuthenticationException - thrown if the client's credentials do not have access to modify the namespace.
      NullPointerException - thrown if the tagOrDigest is null.
      See Also:
    • downloadManifestWithResponse

      public Mono<com.azure.core.http.rest.Response<DownloadManifestResult>> downloadManifestWithResponse(String tagOrDigest, Collection<ManifestMediaType> mediaTypes)
      Download the manifest associated with the given tag or digest. We currently only support downloading OCI manifests.
      Parameters:
      tagOrDigest - Manifest reference which can be tag or digest.
      mediaTypes - List of ManifestMediaType to request.
      Returns:
      The response for the manifest associated with the given tag or digest.
      Throws:
      com.azure.core.exception.ClientAuthenticationException - thrown if the client's credentials do not have access to modify the namespace.
      NullPointerException - thrown if the tagOrDigest is null.
      See Also:
    • downloadStream

      public Mono<DownloadBlobAsyncResult> downloadStream(String digest)
      Download the blob\layer associated with the given digest.
      Parameters:
      digest - The digest for the given image layer.
      Returns:
      The image associated with the given digest.
      Throws:
      com.azure.core.exception.ClientAuthenticationException - thrown if the client's credentials do not have access to modify the namespace.
      NullPointerException - thrown if the digest is null.
    • deleteBlob

      public Mono<Void> deleteBlob(String digest)
      Delete the image associated with the given digest
      Parameters:
      digest - The digest for the given image layer.
      Returns:
      The completion signal.
      Throws:
      com.azure.core.exception.ClientAuthenticationException - thrown if the client's credentials do not have access to modify the namespace.
      NullPointerException - thrown if the digest is null.
    • deleteBlobWithResponse

      public Mono<com.azure.core.http.rest.Response<Void>> deleteBlobWithResponse(String digest)
      Delete the image associated with the given digest
      Parameters:
      digest - The digest for the given image layer.
      Returns:
      The REST response for the completion.
      Throws:
      com.azure.core.exception.ClientAuthenticationException - thrown if the client's credentials do not have access to modify the namespace.
      NullPointerException - thrown if the digest is null.
    • deleteManifest

      public Mono<Void> deleteManifest(String digest)
      Delete the manifest associated with the given digest. We currently only support downloading OCI manifests.
      Parameters:
      digest - The digest of the manifest.
      Returns:
      The completion.
      Throws:
      com.azure.core.exception.ClientAuthenticationException - thrown if the client's credentials do not have access to modify the namespace.
      NullPointerException - thrown if the digest is null.
      See Also:
    • deleteManifestWithResponse

      public Mono<com.azure.core.http.rest.Response<Void>> deleteManifestWithResponse(String digest)
      Delete the manifest associated with the given digest. We currently only support downloading OCI manifests.
      Parameters:
      digest - The digest of the manifest.
      Returns:
      The REST response for completion.
      Throws:
      com.azure.core.exception.ClientAuthenticationException - thrown if the client's credentials do not have access to modify the namespace.
      NullPointerException - thrown if the digest is null.
      See Also: