Package com.google.devtools.artifactregistry.v1

A client to Artifact Registry API

The interfaces provided are listed below, along with usage samples.

ArtifactRegistryClient

Service Description: The Artifact Registry API service.

Artifact Registry is an artifact management system for storing artifacts from different package management systems.

The resources managed by this API are:

  • Repositories, which group packages and their data.
  • Packages, which group versions and their tags.
  • Versions, which are specific forms of a package.
  • Tags, which represent alternative names for versions.
  • Files, which contain content and are optionally associated with a Package or Version.

Sample for ArtifactRegistryClient:


 try (ArtifactRegistryClient artifactRegistryClient = ArtifactRegistryClient.create()) {
   RepositoryName name = RepositoryName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]");
   Repository response = artifactRegistryClient.getRepository(name);
 }
 

Classes

ArtifactProto

ArtifactRegistryClient

Service Description: The Artifact Registry API service.

Artifact Registry is an artifact management system for storing artifacts from different package management systems.

The resources managed by this API are:

  • Repositories, which group packages and their data.
  • Packages, which group versions and their tags.
  • Versions, which are specific forms of a package.
  • Tags, which represent alternative names for versions.
  • Files, which contain content and are optionally associated with a Package or Version.

This class provides the ability to make remote calls to the backing service through method calls that map to API methods. Sample code to get started:


 try (ArtifactRegistryClient artifactRegistryClient = ArtifactRegistryClient.create()) {
   RepositoryName name = RepositoryName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]");
   Repository response = artifactRegistryClient.getRepository(name);
 }
 

Note: close() needs to be called on the ArtifactRegistryClient object to clean up resources such as threads. In the example above, try-with-resources is used, which automatically calls close().

The surface of this class includes several types of Java methods for each of the API's methods:

  1. A "flattened" method. With this type of method, the fields of the request type have been converted into function parameters. It may be the case that not all fields are available as parameters, and not every API method will have a flattened method entry point.
  2. A "request object" method. This type of method only takes one parameter, a request object, which must be constructed before the call. Not every API method will have a request object method.
  3. A "callable" method. This type of method takes no parameters and returns an immutable API callable object, which can be used to initiate calls to the service.

See the individual methods for example code.

Many parameters require resource names to be formatted in a particular way. To assist with these names, this class includes a format method for each type of name, and additionally a parse method to extract the individual identifiers contained within names that are returned.

This class can be customized by passing in a custom instance of ArtifactRegistrySettings to create(). For example:

To customize credentials:


 ArtifactRegistrySettings artifactRegistrySettings =
     ArtifactRegistrySettings.newBuilder()
         .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
         .build();
 ArtifactRegistryClient artifactRegistryClient =
     ArtifactRegistryClient.create(artifactRegistrySettings);
 

To customize the endpoint:


 ArtifactRegistrySettings artifactRegistrySettings =
     ArtifactRegistrySettings.newBuilder().setEndpoint(myEndpoint).build();
 ArtifactRegistryClient artifactRegistryClient =
     ArtifactRegistryClient.create(artifactRegistrySettings);
 

Please refer to the GitHub repository's samples for more quickstart code snippets.

ArtifactRegistryClient.ListDockerImagesFixedSizeCollection

ArtifactRegistryClient.ListDockerImagesPage

ArtifactRegistryClient.ListDockerImagesPagedResponse

ArtifactRegistryClient.ListRepositoriesFixedSizeCollection

ArtifactRegistryClient.ListRepositoriesPage

ArtifactRegistryClient.ListRepositoriesPagedResponse

ArtifactRegistryGrpc

The Artifact Registry API service. Artifact Registry is an artifact management system for storing artifacts from different package management systems. The resources managed by this API are:

  • Repositories, which group packages and their data.
  • Packages, which group versions and their tags.
  • Versions, which are specific forms of a package.
  • Tags, which represent alternative names for versions.
  • Files, which contain content and are optionally associated with a Package or Version.

ArtifactRegistryGrpc.ArtifactRegistryBlockingStub

The Artifact Registry API service. Artifact Registry is an artifact management system for storing artifacts from different package management systems. The resources managed by this API are:

  • Repositories, which group packages and their data.
  • Packages, which group versions and their tags.
  • Versions, which are specific forms of a package.
  • Tags, which represent alternative names for versions.
  • Files, which contain content and are optionally associated with a Package or Version.

ArtifactRegistryGrpc.ArtifactRegistryFutureStub

The Artifact Registry API service. Artifact Registry is an artifact management system for storing artifacts from different package management systems. The resources managed by this API are:

  • Repositories, which group packages and their data.
  • Packages, which group versions and their tags.
  • Versions, which are specific forms of a package.
  • Tags, which represent alternative names for versions.
  • Files, which contain content and are optionally associated with a Package or Version.

ArtifactRegistryGrpc.ArtifactRegistryImplBase

