Class ContainerRegistryBlobClient
- java.lang.Object
-
- com.azure.containers.containerregistry.specialized.ContainerRegistryBlobClient
-
public class ContainerRegistryBlobClient 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:
ContainerRegistryBlobClientBuilder
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
deleteBlob(String digest)
Delete the image associated with the given digestcom.azure.core.http.rest.Response<Void>
deleteBlobWithResponse(String digest, com.azure.core.util.Context context)
Delete the image associated with the given digestvoid
deleteManifest(String digest)
Delete the manifest associated with the given digest.com.azure.core.http.rest.Response<Void>
deleteManifestWithResponse(String digest, com.azure.core.util.Context context)
Delete the manifest associated with the given digest.DownloadBlobResult
downloadBlob(String digest)
Download the blob associated with the given digest.com.azure.core.http.rest.Response<DownloadBlobResult>
downloadBlobWithResponse(String digest, com.azure.core.util.Context context)
Download the blob\layer associated with the given digest.DownloadManifestResult
downloadManifest(DownloadManifestOptions options)
Download the manifest associated with the given tag or digest.com.azure.core.http.rest.Response<DownloadManifestResult>
downloadManifestWithResponse(DownloadManifestOptions options, com.azure.core.util.Context context)
Download the manifest associated with the given tag or digest.String
getEndpoint()
This method returns the complete registry endpoint.String
getRepositoryName()
This method returns the registry's repository on which operations are being performed.UploadBlobResult
uploadBlob(com.azure.core.util.BinaryData data)
Uploads a blob to the repository.com.azure.core.http.rest.Response<UploadBlobResult>
uploadBlobWithResponse(com.azure.core.util.BinaryData data, com.azure.core.util.Context context)
Uploads a blob to the repository.UploadManifestResult
uploadManifest(OciManifest manifest)
Upload the Oci manifest to the repository.UploadManifestResult
uploadManifest(UploadManifestOptions options)
Uploads a manifest to the repository.com.azure.core.http.rest.Response<UploadManifestResult>
uploadManifestWithResponse(UploadManifestOptions options, com.azure.core.util.Context context)
Uploads a manifest to the repository.
-
-
-
Method Detail
-
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 UploadManifestResult uploadManifest(OciManifest manifest)
Upload the Oci manifest to the repository. The upload is done as a single operation.- Parameters:
manifest
- The OciManifest that needs to be updated.- 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 themanifest
is null.- See Also:
- Oci Manifest Specification
-
uploadManifest
public 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:
- 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 thedata
is null.- See Also:
- Oci Manifest Specification
-
uploadManifestWithResponse
public com.azure.core.http.rest.Response<UploadManifestResult> uploadManifestWithResponse(UploadManifestOptions options, com.azure.core.util.Context context)
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.context
- Additional context that is passed through the Http pipeline during the service call.- 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 thedata
is null.- See Also:
- Oci Manifest Specification
-
uploadBlob
public 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.Also, 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 thedata
is null.
-
uploadBlobWithResponse
public com.azure.core.http.rest.Response<UploadBlobResult> uploadBlobWithResponse(com.azure.core.util.BinaryData data, com.azure.core.util.Context context)
Uploads a blob to the repository. The client currently uploads the entire blob\layer as a single unit.Also, 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 The service does support this via range header.
- Parameters:
data
- The blob\image content that needs to be uploaded.context
- Additional context that is passed through the Http pipeline during the service call.- 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 thedata
is null.
-
downloadManifest
public DownloadManifestResult downloadManifest(DownloadManifestOptions options)
Download the manifest associated with the given tag or digest. We currently only support downloading OCI manifests.- Parameters:
options
- Options for the operation.- 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 thetagOrDigest
is null.- See Also:
- Oci Manifest Specification
-
downloadManifestWithResponse
public com.azure.core.http.rest.Response<DownloadManifestResult> downloadManifestWithResponse(DownloadManifestOptions options, com.azure.core.util.Context context)
Download the manifest associated with the given tag or digest. We currently only support downloading OCI manifests.- Parameters:
options
- Options for the operation.context
- Additional context that is passed through the Http pipeline during the service call.- 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 thetagOrDigest
is null.- See Also:
- Oci Manifest Specification
-
downloadBlob
public DownloadBlobResult downloadBlob(String digest)
Download the blob 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 thedigest
is null.
-
downloadBlobWithResponse
public com.azure.core.http.rest.Response<DownloadBlobResult> downloadBlobWithResponse(String digest, com.azure.core.util.Context context)
Download the blob\layer associated with the given digest.- Parameters:
digest
- The digest for the given image layer.context
- Additional context that is passed through the Http pipeline during the service call.- 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 thedigest
is null.
-
deleteBlob
public void deleteBlob(String digest)
Delete the image associated with the given digest- Parameters:
digest
- The digest for the given image layer.- Throws:
com.azure.core.exception.ClientAuthenticationException
- thrown if the client's credentials do not have access to modify the namespace.NullPointerException
- thrown if thedigest
is null.
-
deleteBlobWithResponse
public com.azure.core.http.rest.Response<Void> deleteBlobWithResponse(String digest, com.azure.core.util.Context context)
Delete the image associated with the given digest- Parameters:
digest
- The digest for the given image layer.context
- Additional context that is passed through the Http pipeline during the service call.- 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 thedigest
is null.
-
deleteManifest
public 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.- Throws:
com.azure.core.exception.ClientAuthenticationException
- thrown if the client's credentials do not have access to modify the namespace.NullPointerException
- thrown if thedigest
is null.- See Also:
- Oci Manifest Specification
-
deleteManifestWithResponse
public com.azure.core.http.rest.Response<Void> deleteManifestWithResponse(String digest, com.azure.core.util.Context context)
Delete the manifest associated with the given digest. We currently only support downloading OCI manifests.- Parameters:
digest
- The digest of the manifest.context
- Additional context that is passed through the Http pipeline during the service call.- 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 thedigest
is null.- See Also:
- Oci Manifest Specification
-
-