Skip to main content

versions

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

Overview

Nameversions
TypeResource
Idgoogle.artifactregistry.versions

Fields

NameDatatypeDescription
namestringThe name of the version, for example: "projects/p1/locations/us-central1/repositories/repo1/packages/pkg1/versions/art1". If the package or version ID parts contain slashes, the slashes are escaped.
descriptionstringOptional. Description of the version, as specified in its metadata.
createTimestringThe time when the version was created.
metadataobjectOutput only. Repository-specific Metadata stored against this version. The fields returned are defined by the underlying repository-specific resource. Currently, the resources could be: DockerImage MavenArtifact
relatedTagsarrayOutput only. A list of related tags. Will contain up to 100 tags that reference this version.
updateTimestringThe time when the version was last updated.

Methods

NameAccessible byRequired ParamsDescription
getSELECTlocationsId, packagesId, projectsId, repositoriesId, versionsIdGets a version
listSELECTlocationsId, packagesId, projectsId, repositoriesIdLists versions.
batch_deleteDELETElocationsId, packagesId, projectsId, repositoriesIdDeletes multiple versions across a repository. The returned operation will complete once the versions have been deleted.
deleteDELETElocationsId, packagesId, projectsId, repositoriesId, versionsIdDeletes a version and all of its content. The returned operation will complete once the version has been deleted.

SELECT examples

Lists versions.

SELECT
name,
description,
createTime,
metadata,
relatedTags,
updateTime
FROM google.artifactregistry.versions
WHERE locationsId = '{{ locationsId }}'
AND packagesId = '{{ packagesId }}'
AND projectsId = '{{ projectsId }}'
AND repositoriesId = '{{ repositoriesId }}';

DELETE example

Deletes the specified versions resource.

/*+ delete */
DELETE FROM google.artifactregistry.versions
WHERE locationsId = '{{ locationsId }}'
AND packagesId = '{{ packagesId }}'
AND projectsId = '{{ projectsId }}'
AND repositoriesId = '{{ repositoriesId }}';