Skip to main content

tags

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

Overview

Nametags
TypeResource
Idgoogle.artifactregistry.tags

Fields

NameDatatypeDescription
namestringThe name of the tag, for example: "projects/p1/locations/us-central1/repositories/repo1/packages/pkg1/tags/tag1". If the package part contains slashes, the slashes are escaped. The tag part can only have characters in [a-zA-Z0-9-._~:@], anything else must be URL encoded.
versionstringThe name of the version the tag refers to, for example: "projects/p1/locations/us-central1/repositories/repo1/packages/pkg1/versions/sha256:5243811" If the package or version ID parts contain slashes, the slashes are escaped.

Methods

NameAccessible byRequired ParamsDescription
getSELECTlocationsId, packagesId, projectsId, repositoriesId, tagsIdGets a tag.
listSELECTlocationsId, packagesId, projectsId, repositoriesIdLists tags.
createINSERTlocationsId, packagesId, projectsId, repositoriesIdCreates a tag.
deleteDELETElocationsId, packagesId, projectsId, repositoriesId, tagsIdDeletes a tag.
patchUPDATElocationsId, packagesId, projectsId, repositoriesId, tagsIdUpdates a tag.

SELECT examples

Lists tags.

SELECT
name,
version
FROM google.artifactregistry.tags
WHERE locationsId = '{{ locationsId }}'
AND packagesId = '{{ packagesId }}'
AND projectsId = '{{ projectsId }}'
AND repositoriesId = '{{ repositoriesId }}';

INSERT example

Use the following StackQL query and manifest file to create a new tags resource.

/*+ create */
INSERT INTO google.artifactregistry.tags (
locationsId,
packagesId,
projectsId,
repositoriesId,
name,
version
)
SELECT
'{{ locationsId }}',
'{{ packagesId }}',
'{{ projectsId }}',
'{{ repositoriesId }}',
'{{ name }}',
'{{ version }}'
;

UPDATE example

Updates a tags resource.

/*+ update */
UPDATE google.artifactregistry.tags
SET
name = '{{ name }}',
version = '{{ version }}'
WHERE
locationsId = '{{ locationsId }}'
AND packagesId = '{{ packagesId }}'
AND projectsId = '{{ projectsId }}'
AND repositoriesId = '{{ repositoriesId }}'
AND tagsId = '{{ tagsId }}';

DELETE example

Deletes the specified tags resource.

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