tags
Creates, updates, deletes, gets or lists a tags
resource.
Overview
Name | tags |
Type | Resource |
Id | google.artifactregistry.tags |
Fields
The following fields are returned by SELECT
queries:
- get
- list
Successful response
Name | Datatype | Description |
---|---|---|
name | string | The 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. |
version | string | The 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. |
Successful response
Name | Datatype | Description |
---|---|---|
name | string | The 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. |
version | string | The 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
The following methods are available for this resource:
Name | Accessible by | Required Params | Optional Params | Description |
---|---|---|---|---|
get | select | projectsId , locationsId , repositoriesId , packagesId , tagsId | Gets a tag. | |
list | select | projectsId , locationsId , repositoriesId , packagesId | filter , pageSize , pageToken | Lists tags. |
create | insert | projectsId , locationsId , repositoriesId , packagesId | tagId | Creates a tag. |
patch | update | projectsId , locationsId , repositoriesId , packagesId , tagsId | updateMask | Updates a tag. |
delete | delete | projectsId , locationsId , repositoriesId , packagesId , tagsId | Deletes a tag. |
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.
Name | Datatype | Description |
---|---|---|
locationsId | string | |
packagesId | string | |
projectsId | string | |
repositoriesId | string | |
tagsId | string | |
filter | string | |
pageSize | integer (int32) | |
pageToken | string | |
tagId | string | |
updateMask | string (google-fieldmask) |
SELECT
examples
- get
- list
Gets a tag.
SELECT
name,
version
FROM google.artifactregistry.tags
WHERE projectsId = '{{ projectsId }}' -- required
AND locationsId = '{{ locationsId }}' -- required
AND repositoriesId = '{{ repositoriesId }}' -- required
AND packagesId = '{{ packagesId }}' -- required
AND tagsId = '{{ tagsId }}' -- required;
Lists tags.
SELECT
name,
version
FROM google.artifactregistry.tags
WHERE projectsId = '{{ projectsId }}' -- required
AND locationsId = '{{ locationsId }}' -- required
AND repositoriesId = '{{ repositoriesId }}' -- required
AND packagesId = '{{ packagesId }}' -- required
AND filter = '{{ filter }}'
AND pageSize = '{{ pageSize }}'
AND pageToken = '{{ pageToken }}';
INSERT
examples
- create
- Manifest
Creates a tag.
INSERT INTO google.artifactregistry.tags (
data__name,
data__version,
projectsId,
locationsId,
repositoriesId,
packagesId,
tagId
)
SELECT
'{{ name }}',
'{{ version }}',
'{{ projectsId }}',
'{{ locationsId }}',
'{{ repositoriesId }}',
'{{ packagesId }}',
'{{ tagId }}'
RETURNING
name,
version
;
# Description fields are for documentation purposes
- name: tags
props:
- name: projectsId
value: string
description: Required parameter for the tags resource.
- name: locationsId
value: string
description: Required parameter for the tags resource.
- name: repositoriesId
value: string
description: Required parameter for the tags resource.
- name: packagesId
value: string
description: Required parameter for the tags resource.
- name: name
value: string
description: >
The 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.
- name: version
value: string
description: >
The 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.
- name: tagId
value: string
UPDATE
examples
- patch
Updates a tag.
UPDATE google.artifactregistry.tags
SET
data__name = '{{ name }}',
data__version = '{{ version }}'
WHERE
projectsId = '{{ projectsId }}' --required
AND locationsId = '{{ locationsId }}' --required
AND repositoriesId = '{{ repositoriesId }}' --required
AND packagesId = '{{ packagesId }}' --required
AND tagsId = '{{ tagsId }}' --required
AND updateMask = '{{ updateMask}}'
RETURNING
name,
version;
DELETE
examples
- delete
Deletes a tag.
DELETE FROM google.artifactregistry.tags
WHERE projectsId = '{{ projectsId }}' --required
AND locationsId = '{{ locationsId }}' --required
AND repositoriesId = '{{ repositoriesId }}' --required
AND packagesId = '{{ packagesId }}' --required
AND tagsId = '{{ tagsId }}' --required;