public final class RegistryArtifactAsync extends Object
Instantiating an asynchronous RegistryArtifact helper.
RegistryArtifactAsync
registryArtifactAsync = newContainerRegistryClientBuilder
() .endpoint(endpoint) .credential(credential) .buildAsyncClient().getArtifact(repository, digest);
View this
for additional ways to construct the client.
ContainerRegistryClientBuilder
Modifier and Type | Method and Description |
---|---|
Mono<Void> |
delete()
Deletes the registry artifact with the matching digest in the given
respository. |
Mono<Void> |
deleteTag(String tag)
Deletes the tag with the matching tag name for the given
repository . |
Mono<com.azure.core.http.rest.Response<Void>> |
deleteTagWithResponse(String tag)
Deletes the tag with the matching tag name for the given
repository . |
Mono<com.azure.core.http.rest.Response<Void>> |
deleteWithResponse()
Deletes the registry artifact with the matching digest in the given
respository. |
String |
getFullyQualifiedReference()
Gets the fully qualified reference for the current instance.
|
Mono<ArtifactManifestProperties> |
getManifestProperties()
Gets the
properties associated with an artifact in given repository . |
Mono<com.azure.core.http.rest.Response<ArtifactManifestProperties>> |
getManifestPropertiesWithResponse()
Gets the
properties associated with an artifact in given repository . |
String |
getRegistryEndpoint()
Gets the Azure Container Registry service endpoint for the current instance.
|
String |
getRepositoryName()
Gets the repository name for the current instance.
|
Mono<ArtifactTagProperties> |
getTagProperties(String tag)
Gets the tag properties associated with a given tag in the
repository . |
Mono<com.azure.core.http.rest.Response<ArtifactTagProperties>> |
getTagPropertiesWithResponse(String tag)
Gets the tag properties associated with a given tag in the
repository . |
com.azure.core.http.rest.PagedFlux<ArtifactTagProperties> |
listTagProperties()
Fetches all the tags associated with the given
repository . |
com.azure.core.http.rest.PagedFlux<ArtifactTagProperties> |
listTagProperties(ArtifactTagOrderBy orderBy)
Fetches all the tags associated with the given
repository . |
Mono<ArtifactManifestProperties> |
updateManifestProperties(ArtifactManifestProperties manifestProperties)
Update the properties
ArtifactManifestProperties of the artifact with the given digest . |
Mono<com.azure.core.http.rest.Response<ArtifactManifestProperties>> |
updateManifestPropertiesWithResponse(ArtifactManifestProperties manifestProperties)
Update the properties
ArtifactManifestProperties of the artifact with the given digest . |
Mono<ArtifactTagProperties> |
updateTagProperties(String tag,
ArtifactTagProperties tagProperties)
Update the properties
ArtifactTagProperties of the tag with the given name tag . |
Mono<com.azure.core.http.rest.Response<ArtifactTagProperties>> |
updateTagPropertiesWithResponse(String tag,
ArtifactTagProperties tagProperties)
Update the properties
ArtifactTagProperties of the tag with the given name tag .. |
public String getRegistryEndpoint()
public String getFullyQualifiedReference()
public String getRepositoryName()
public Mono<com.azure.core.http.rest.Response<Void>> deleteWithResponse()
respository.
Code Samples
Delete the registry artifact.
client.deleteWithResponse().subscribe();
com.azure.core.exception.ClientAuthenticationException
- thrown if the client does not have access to the repository.com.azure.core.exception.HttpResponseException
- thrown if any other unexpected exception is returned by the service.public Mono<Void> delete()
respository.
Code Samples
Delete the registry artifact.
client.delete().subscribe();
com.azure.core.exception.ClientAuthenticationException
- thrown if the client does not have access to the repository.com.azure.core.exception.HttpResponseException
- thrown if any other unexpected exception is returned by the service.public Mono<com.azure.core.http.rest.Response<Void>> deleteTagWithResponse(String tag)
repository
.
Code Samples
Delete the tag for the given repository.
String
tag = getTag();
client.deleteTagWithResponse(tag).subscribe();
tag
- The name of the 'tag' that uniquely identifies the 'tag' that needs to be deleted.com.azure.core.exception.ClientAuthenticationException
- thrown if the client does not have access to the repository.NullPointerException
- thrown if tag
is null.IllegalArgumentException
- thrown if tag
is empty.com.azure.core.exception.HttpResponseException
- thrown if any other unexpected exception is returned by the service.public Mono<Void> deleteTag(String tag)
repository
.
Code Samples
Delete the tag for the given repository.
String
tag = getTag();
client.deleteTag(tag).subscribe();
tag
- The name of the tag that uniquely identifies the tag that needs to be deleted.com.azure.core.exception.ClientAuthenticationException
- thrown if the client does not have access to the repository.NullPointerException
- thrown if tag
is null.IllegalArgumentException
- thrown if the tag
is empty.com.azure.core.exception.HttpResponseException
- thrown if any other unexpected exception is returned by the service.public Mono<com.azure.core.http.rest.Response<ArtifactManifestProperties>> getManifestPropertiesWithResponse()
properties
associated with an artifact in given repository
.
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 -> { finalArtifactManifestProperties
properties = response.getValue();System
.out.printf("Digest:%s,", properties.getDigest()); });
properties
associated with the given Digest
.com.azure.core.exception.ClientAuthenticationException
- thrown if the client does not have access to the repository.com.azure.core.exception.ResourceNotFoundException
- thrown if the given digest was not found.com.azure.core.exception.HttpResponseException
- thrown if any other unexpected exception is returned by the service.public Mono<ArtifactManifestProperties> getManifestProperties()
properties
associated with an artifact in given repository
.
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());
});
.properties
associated with the given Digest
.com.azure.core.exception.ClientAuthenticationException
- thrown if the client does not have access to the repository.com.azure.core.exception.ResourceNotFoundException
- thrown if the given digest was not found.com.azure.core.exception.HttpResponseException
- thrown if any other unexpected exception is returned by the service.public Mono<com.azure.core.http.rest.Response<ArtifactTagProperties>> getTagPropertiesWithResponse(String tag)
repository
.
Code Samples
Retrieve the properties associated with the given tag.
.String
tag = getTag(); client.getTagPropertiesWithResponse(tag).subscribe(response -> { finalArtifactTagProperties
properties = response.getValue();System
.out.printf("Digest:%s,", properties.getDigest()); });
tag
- name of the tag that uniquely identifies a given tag.properties
associated with the given tag.com.azure.core.exception.ClientAuthenticationException
- thrown if the client does not have access to the repository.com.azure.core.exception.ResourceNotFoundException
- thrown if the given tag was not found.com.azure.core.exception.HttpResponseException
- thrown if any other unexpected exception is returned by the service.NullPointerException
- thrown if the tag
is null.IllegalArgumentException
- thrown if the tag
is empty.public Mono<ArtifactTagProperties> getTagProperties(String tag)
repository
.
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()); });
tag
- name of the tag that uniquely identifies a given tag.properties
associated with the given tag.com.azure.core.exception.ClientAuthenticationException
- thrown if the client does not have access to the repository.com.azure.core.exception.ResourceNotFoundException
- thrown if the given tag was not found.com.azure.core.exception.HttpResponseException
- thrown if any other unexpected exception is returned by the service.NullPointerException
- thrown if the tag
is null.IllegalArgumentException
- thrown if the tag
is empty.public com.azure.core.http.rest.PagedFlux<ArtifactTagProperties> listTagProperties()
repository
.
If you would like to specify the order in which the tags are returned please
use the overload that takes in the options parameter RegistryArtifactAsync.listTagProperties(ArtifactTagOrderBy)
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 from the most recently updated to the last.
client.listTagProperties(.ArtifactTagOrderBy
.LAST_UPDATED_ON_DESCENDING) .byPage(10) .subscribe(tagPropertiesPagedResponse -> { tagPropertiesPagedResponse.getValue() .stream() .forEach(tagProperties ->System
.out.println(tagProperties.getDigest())); });
PagedFlux
of the artifacts for the given repository in the order specified by the options.com.azure.core.exception.ClientAuthenticationException
- thrown if the client does not have access to the repository.com.azure.core.exception.HttpResponseException
- thrown if any other unexpected exception is returned by the service.public com.azure.core.http.rest.PagedFlux<ArtifactTagProperties> listTagProperties(ArtifactTagOrderBy orderBy)
repository
.
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(.ArtifactTagOrderBy
.LAST_UPDATED_ON_DESCENDING) .byPage(10) .subscribe(tagPropertiesPagedResponse -> { tagPropertiesPagedResponse.getValue() .stream() .forEach(tagProperties ->System
.out.println(tagProperties.getDigest())); });
orderBy
- The order in which the tags should be returned by the service.PagedFlux
of the artifacts for the given repository in the order specified by the options.com.azure.core.exception.ClientAuthenticationException
- thrown if the client does not have access to the repository.com.azure.core.exception.HttpResponseException
- thrown if any other unexpected exception is returned by the service.public Mono<com.azure.core.http.rest.Response<ArtifactTagProperties>> updateTagPropertiesWithResponse(String tag, ArtifactTagProperties tagProperties)
ArtifactTagProperties
of the tag with the given name tag
..
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();
tag
- Name of the tag that uniquely identifies it.tagProperties
- value
to be set.com.azure.core.exception.ClientAuthenticationException
- thrown if the client does not have access to repository.com.azure.core.exception.ResourceNotFoundException
- thrown if the given tag was not found.com.azure.core.exception.HttpResponseException
- thrown if any other unexpected exception is returned by the service.NullPointerException
- thrown if the tag
is null.IllegalArgumentException
- thrown if the tag
is empty.NullPointerException
- thrown if tagProperties
is null.public Mono<ArtifactTagProperties> updateTagProperties(String tag, ArtifactTagProperties tagProperties)
ArtifactTagProperties
of the tag with the given name tag
.
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();
tag
- Name of the tag that uniquely identifies it.tagProperties
- tagProperties
to be set.com.azure.core.exception.ClientAuthenticationException
- thrown if the client does not have access to repository.com.azure.core.exception.ResourceNotFoundException
- thrown if the given tag was not found.com.azure.core.exception.HttpResponseException
- thrown if any other unexpected exception is returned by the service.NullPointerException
- thrown if the tag
is null.IllegalArgumentException
- thrown if the tag
is empty.NullPointerException
- thrown if tagProperties
is null.public Mono<com.azure.core.http.rest.Response<ArtifactManifestProperties>> updateManifestPropertiesWithResponse(ArtifactManifestProperties manifestProperties)
ArtifactManifestProperties
of the artifact with the given digest
.
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();
.manifestProperties
- manifestProperties
to be set.com.azure.core.exception.ClientAuthenticationException
- thrown if the client does not have access to repository.com.azure.core.exception.ResourceNotFoundException
- thrown if the given digest was not found.com.azure.core.exception.HttpResponseException
- thrown if any other unexpected exception is returned by the service.NullPointerException
- thrown if the manifestProperties
is null.public Mono<ArtifactManifestProperties> updateManifestProperties(ArtifactManifestProperties manifestProperties)
ArtifactManifestProperties
of the artifact with the given digest
.
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();
.manifestProperties
- manifestProperties
to be set.com.azure.core.exception.ClientAuthenticationException
- thrown if the client does not have access to repository.com.azure.core.exception.ResourceNotFoundException
- thrown if the given digest was not found.com.azure.core.exception.HttpResponseException
- thrown if any other unexpected exception is returned by the service.NullPointerException
- thrown if the manifestProperties
is null.Copyright © 2021 Microsoft Corporation. All rights reserved.