The Artifact Registry API service. Artifact Registry is an artifact management system for storing artifacts from different package management systems. The resources managed by this API are:

  • Repositories, which group packages and their data.
  • Packages, which group versions and their tags.
  • Versions, which are specific forms of a package.
  • Tags, which represent alternative names for versions.
  • Files, which contain content and are optionally associated with a Package or Version.

ArtifactRegistryGrpc.ArtifactRegistryStub

The Artifact Registry API service. Artifact Registry is an artifact management system for storing artifacts from different package management systems. The resources managed by this API are:

  • Repositories, which group packages and their data.
  • Packages, which group versions and their tags.
  • Versions, which are specific forms of a package.
  • Tags, which represent alternative names for versions.
  • Files, which contain content and are optionally associated with a Package or Version.

ArtifactRegistrySettings

Settings class to configure an instance of ArtifactRegistryClient.

The default instance has everything set to sensible defaults:

  • The default service address (artifactregistry.googleapis.com) and default port (443) are used.
  • Credentials are acquired automatically through Application Default Credentials.
  • Retries are configured for idempotent methods but not for non-idempotent methods.

The builder of this class is recursive, so contained classes are themselves builders. When build() is called, the tree of builders is called to create the complete settings object.

For example, to set the total timeout of getRepository to 30 seconds:


 ArtifactRegistrySettings.Builder artifactRegistrySettingsBuilder =
     ArtifactRegistrySettings.newBuilder();
 artifactRegistrySettingsBuilder
     .getRepositorySettings()
     .setRetrySettings(
         artifactRegistrySettingsBuilder
             .getRepositorySettings()
             .getRetrySettings()
             .toBuilder()
             .setTotalTimeout(Duration.ofSeconds(30))
             .build());
 ArtifactRegistrySettings artifactRegistrySettings = artifactRegistrySettingsBuilder.build();
 

ArtifactRegistrySettings.Builder

Builder for ArtifactRegistrySettings.

DockerImage

DockerImage represents a docker artifact. The following fields are returned as untyped metadata in the Version resource, using camelcase keys (i.e. metadata.imageSizeBytes):

  • imageSizeBytes
  • mediaType
  • buildTime

Protobuf type google.devtools.artifactregistry.v1.DockerImage

DockerImage.Builder

DockerImage represents a docker artifact. The following fields are returned as untyped metadata in the Version resource, using camelcase keys (i.e. metadata.imageSizeBytes):

  • imageSizeBytes
  • mediaType
  • buildTime

Protobuf type google.devtools.artifactregistry.v1.DockerImage

GetRepositoryRequest

The request to retrieve a repository.

Protobuf type google.devtools.artifactregistry.v1.GetRepositoryRequest

GetRepositoryRequest.Builder

The request to retrieve a repository.

Protobuf type google.devtools.artifactregistry.v1.GetRepositoryRequest

ListDockerImagesRequest

The request to list docker images.

Protobuf type google.devtools.artifactregistry.v1.ListDockerImagesRequest

ListDockerImagesRequest.Builder

The request to list docker images.

Protobuf type google.devtools.artifactregistry.v1.ListDockerImagesRequest

ListDockerImagesResponse

The response from listing docker images.

Protobuf type google.devtools.artifactregistry.v1.ListDockerImagesResponse

ListDockerImagesResponse.Builder

The response from listing docker images.

Protobuf type google.devtools.artifactregistry.v1.ListDockerImagesResponse

ListRepositoriesRequest

The request to list repositories.

Protobuf type google.devtools.artifactregistry.v1.ListRepositoriesRequest

ListRepositoriesRequest.Builder

The request to list repositories.

Protobuf type google.devtools.artifactregistry.v1.ListRepositoriesRequest

ListRepositoriesResponse

The response from listing repositories.

Protobuf type google.devtools.artifactregistry.v1.ListRepositoriesResponse

ListRepositoriesResponse.Builder

The response from listing repositories.

Protobuf type google.devtools.artifactregistry.v1.ListRepositoriesResponse

LocationName

LocationName.Builder

Builder for projects/{project}/locations/{location}.

Repository

A Repository for storing artifacts with a specific format.

Protobuf type google.devtools.artifactregistry.v1.Repository

Repository.Builder

A Repository for storing artifacts with a specific format.

Protobuf type google.devtools.artifactregistry.v1.Repository

RepositoryName

RepositoryName.Builder

Builder for projects/{project}/locations/{location}/repositories/{repository}.

RepositoryProto

ServiceProto

Interfaces

DockerImageOrBuilder

GetRepositoryRequestOrBuilder

ListDockerImagesRequestOrBuilder

ListDockerImagesResponseOrBuilder

ListRepositoriesRequestOrBuilder

ListRepositoriesResponseOrBuilder

RepositoryOrBuilder

Enums

Repository.Format

A package format.

Protobuf enum google.devtools.artifactregistry.v1.Repository.Format