Skip to main content

maven_artifacts

Creates, updates, deletes, gets or lists a maven_artifacts resource.

Overview

Namemaven_artifacts
TypeResource
Idgoogle.artifactregistry.maven_artifacts

Fields

The following fields are returned by SELECT queries:

Successful response

NameDatatypeDescription
namestringRequired. registry_location, project_id, repository_name and maven_artifact forms a unique artifact For example, "projects/test-project/locations/us-west4/repositories/test-repo/mavenArtifacts/ com.google.guava:guava:31.0-jre", where "us-west4" is the registry_location, "test-project" is the project_id, "test-repo" is the repository_name and "com.google.guava:guava:31.0-jre" is the maven artifact.
artifactIdstringArtifact ID for the artifact.
createTimestring (google-datetime)Output only. Time the artifact was created.
groupIdstringGroup ID for the artifact. Example: com.google.guava
pomUristringRequired. URL to access the pom file of the artifact. Example: us-west4-maven.pkg.dev/test-project/test-repo/com/google/guava/guava/31.0/guava-31.0.pom
updateTimestring (google-datetime)Output only. Time the artifact was updated.
versionstringVersion of this artifact.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectprojectsId, locationsId, repositoriesId, mavenArtifactsIdGets a maven artifact.
listselectprojectsId, locationsId, repositoriesIdpageSize, pageTokenLists maven artifacts.

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
locationsIdstring
mavenArtifactsIdstring
projectsIdstring
repositoriesIdstring
pageSizeinteger (int32)
pageTokenstring

SELECT examples

Gets a maven artifact.

SELECT
name,
artifactId,
createTime,
groupId,
pomUri,
updateTime,
version
FROM google.artifactregistry.maven_artifacts
WHERE projectsId = '{{ projectsId }}' -- required
AND locationsId = '{{ locationsId }}' -- required
AND repositoriesId = '{{ repositoriesId }}' -- required
AND mavenArtifactsId = '{{ mavenArtifactsId }}' -- required;