public final class ContainerRepositoryAsync extends Object
Instantiating an asynchronous Container Repository Helper class
ContainerRepositoryAsync
repositoryAsyncClient = newContainerRegistryClientBuilder
() .endpoint(endpoint) .credential(credential) .buildAsyncClient() .getRepository(repository);
Modifier and Type | Method and Description |
---|---|
Mono<Void> |
delete()
Delete the repository in the Azure Container Registry for the given
repository . |
Mono<com.azure.core.http.rest.Response<Void>> |
deleteWithResponse()
Delete the repository in the Azure Container Registry for the given
repository . |
RegistryArtifactAsync |
getArtifact(String digest)
Creates a new instance of
RegistryArtifactAsync object for the specified artifact. |
String |
getName()
Gets the Azure Container Registry service endpoint for the current instance.
|
Mono<ContainerRepositoryProperties> |
getProperties()
Gets the
properties associated with the given repository . |
Mono<com.azure.core.http.rest.Response<ContainerRepositoryProperties>> |
getPropertiesWithResponse()
Gets the
properties associated with the given repository . |
String |
getRegistryEndpoint()
Gets the Azure Container Registry name for the current instance.
|
com.azure.core.http.rest.PagedFlux<ArtifactManifestProperties> |
listManifestProperties()
Fetches all the artifacts associated with the given
repository . |
com.azure.core.http.rest.PagedFlux<ArtifactManifestProperties> |
listManifestProperties(ArtifactManifestOrderBy orderBy)
Fetches all the artifacts associated with the given
repository . |
Mono<ContainerRepositoryProperties> |
updateProperties(ContainerRepositoryProperties repositoryProperties)
Update the repository properties
ContainerRepositoryProperties of the given repository . |
Mono<com.azure.core.http.rest.Response<ContainerRepositoryProperties>> |
updatePropertiesWithResponse(ContainerRepositoryProperties repositoryProperties)
Update the repository properties
ContainerRepositoryProperties of the given repository . |
public String getName()
public String getRegistryEndpoint()
public Mono<com.azure.core.http.rest.Response<Void>> deleteWithResponse()
repository
.
Code Samples
Delete the repository.
client.deleteWithResponse().subscribe(response -> {System
.out.printf("Successfully initiated delete of the repository."); }, error -> {System
.out.println("Failed to initiate a delete of the repository."); });
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()
repository
.
Code Samples
Delete the repository.
client.delete().subscribe(response -> {System
.out.printf("Successfully initiated delete of the repository."); }, error -> {System
.out.println("Failed to initiate a delete of the repository."); });
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 RegistryArtifactAsync getArtifact(String digest)
RegistryArtifactAsync
object for the specified artifact.digest
- Either a tag or digest that uniquely identifies the artifact.RegistryArtifactAsync
object for the desired repository.NullPointerException
- if digest
is null.IllegalArgumentException
- if digest
is empty.public com.azure.core.http.rest.PagedFlux<ArtifactManifestProperties> listManifestProperties()
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 ContainerRepositoryAsync.listManifestProperties(ArtifactManifestOrderBy)
listManifestProperties}
No assumptions on the order can be made if no options are provided to the service.
Code Samples
Retrieve all artifacts associated with the given repository.
client.listManifestProperties().byPage(10)
.subscribe(ManifestPropertiesPagedResponse -> {
ManifestPropertiesPagedResponse.getValue().stream().forEach(
ManifestProperties -> System
.out.println(ManifestProperties.getDigest()));
});
.PagedFlux
of ManifestProperties for all the artifacts in the given repository.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<ArtifactManifestProperties> listManifestProperties(ArtifactManifestOrderBy orderBy)
repository
.
The method supports options to select the order in which the artifacts are returned by the service. Currently the service supports an ascending or descending order based on the last updated time for the artifacts. No assumptions on the order can be made if no options are provided to the service.
Code Samples
Retrieve all artifacts associated with the given repository from the most recently updated to the last.
client.listManifestProperties(.ArtifactManifestOrderBy
.LAST_UPDATED_ON_DESCENDING).byPage(10) .subscribe(ManifestPropertiesPagedResponse -> { ManifestPropertiesPagedResponse.getValue().stream().forEach( ManifestProperties ->System
.out.println(ManifestProperties.getDigest())); });
orderBy
- The order in which the artifacts are 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<ContainerRepositoryProperties>> getPropertiesWithResponse()
properties
associated with the given repository
.
Code Samples
Get the properties for the given repository.
client.getPropertiesWithResponse().subscribe(response -> { finalContainerRepositoryProperties
properties = response.getValue();System
.out.printf("Name:%s,", properties.getName()); });
properties
associated with the given repository
.com.azure.core.exception.ClientAuthenticationException
- thrown if the client have access to the repository.com.azure.core.exception.ResourceNotFoundException
- thrown if the repository with the given name was not found.com.azure.core.exception.HttpResponseException
- thrown if any other unexpected exception is returned by the service.public Mono<ContainerRepositoryProperties> getProperties()
properties
associated with the given repository
.
Code Samples
Get the properties for the given repository.
client.getProperties().subscribe(response -> {
System
.out.printf("Name:%s,", response.getName());
});
properties
associated with the given repository
.com.azure.core.exception.ClientAuthenticationException
- thrown if the client does not have access to the repository.com.azure.core.exception.ResourceNotFoundException
- thrown if the repository with the given name 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<ContainerRepositoryProperties>> updatePropertiesWithResponse(ContainerRepositoryProperties repositoryProperties)
ContainerRepositoryProperties
of the given repository
.
These properties set the update, delete and retrieve options of the repository.
Code Samples
Update the writeable properties for the given repository.
ContainerRepositoryProperties
properties = getRepositoryProperties();
client.updatePropertiesWithResponse(properties).subscribe();
.repositoryProperties
- repository properties
that need to be updated for the repository.repository properties
.com.azure.core.exception.ClientAuthenticationException
- thrown if the client does not have access to the repository.com.azure.core.exception.ResourceNotFoundException
- thrown if the repository with the given name was not found.com.azure.core.exception.HttpResponseException
- thrown if any other unexpected exception is returned by the service.NullPointerException
- thrown if repositoryProperties
is null.public Mono<ContainerRepositoryProperties> updateProperties(ContainerRepositoryProperties repositoryProperties)
ContainerRepositoryProperties
of the given repository
.
These properties set the update, delete and retrieve options of the repository.
Code Samples
Update the writeable properties for the given repository.
ContainerRepositoryProperties
properties = getRepositoryProperties();
client.updateProperties(properties).subscribe();
.repositoryProperties
- writeable properties
that need to be updated for the repository.com.azure.core.exception.ClientAuthenticationException
- thrown if the client does not have access to the repository.com.azure.core.exception.ResourceNotFoundException
- thrown if the repository with the given name was not found.com.azure.core.exception.HttpResponseException
- thrown if any other unexpected exception is returned by the service.NullPointerException
- thrown if the repositoryProperties
is null.Copyright © 2021 Microsoft Corporation. All rights reserved.