Class RegistryArtifactAsync
Instantiating an asynchronous RegistryArtifact helper.
RegistryArtifactAsync registryArtifactAsync = new ContainerRegistryClientBuilder() .endpoint(endpoint) .credential(credential) .audience(ContainerRegistryAudience.AZURE_RESOURCE_MANAGER_PUBLIC_CLOUD) .buildAsyncClient().getArtifact(repository, digest);
View this
for additional ways to construct the client.
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptiondelete()
Deletes the registry artifact with the matching digest in the givenrespository.
Deletes the tag with the matching tag name for the givenrepository
.Deletes the tag with the matching tag name for the givenrepository
.Deletes the registry artifact with the matching digest in the givenrespository.
Gets the fully qualified reference for the current instance.Gets theproperties
associated with an artifact in givenrepository
.Gets theproperties
associated with an artifact in givenrepository
.Gets the Azure Container Registry service endpoint for the current instance.Gets the repository name for the current instance.getTagProperties
(String tag) Gets the tag properties associated with a given tag in therepository
.Gets the tag properties associated with a given tag in therepository
.Fetches all the tags associated with the givenrepository
.Fetches all the tags associated with the givenrepository
.updateManifestProperties
(ArtifactManifestProperties manifestProperties) Update the propertiesArtifactManifestProperties
of the artifact with the givendigest
.updateManifestPropertiesWithResponse
(ArtifactManifestProperties manifestProperties) Update the propertiesArtifactManifestProperties
of the artifact with the givendigest
.updateTagProperties
(String tag, ArtifactTagProperties tagProperties) Update the propertiesArtifactTagProperties
of the tag with the given nametag
.updateTagPropertiesWithResponse
(String tag, ArtifactTagProperties tagProperties) Update the propertiesArtifactTagProperties
of the tag with the given nametag
..
-
Method Details
-
getRegistryEndpoint
Gets the Azure Container Registry service endpoint for the current instance.- Returns:
- The service endpoint for the current instance.
-
getFullyQualifiedReference
Gets the fully qualified reference for the current instance. The fully qualifiedName is of the form 'registryName/repositoryName@digest' or 'registryName/repositoryName:tag' based on the docker naming convention and whether tag or digest was supplied to the constructor.- Returns:
- Fully qualified reference of the current instance.
-
getRepositoryName
Gets the repository name for the current instance. Gets the repository name for the current instance.- Returns:
- Name of the repository for the current instance.
-
deleteWithResponse
Deletes the registry artifact with the matching digest in the givenrespository.
Code Samples
Delete the registry artifact.
client.deleteWithResponse().subscribe();
- Returns:
- A REST response with completion signal.
- Throws:
ClientAuthenticationException
- thrown if the client does not have access to the repository.HttpResponseException
- thrown if any other unexpected exception is returned by the service.
-
delete
Deletes the registry artifact with the matching digest in the givenrespository.
Code Samples
Delete the registry artifact.
client.delete().subscribe();
- Returns:
- the completion.
- Throws:
ClientAuthenticationException
- thrown if the client does not have access to the repository.HttpResponseException
- thrown if any other unexpected exception is returned by the service.
-
deleteTagWithResponse
Deletes the tag with the matching tag name for the givenrepository
.Code Samples
Delete the tag for the given repository.
String tag = getTag(); client.deleteTagWithResponse(tag).subscribe();
- Parameters:
tag
- The name of the 'tag' that uniquely identifies the 'tag' that needs to be deleted.- Returns:
- A REST response with completion signal.
- Throws:
ClientAuthenticationException
- thrown if the client does not have access to the repository.NullPointerException
- thrown iftag
is null.IllegalArgumentException
- thrown iftag
is empty.HttpResponseException
- thrown if any other unexpected exception is returned by the service.
-
deleteTag
Deletes the tag with the matching tag name for the givenrepository
.Code Samples
Delete the tag for the given repository.
String tag = getTag(); client.deleteTag(tag).subscribe();
- Parameters:
tag
- The name of the tag that uniquely identifies the tag that needs to be deleted.- Returns:
- The completion.
- Throws:
ClientAuthenticationException
- thrown if the client does not have access to the repository.NullPointerException
- thrown iftag
is null.IllegalArgumentException
- thrown if thetag
is empty.HttpResponseException
- thrown if any other unexpected exception is returned by the service.
-
getManifestPropertiesWithResponse
Gets theproperties
associated with an artifact in givenrepository
.This method can take in both a digest as well as a tag.
In case a tag is provided it calls the service to get the digest associated with the given tag.Code Samples
Get the properties for the given repository.
client.getManifestPropertiesWithResponse() .subscribe(response -> { final ArtifactManifestProperties properties = response.getValue(); System.out.printf("Digest:%s,", properties.getDigest()); });
- Returns:
- A REST response containing
properties
associated with the givenDigest
. - Throws:
ClientAuthenticationException
- thrown if the client does not have access to the repository.ResourceNotFoundException
- thrown if the given digest was not found.HttpResponseException
- thrown if any other unexpected exception is returned by the service.
-
getManifestProperties
Gets theproperties
associated with an artifact in givenrepository
.This method can take in both a digest as well as a tag.
In case a tag is provided it calls the service to get the digest associated with the given tag.Code Samples
Get the properties for the given repository.
client.getManifestProperties() .subscribe(properties -> { System.out.printf("Digest:%s,", properties.getDigest()); });
- Returns:
- The
properties
associated with the givenDigest
. - Throws:
ClientAuthenticationException
- thrown if the client does not have access to the repository.ResourceNotFoundException
- thrown if the given digest was not found.HttpResponseException
- thrown if any other unexpected exception is returned by the service.
-
getTagPropertiesWithResponse
Gets the tag properties associated with a given tag in therepository
.Code Samples
Retrieve the properties associated with the given tag.
String tag = getTag(); client.getTagPropertiesWithResponse(tag).subscribe(response -> { final ArtifactTagProperties properties = response.getValue(); System.out.printf("Digest:%s,", properties.getDigest()); });
- Parameters:
tag
- name of the tag that uniquely identifies a given tag.- Returns:
- A REST response with the
properties
associated with the given tag. - Throws:
ClientAuthenticationException
- thrown if the client does not have access to the repository.ResourceNotFoundException
- thrown if the given tag was not found.HttpResponseException
- thrown if any other unexpected exception is returned by the service.NullPointerException
- thrown if thetag
is null.IllegalArgumentException
- thrown if thetag
is empty.
-
getTagProperties
Gets the tag properties associated with a given tag in therepository
.Code Samples
Retrieve the properties associated with the given tag.
String tag = getTag(); client.getTagProperties(tag).subscribe(properties -> { System.out.printf("Digest:%s,", properties.getDigest()); });
- Parameters:
tag
- name of the tag that uniquely identifies a given tag.- Returns:
- The
properties
associated with the given tag. - Throws:
ClientAuthenticationException
- thrown if the client does not have access to the repository.ResourceNotFoundException
- thrown if the given tag was not found.HttpResponseException
- thrown if any other unexpected exception is returned by the service.NullPointerException
- thrown if thetag
is null.IllegalArgumentException
- thrown if thetag
is empty.
-
listTagProperties
Fetches all the tags associated with the givenrepository
.If you would like to specify the order in which the tags are returned please use the overload that takes in the options parameter
listTagProperties(ArtifactTagOrder)
listTagProperties} No assumptions on the order can be made if no options are provided to the service.Code Samples
Retrieve all the tags associated with the given repository.
client.listTagProperties().byPage(10) .subscribe(tagPropertiesPagedResponse -> { tagPropertiesPagedResponse.getValue().stream().forEach( tagProperties -> System.out.println(tagProperties.getDigest())); });
- Returns:
PagedFlux
of the artifacts for the given repository in the order specified by the options.- Throws:
ClientAuthenticationException
- thrown if the client does not have access to the repository.HttpResponseException
- thrown if any other unexpected exception is returned by the service.
-
listTagProperties
Fetches all the tags associated with the givenrepository
.The method supports options to select the order in which the tags are returned by the service. Currently the service supports an ascending or descending order based on the last updated time of the tag. No assumptions on the order can be made if no options are provided to the service.
Code Samples
Retrieve all the tags associated with the given repository from the most recently updated to the last.
client.listTagProperties(ArtifactTagOrder.LAST_UPDATED_ON_DESCENDING) .byPage(10) .subscribe(tagPropertiesPagedResponse -> { tagPropertiesPagedResponse.getValue() .stream() .forEach(tagProperties -> System.out.println(tagProperties.getDigest())); });
- Parameters:
order
- The order in which the tags should be returned by the service.- Returns:
PagedFlux
of the artifacts for the given repository in the order specified by the options.- Throws:
ClientAuthenticationException
- thrown if the client does not have access to the repository.HttpResponseException
- thrown if any other unexpected exception is returned by the service.
-
updateTagPropertiesWithResponse
public Mono<Response<ArtifactTagProperties>> updateTagPropertiesWithResponse(String tag, ArtifactTagProperties tagProperties) Update the propertiesArtifactTagProperties
of the tag with the given nametag
.. These properties set whether the given tag can be updated, deleted and retrieved.Code Samples
Update the writeable properties of a given tag.
ArtifactTagProperties properties = getTagProperties(); String tag = getTag(); client.updateTagPropertiesWithResponse(tag, properties).subscribe();
- Parameters:
tag
- Name of the tag that uniquely identifies it.tagProperties
-value
to be set.- Returns:
- A REST response for completion.
- Throws:
ClientAuthenticationException
- thrown if the client does not have access to repository.ResourceNotFoundException
- thrown if the given tag was not found.HttpResponseException
- thrown if any other unexpected exception is returned by the service.NullPointerException
- thrown if thetag
is null.IllegalArgumentException
- thrown if thetag
is empty.NullPointerException
- thrown iftagProperties
is null.
-
updateTagProperties
public Mono<ArtifactTagProperties> updateTagProperties(String tag, ArtifactTagProperties tagProperties) Update the propertiesArtifactTagProperties
of the tag with the given nametag
. These properties set whether the given tag can be updated, deleted and retrieved.Code Samples
Update the writeable properties of a given tag.
ArtifactTagProperties properties = getTagProperties(); String tag = getTag(); client.updateTagPropertiesWithResponse(tag, properties).subscribe();
- Parameters:
tag
- Name of the tag that uniquely identifies it.tagProperties
-tagProperties
to be set.- Returns:
- The completion.
- Throws:
ClientAuthenticationException
- thrown if the client does not have access to repository.ResourceNotFoundException
- thrown if the given tag was not found.HttpResponseException
- thrown if any other unexpected exception is returned by the service.NullPointerException
- thrown if thetag
is null.IllegalArgumentException
- thrown if thetag
is empty.NullPointerException
- thrown iftagProperties
is null.
-
updateManifestPropertiesWithResponse
public Mono<Response<ArtifactManifestProperties>> updateManifestPropertiesWithResponse(ArtifactManifestProperties manifestProperties) Update the propertiesArtifactManifestProperties
of the artifact with the givendigest
. These properties set whether the given manifest can be updated, deleted and retrieved.Code Samples
Update the writeable properties of a given manifest.
ArtifactManifestProperties properties = getArtifactManifestProperties(); client.updateManifestPropertiesWithResponse(properties).subscribe();
- Parameters:
manifestProperties
-manifestProperties
to be set.- Returns:
- A REST response for the completion.
- Throws:
ClientAuthenticationException
- thrown if the client does not have access to repository.ResourceNotFoundException
- thrown if the given digest was not found.HttpResponseException
- thrown if any other unexpected exception is returned by the service.NullPointerException
- thrown if themanifestProperties
is null.
-
updateManifestProperties
public Mono<ArtifactManifestProperties> updateManifestProperties(ArtifactManifestProperties manifestProperties) Update the propertiesArtifactManifestProperties
of the artifact with the givendigest
. These properties set whether the given manifest can be updated, deleted and retrieved.Code Samples
Update the writeable properties of a given manifest.
ArtifactManifestProperties properties = getArtifactManifestProperties(); client.updateManifestProperties(properties).subscribe();
- Parameters:
manifestProperties
-manifestProperties
to be set.- Returns:
- The completion.
- Throws:
ClientAuthenticationException
- thrown if the client does not have access to repository.ResourceNotFoundException
- thrown if the given digest was not found.HttpResponseException
- thrown if any other unexpected exception is returned by the service.NullPointerException
- thrown if themanifestProperties
is null.
-